Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Local stdio MCP server that handles Google OAuth2 locally and proxies authenticated requests to Google Docs and Google Drive REST APIs, enabling document and file operations from Cursor or other MCP clients.

README.md

Google Docs MCP Proxy

A local stdio MCP server that handles Google OAuth2 locally and proxies authenticated requests to the Google Docs and Google Drive REST APIs.

This solves the problem where Cursor cannot complete OAuth for Google's hosted Workspace MCP servers (Google does not support the cursor:// redirect protocol).

Architecture

Cursor Agent ──stdio JSON-RPC──► Local MCP Server ──Bearer──► docs.googleapis.com
                                        │                  └──► drive.googleapis.com
                                        └──► OAuth2 Token Manager ──► Google OAuth

Prerequisites

  1. A Google Cloud project with:
  • Google Docs API enabled
  • Google Drive API enabled
  • OAuth consent screen configured with scopes:
  • https://www.googleapis.com/auth/documents
  • https://www.googleapis.com/auth/drive
  • OAuth 2.0 client of type Desktop app (not Web application)

— Desktop app clients allow http://127.0.0.1 redirects without pre-registration

  1. Node.js 18+

Setup

1. Install dependencies

npm install

2. Configure environment

cp .env.example .env

Edit .env and fill in your OAuth client credentials from Google Cloud Console:

GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your-client-secret

3. Authorize (one-time)

npm run auth

This opens your browser to Google's consent screen, completes the OAuth2 flow, and saves tokens to token.json (gitignored). You only need to do this once — tokens refresh automatically.

Headless alternative: Set GOOGLE_REFRESH_TOKEN=<your-refresh-token> in .env to skip the interactive flow entirely.

4. Add to Cursor's mcp.json

Add the following entry to ~/.cursor/mcp.json (under mcpServers):

"google-docs": {
  "command": "node",
  "args": [
    "D:\\Documents\\_Projects\\google-docs-mcp\\node_modules\\tsx\\dist\\cli.mjs",
    "D:\\Documents\\_Projects\\google-docs-mcp\\src\\index.ts"
  ]
}

Restart Cursor after saving.

MCP Tools

google_docs_request

Make any request to the Google Docs REST API.

| Parameter | Type | Description | |-----------|------|-------------| | path | string | Path after /v1/, e.g. documents/{id}:batchUpdate | | method | GET \| POST \| PATCH \| PUT \| DELETE | HTTP method | | body | object (optional) | JSON request body | | query | object (optional) | Query string params (string values) |

Examples:

Create a document: ``json { "path": "documents", "method": "POST", "body": { "title": "My New Doc" } } ``

Read a document: ``json { "path": "documents/DOC_ID", "method": "GET" } ``

Insert text via batchUpdate: ``json { "path": "documents/DOC_ID:batchUpdate", "method": "POST", "body": { "requests": [ { "insertText": { "text": "Hello world\n", "location": { "index": 1 } } } ] } } ``

google_drive_request

Make any request to the Google Drive REST API v3.

Same parameters; base URL is https://www.googleapis.com/drive/v3/.

Examples:

List files: ``json { "path": "files", "method": "GET", "query": { "pageSize": "10" } } ``

Search for docs: ``json { "path": "files", "method": "GET", "query": { "q": "mimeType='application/vnd.google-apps.document'", "pageSize": "5" } } ``

Development

npm run dev    # tsx --watch (hot reload)
npm start      # run once
npm run auth   # re-authorize (if tokens are revoked)

Security notes

  • .env and token.json are gitignored — never commit them
  • OAuth credentials live in the project .env, not in global mcp.json
  • Token refresh happens automatically via native fetch; no manual intervention needed after initial auth

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Files & Docs servers.