google-drive-mcp
Google Drive MCP server that enables file management, conversion of spreadsheets to live Google Sheets, sharing, and downloading. Designed for collaborative review workflows.
README
google-drive-mcp
A Google Drive MCP server, mirroring the xero-mcp pattern (see ~/xero-mcp):
this service is the sole owner of a Google OAuth refresh token, hosted on Railway
behind a bearer token, exposed at /mcp for Claude Code / opencode, with a thin
Paperclip connector (see "Paperclip connector" below) proxying to it — so the OAuth
credential lives in exactly one place regardless of how many agents/platforms use it.
Primary use case this was built for: taking an already-filled .xlsx (e.g. from
xlsx-templater-mcp) and turning it into a live, collaboratively-editable Google
Sheet for human review/sign-off — without rebuilding the spreadsheet from scratch and
without losing the original file (the Sheet is a converted copy; the source .xlsx
stays wherever it already lives, e.g. Supabase Storage). See skills/xlsx-live-review/.
Tools
| Tool | Purpose |
|---|---|
list_files |
Search/list Drive files |
get_file |
Metadata for one file |
upload_and_convert_to_sheet |
The key tool — upload xlsx bytes, get back a live Google Sheet (webViewLink), optionally share it in the same call |
upload_file |
Upload bytes as-is, no conversion (e.g. a PDF) |
share_file |
Grant a role (reader/commenter/writer) to a user or "anyone with the link" |
download_file |
Raw bytes back, base64 |
export_sheet_to_xlsx |
Convert a (possibly human-edited) Sheet back to .xlsx bytes |
delete_file |
Permanent delete |
What this does NOT do
- It does not generate a spreadsheet from structured data (that's a different job —
Mila's
generate_*tools do that, from scratch, with no Excel support today; see the SES engagement notes on why Mila couldn't be used for register review). upload_and_convert_to_sheetconverts the file Drive receives — it is not a live two-way sync. If a human edits the Sheet, callexport_sheet_to_xlsxto pull the edited version back out as the new.xlsxof record.- Google's xlsx→Sheets conversion can flatten some Excel-only features (complex pivot
cache internals, certain conditional formatting). For a document where byte-exact
Excel fidelity is the whole point (e.g. an official government/utility program
template), keep the original
.xlsxas the system of record and treat the Sheet as a review copy, not a replacement.
Setup — REQUIRES a manual step (Google Cloud Console)
Unlike Railway (which has a scriptable signup/login flow), Google Cloud OAuth app creation needs a human in a browser. This cannot be fully self-served by an agent. Someone with access to a Google Cloud account needs to:
- Go to console.cloud.google.com → create (or pick) a project.
- APIs & Services → Enabled APIs → enable the "Google Drive API".
- APIs & Services → OAuth consent screen:
- User type: Internal (if using Google Workspace) or External.
- Scopes: add
https://www.googleapis.com/auth/drive.file(recommended — the app can only see files it creates/opens, not the whole Drive; broaden tohttps://www.googleapis.com/auth/driveonly if a workflow genuinely needs to browse/manage files it didn't create). - If "External" + "Testing" mode: refresh tokens expire after 7 days unless the
app is moved to "In production" (may need Google verification for sensitive
scopes —
drive.fileis non-sensitive and shouldn't require full verification).
- APIs & Services → Credentials → Create Credentials → OAuth client ID:
- Application type: Web application.
- Authorized redirect URI:
https://google-drive.mcp.soapbox.build/callback(or whatever this service's actual deployed domain is). - Save the Client ID and Client Secret.
- Deploy this service to Railway (
soapbox-mcpsproject, matchingxero-mcp/costing-mcp) with env vars:GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET— from step 4GOOGLE_REDIRECT_URI— must exactly match step 4's redirect URIMCP_AUTH_TOKEN— a random bearer token this service requires on/mcpDRIVE_TOKEN_FILE— defaults to/data/google_token.json; attach a Railway volume at/data(same asxero-mcp) so the token survives redeploys
- One-time consent (do this once, by a human, after deploy):
- Build the consent URL:
https://accounts.google.com/o/oauth2/v2/auth?client_id=<GOOGLE_CLIENT_ID>&redirect_uri=<GOOGLE_REDIRECT_URI>&response_type=code&scope=https://www.googleapis.com/auth/drive.file&access_type=offline&prompt=consent - Open it, sign in as whichever Google account should own the uploaded files, approve.
- Google redirects to
.../callback?code=...— append&key=<MCP_AUTH_TOKEN>to that URL before loading it (or the callback will only show you the code instead of storing it) — this guards against a stranger hijacking the connection by completing their own consent for this client_id. - On success you'll see "✅ Google Drive connection stored." The refresh token is
now persisted on the Railway volume; no
GOOGLE_REFRESH_TOKENenv var is needed going forward (it's only a fallback seed for first boot if the volume is empty).
- Build the consent URL:
Paperclip connector
Paperclip agents cannot consume external MCP servers directly (see
soapbox-plugin-design skill) — they need a thin proxy plugin, same pattern as
plugin-xero (vendored into soapboxbuild/paperclip, adapters/paperclip-xero).
Not yet built for this service — follow that same vendoring pattern
(adapters/paperclip-drive + an inject-paperclip-drive.sh + Dockerfile esbuild step)
when a Paperclip agent needs this, rather than duplicating the OAuth logic there.
Local dev
npm install
npm run dev # tsx src/index.ts, reads env vars from your shell
npm run build && npm start for the compiled path (what Railway actually runs).
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。