google-workspace -with-script
MCP server for Claude Code CLI with full Google Workspace integration - Docs, Sheets, Drive, Gmail, Calendar & Apps Script (72 tools)
claude mcp add --transport stdio sputnicyoji-google-workspace-mcp-with-script node dist/server.js \ --env GOOGLE_APPLICATION_CREDENTIALS="Path to your Google service account key JSON file (optional if using user credentials)"
How to use
This MCP server provides a comprehensive Google Workspace integration, exposing 72 tools across Google Docs, Sheets, Drive, Gmail, Calendar, and Apps Script APIs. It includes capabilities to read, write, format, manage documents and sheets, handle Drive file and folder operations, send and manage Gmail messages, manipulate calendar events, and create or manage bound Apps Script projects. The server is designed to work with MCP-compatible clients such as Claude Code CLI and Cursor IDE, enabling AI-assisted automation of Workspace workflows. To use it, start the server and connect your MCP client to the local or configured host/port. You can then issue commands like readGoogleDoc, writeSpreadsheet, createCalendarEvent, or createBoundScript, depending on the tool you want to invoke. Tokenless interaction is supported when using a service account or OAuth credentials via the Google APIs setup, as described in the setup steps.
How to install
Prerequisites:
- Node.js v18+ and npm
- Git
- Access to Google Cloud Console for API enablement and OAuth credentials (optional: service account for automated environments)
Step-by-step:
-
Clone the repository git clone https://github.com/your-org/google-workspace-mcp-with-script.git cd google-workspace-mcp-with-script
-
Install dependencies npm install
-
Build the TypeScript project (if required by the repo setup) npm run build
-
Run the server node dist/server.js // or if you have a different entry point, adjust accordingly
-
Configure MCP clients
- Claude Code CLI: add an mcp_config entry pointing to the node server with the path to dist/server.js
- Cursor IDE: configure .cursor/mcp.json or global MCP settings to point to dist/server.js
-
Authentication setup (choose one):
- User credentials: Ensure OAuth consent screen and credentials.json are in place and Google APIs are enabled as described in the README
- Service account (recommended for servers): Set GOOGLE_APPLICATION_CREDENTIALS to the service account key JSON path
Tips:
- Ensure Google Docs, Sheets, Drive, Gmail, Calendar, and Apps Script APIs are enabled in your Google Cloud project
- For first-time setup, run the interactive setup if provided by the project (npm run setup) to configure credentials
Additional notes
Environment variables and configuration options:
- GOOGLE_APPLICATION_CREDENTIALS: Path to a Google service account key JSON file (optional if using user OAuth flow)
- CLIENT_ID / CLIENT_SECRET / REDIRECT_URI: If using OAuth flow, ensure credentials are configured in the Google Cloud project
- Make sure the OAuth consent screen is configured with the required scopes: documents, spreadsheets, drive.file, script.projects, gmail, calendar
Common issues:
- API access not authorized: re-authenticate or ensure the OAuth tokens are refreshed
- Insufficient permissions: share documents/files with the service account or authorize the user account used for OAuth
- Network/endpoint problems: confirm dist/server.js exists after build and the server is reachable by the MCP client
Configuration tips:
- Use the service account approach for unattended environments by setting GOOGLE_APPLICATION_CREDENTIALS and sharing resources with the service account
- Keep the server up-to-date with the latest API scopes and client libraries to maintain compatibility with Google Workspace changes
Related MCP Servers
awesome-claude-skills
A curated list of awesome Claude Skills, resources, and tools for customizing Claude AI workflows
Unity
AI-powered bridge connecting LLMs and advanced AI agents to the Unity Editor via the Model Context Protocol (MCP). Chat with AI to generate code, debug errors, and automate game development tasks directly within your project.
Overture
Overture is an open-source, locally running web interface delivered as an MCP (Model Context Protocol) server that visually maps out the execution plan of any AI coding agent as an interactive flowchart/graph before the agent begins writing code.
claude-emporium
🏛 [UNDER CONSTRUCTION] A (roman) claude plugin marketplace
vsync
Sync MCP servers, Skills, Agents & Commands across Claude Code, Cursor, OpenCode, Codex. One config, all tools.
mcpx
Token-efficient MCP client: TypeScript schemas instead of JSON, LLM-friendly syntax, batch calls, TOON output. Built for Claude/GPT automations.