Google Docs Preview MCP

Google Docs Preview MCP

Enables creating anchored comments, replies, and real suggested edits in Google Docs from Claude.

Category
访问服务器

README

<!--ai-->

Google Docs Preview MCP

Create anchored comments, replies, and real suggested edits in Google Docs from Claude.

Google’s hosted Docs MCP recognizes the preview operations but does not expose enough of the Docs API schema to use them:

Operation Hosted MCP problem This implementation
Create comments Strips insertComment.content Passes the complete request
Suggest edits Omits top-level writeControl Exposes writeControl.writeMode: SUGGEST
Recover preview objects Omits comment-view parameters Exposes comment, suggestion, and tab view controls

The underlying Google Docs REST API accepts all three operations. See what failed and why.

Choose a setup

Setup Works in Trust boundary Status
Local stdio Claude Desktop and Claude Code Your computer, Google, and Claude Recommended for sensitive documents; tested
Organization connector Claude.ai and other cloud clients Adds the organization’s hosting and storage providers End-to-end pilot passed; production ownership and security review remain
Personal remote Claude.ai and other cloud clients Adds a developer-owned host Test only; do not use for sensitive documents

The local server is the current recommendation. Claude.ai cannot connect to localhost or stdio; use Claude Desktop or Claude Code for the local option. Tool results still go to Claude for processing.

The local token file is plaintext JSON protected by Unix file permissions, not an OS keychain. Local execution removes the independent MCP host, but it does not protect against malware running as your user or an administrator.

Local quick start

npm test
npm run auth -- --client /path/to/desktop-oauth-client.json
claude mcp add --scope user google-docs-preview-local -- \
  node "$PWD/bin/docs-mcp-local.js"

The OAuth flow requests:

https://www.googleapis.com/auth/documents

This is the minimum scope for arbitrary document IDs, but Google classifies it as Sensitive and describes it as permission to see, edit, create, and delete all Google Docs documents. A drive.file design can narrow access to files a user explicitly selects, but it requires a Google Picker or per-file grant flow that this document-ID-only prototype does not implement.

See the complete setup guide before authorizing an account.

Organization connector

One Google Cloud project and OAuth app can serve the team. Staff do not create Cloud projects or handle credentials: a Claude Owner publishes the connector once, then each registered Preview tester clicks Connect and authorizes their own Google account. Read the staff onboarding guide, administrator runbook, and pilot result.

The pilot deployment is developer-owned. Move the deployment, Redis store, secrets and administration to 80,000 Hours accounts before approving confidential documents.

Repository map

api/        Vercel HTTP transport
bin/        Local authorization and stdio entrypoints
src/        Shared MCP and Google Docs logic
test/       Protocol, passthrough, and token-refresh tests
docs/       Setup, security analysis, evidence, and guide images
archive/    Superseded documents retained for context

docs/reproduce/ is the concise maintained path from decisive prompts through method, scripts, inputs, and checks to the current output.

Verification

npm test

The test suite covers the preview schema, complete request forwarding, Docs-only scope metadata, canonical remote origins, redirect rejection, local token refresh, file permissions, OAuth challenges, and stateless protocol methods. Claude.ai, Claude Code and Claude Desktop have each passed live reads. The Claude.ai organization pilot created and recovered an anchored comment, its reply and a real unresolved suggestion, then the Google Docs UI was inspected.

Security status

  • Local tokens are plaintext JSON stored outside the repository with mode 600.
  • Docs tool calls construct requests only for the fixed docs.googleapis.com origin; local OAuth separately contacts Google’s documented authorization and token endpoints.
  • Tool annotations mark writes as destructive, but approval behavior is enforced by the MCP client. Configure per-call approval for writes.
  • The remote uses separate MCP and Google tokens. Google grants are encrypted at rest; Claude never receives the Google refresh token.
  • The pilot proved one member’s flow. A second user and organizational unit have not been tested.
  • The pilot host and Redis resources are still developer-owned. Organization ownership, admin-led offboarding, rate limits, monitoring and security review remain.

Read SECURITY.md, the organization-owned deployment decision, and the full threat model. <!--/ai-->

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选