An MCP server that enables Claude, on both mobile and desktop, to read and edit Google Docs in your Google Drive.
As of the creation of this project, there is no trivial way to connect consumer LLM apps (e.g. ChatGPT or Gemini on iOS) to an arbitrary, user-hosted MCP server over HTTPS. Most LLM clients require registered or first-party integrations, which is why this MCP server is designed to be used with Claude’s custom connector support or via custom applications.
- Read/Write Documents: Full document editing with preserved structure
- Section Operations: Read, replace, or delete specific sections by heading
- Search & Replace: Find and replace text throughout documents
- Batch Operations: Execute multiple edits in a single call
┌─────────────────┐ ┌──────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Claude Mobile │────▶│ AWS WAF │────▶│ API Gateway │────▶│ Google APIs │
│ or Desktop │◀────│ (IP allowlist) │◀────│ /mcp/{token} │◀────│ Docs + Drive │
└─────────────────┘ └──────────────────┘ └────────┬─────────┘ └─────────────────┘
│
▼
┌──────────────────┐
│ Lambda │
│ (validates │
│ token + calls │
│ Google APIs) │
└────────┬─────────┘
│
▼
┌──────────────────┐
│ Secrets Manager │
│ (Google OAuth + │
│ secret token) │
└──────────────────┘
Two layers protect your Google Docs from unauthorized access:
| Layer | What it does | Protects against |
|---|---|---|
| WAF | Only allows Claude's IP addresses (160.79.104.0/21) |
Bots, scanners, random attackers |
| Secret Token | URL path contains a 64-char token only you know | Other Claude users who discover your URL |
Even if someone finds your API Gateway URL, they need both:
- To be connecting through Claude (WAF check)
- To know your secret token (path validation)
- Node.js 18+
- AWS Account with CLI configured
- Google Cloud Account
npm install- Create a project at Google Cloud Console
- Enable Google Docs API and Google Drive API
- Configure OAuth consent screen (add yourself as test user)
- Create OAuth credentials (Desktop app) → download as
credentials.json
aws configurenpm run setupSave the secret token displayed at the end!
npx cdk bootstrap # First time only
npm run deployAdd a custom connector in Claude with URL:
https://<api-id>.execute-api.<region>.amazonaws.com/v1/mcp/<YOUR_SECRET_TOKEN>
Replace <YOUR_SECRET_TOKEN> with the token from step 3.
Reading: Documents use markers like [H1], [H2], [text](url), • for bullets.
Writing: Use the same markers:
[H2] My Section
Paragraph with a [link](https://example.com).
• Bullet point
npm run destroy
aws secretsmanager delete-secret --secret-id mcp-gdocs-credentials --force-delete-without-recoveryMIT