a-bonus/google-docs-mcp

The Ultimate Google Docs, Sheets, Drive, Gmail, & Google Calendar MCP Server. This MCP (primarily for use in Claude Desktop) gains full access to your google suite and lets claude do its thing.

Google Docs, Sheets, Drive, Gmail & Calendar MCP Server

What it is – A Node‑based MCP (Multi‑Client Protocol) server that exposes Google Workspace APIs (Docs, Sheets, Drive, Gmail, Calendar, Apps Script) as callable tools for AI agents such as Claude Desktop, Cursor, or any MCP‑compatible client.

How it works –

  1. You create a Google Cloud OAuth client and enable the required Workspace APIs.
  2. Run npx @a‑bonus/google-docs-mcp auth to obtain a refresh token stored locally.
  3. Add the server definition to your MCP client configuration; the client launches the server on demand (or you can deploy it to Cloud Run for a shared, remote endpoint).
  4. The server translates MCP calls into Google API requests and returns structured JSON results.

Key capabilities –

  • Docs: read/write plain text, markdown, tables, images, styles, comments, tabs, sections, etc.
  • Sheets: read/write ranges, batch updates, formatting, tables, charts, conditional formatting, protection, dropdowns, etc.
  • Drive: list, search, create, move, copy, rename, delete files/folders, download content.
  • Gmail: list/search messages, read full bodies, send/reply, manage drafts, labels, trash, and a composite triageInbox helper.
  • Calendar: list/search events, create/update/delete events, quick‑add natural‑language events.
  • Apps Script: create, read, and update bound or standalone script projects.

Typical use case – An LLM‑powered assistant can issue natural‑language commands like “Append ‘Meeting notes’ to document ABC123” or “Create a table named ‘Tasks’ in sheet XYZ789”, which the MCP client forwards to this server, which then calls the appropriate Google API and returns the result.

Deployment options –

  • Local: run via npx on a developer machine; token stored in ~/.config/google-docs-mcp/token.json.
  • Remote: deploy a container to Google Cloud Run (or any container host). The server uses MCP OAuth 2.1, so the client handles Google sign‑in automatically; no local tokens needed.

Setup highlights –

  • Enable Docs, Sheets, Drive, Gmail, Calendar, and Apps Script APIs in Google Cloud.
  • Provide GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET (and optionally TOKEN_STORE=firestore, JWT_SIGNING_KEY for remote mode).
  • Use the provided JSON snippet to add the server to your MCP client configuration.

Why it matters – It bridges powerful LLM agents with the full Google Workspace suite, letting AI assistants read, edit, and orchestrate documents, spreadsheets, email, and calendars programmatically without writing custom OAuth code each time.


Quick start

# 1. Authorize
GOOGLE_CLIENT_ID=… GOOGLE_CLIENT_SECRET=… npx -y @a-bonus/google-docs-mcp auth

# 2. Add to client (Claude Desktop / Cursor)
{
  "mcpServers": {"google-docs": {"command": "npx","args": ["-y","@a-bonus/google-docs-mcp"],"env": {"GOOGLE_CLIENT_ID":"…","GOOGLE_CLIENT_SECRET":"…"}}}
}

Remote deployment example

gcloud run deploy google-docs-mcp \
  --source . \
  --region europe-west3 \
  --port 8080 \
  --allow-unauthenticated \
  --set-env-vars "MCP_TRANSPORT=httpStream,BASE_URL=https://your-service.run.app,GOOGLE_CLIENT_ID=…,GOOGLE_CLIENT_SECRET=…,TOKEN_STORE=firestore,JWT_SIGNING_KEY=your-secret-key"

All details are taken directly from the repository’s README.

Related

  • Project
  • Project
  • Project
  • Project
  • Project