{
  "markdown": "# google-documents-mcp\n\nMCP server for Google Docs - read and edit documents.\n\n## Use Cases\n\n**Document Q&A**: \"What does the contract say about termination clauses?\" → reads the doc and pulls out the relevant section.\n\n**Meeting-to-doc workflow**: After a call, reads the Gemini transcript plus follow-up Slack discussion, then updates your team charter with the decisions made.\n\n**Release announcement**: \"Draft a blog post about the new feature based on the GitHub PRs and Slack discussions in #proj-awesome\" → synthesizes technical changes into user-facing content.\n\n**Daily planning with persistent context**: Your AI assistant reads a \"planning log\" doc at the start of each day, asks about yesterday's progress, helps you identify today's priority, then updates the doc with your plan. Context carries over across sessions - it remembers what you said you'd do and can follow up.\n\n(These are just examples - any workflow that needs document reading or editing can use this. Use in combination with [google-drive-mcp](https://github.com/domdomegg/google-drive-mcp) for finding files, deleting, comments, and sharing permissions.)\n\n## Setup\n\n### 1. Create Google OAuth credentials\n\n1. Go to [Google Cloud Console](https://console.cloud.google.com/)\n2. Create a new project (or use existing)\n3. Enable the Google Docs API\n4. Go to **APIs & Services** → **OAuth consent screen**, set up consent screen\n5. Go to **APIs & Services** → **Credentials** → **Create Credentials** → **OAuth client ID**\n6. Choose **Web application**\n7. Add `http://localhost:3000/callback` to **Authorized redirect URIs**\n8. Note your Client ID and Client Secret\n\n### 2. Run the server\n\n```bash\nGOOGLE_CLIENT_ID='your-client-id' \\\nGOOGLE_CLIENT_SECRET='your-client-secret' \\\nMCP_TRANSPORT=http \\\nnpm start\n```\n\nThe server runs on `http://localhost:3000` by default. Change with `PORT=3001`.\n\n### 3. Add to your MCP client\n\nWith the server running, follow the instructions on [install-mcp](https://adamjones.me/install-mcp/?url=http://localhost:3000/mcp), which generates the right config for your MCP client (Claude Code, Claude Desktop, Cursor, Cline, VS Code, and more).\n\n## Architecture\n\nThis server acts as an **OAuth proxy** to Google:\n\n```mermaid\ngraph LR\n    A[MCP client] <--> B[google-documents-mcp] <--> C[Google OAuth/API]\n```\n\n1. Server advertises itself as an OAuth authorization server via `/.well-known/oauth-authorization-server`\n2. `/register` returns the Google OAuth client credentials\n3. `/authorize` redirects to Google, encoding the client's callback URL in state\n4. `/callback` receives the code from Google and forwards to the client's callback\n5. `/token` proxies token requests to Google, injecting client credentials\n6. `/mcp` handles MCP requests, using the bearer token to call Google Docs API\n\nThe server holds no tokens or state - it just proxies OAuth to Google.\n\n## Tools\n\n| Tool | Description |\n|------|-------------|\n| `document_get_raw` | Get full raw JSON structure (all tabs, formatting, headers, footers, styles) |\n| `document_get_text` | Get plain text content of all tabs |\n| `document_create` | Create a new blank document |\n| `document_batch_update` | Apply multiple edits atomically (insert, delete, format, etc.) |\n| `document_append` | Append text to end of document |\n| `document_insert` | Insert text at a specific index |\n| `document_replace` | Find and replace text |\n\n### batch_update Request Types\n\nThe `document_batch_update` tool supports these operations:\n\n- `insertText` - Insert text at a location\n- `deleteContentRange` - Delete a range of content\n- `replaceAllText` - Find and replace all occurrences\n- `insertInlineImage` - Insert an image\n- `insertTable` - Create a table\n- `insertTableRow` / `insertTableColumn` - Add rows/columns to tables\n- `deleteTableRow` / `deleteTableColumn` - Remove rows/columns from tables\n- `insertPageBreak` - Add a page break\n- `createNamedRange` / `deleteNamedRange` - Manage named ranges\n- `createParagraphBullets` / `deleteParagraphBullets` - Manage bullet lists\n\n## Google Docs API Scopes\n\n- `documents` - Full access to read and edit documents\n\n## Contributing\n\nPull requests are welcomed on GitHub! To get started:\n\n1. Install Git and Node.js\n2. Clone the repository\n3. Install dependencies with `npm install`\n4. Run `npm run test` to run tests\n5. Build with `npm run build`\n\n## Releases\n\nVersions follow the [semantic versioning spec](https://semver.org/).\n\nTo release:\n\n1. Use `npm version <major | minor | patch>` to bump the version\n2. Run `git push --follow-tags` to push with tags\n3. Wait for GitHub Actions to publish to the NPM registry.\n",
  "bytes": 4622,
  "sha": "77f5d63f4119d0ffe4a16e43603b7a72bc6f487d69f1572212252a61e00ab200",
  "repo_slug": "domdomegg/google-documents-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_domdomegg_google_documents_mcp_a601528d/readme"
}