
Google Sheets MCP Server
io.github.joshuawhite389由 GitHub 账号 joshuawhite389 发布v0.2.0更新于 Oct 26, 2026
Read and write Google Sheets with your own service account: list tabs, read, append, update, export.
概览
通过你自己的 Google 服务账号读写 Google 表格:列出工作表标签、读取区域、追加或更新行,并导出 Apify 数据集。
- 可以做什么
- 列出电子表格的工作表标签及其大小和链接
- 读取单元格区域或整个工作表,长工作表分页返回
- 追加行,按表头名称匹配对象字段,可选择跳过重复行
- 从左上角单元格开始覆盖写入,必要时扩展工作表
- 把 Apify 数据集写入工作表:追加、替换或仅写入新行
- 适用场景
- 适合让助手直接处理你已存放在 Google 表格中的数据,例如读取线索名单、追加抓取或生成的行,或把 Apify 数据集写入某个工作表。适合希望用服务账号而非 OAuth 应用的用户。
- 运行要求
- 可使用 Apify 托管的远程端点,或自行部署(需 Node.js 24 或更高版本)。需要两个请求头:Authorization 填 Apify API 令牌(仅托管版),X-Google-Service-Account-Key 填 base64 编码的 Google 服务账号 JSON 密钥。需启用 Google Sheets API,并把每个表格以编辑者身份共享给服务账号的 client_email。
安装
在 SourceWeft 中
- 打开 控制台中的 Google Sheets MCP Server,将其添加到工作区。
- 连接 Authorization token 凭据。它们会被私密存储,绝不会在公开页面上展示。
- 为需要使用其工具的对话启用该服务。
Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。
交给智能体安装
把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。
阅读 https://sourceweft.com/mcp/io.github.joshuawhite389%2Fgoogle-sheets-mcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。其他 MCP 客户端
把它添加到你客户端的 mcpServers 配置中。
{
"mcpServers": {
"google-sheets": {
"type": "http",
"url": "https://oldjard--google-sheets-mcp.apify.actor/mcp",
"headers": {
"Authorization": "Bearer <YOUR_TOKEN>"
}
}
}
}README
Google Sheets MCP Server
An MCP server that lets Claude, Cursor or any other MCP client read and write your Google Sheets: list a spreadsheet's tabs, read ranges, append or update rows, and export an Apify dataset to a tab.
It signs in with your own Google service account, so there's no shared quota, no OAuth app to approve, and nothing that expires. The service account can only open sheets you share with it.
Two ways to use it:
- Hosted on Apify (no install): apify.com/oldjard/google-sheets-mcp. Apify starts the server when your agent calls it and stops it when it goes quiet. It is paid per use, billed to your own Apify account (prices below).
- Self-hosted (free): clone this repo and run it yourself. Same code.
Tools
Values are written as plain values, never as formulas. One call reads or writes at most 5,000 rows. If a tool can't do something (sheet not shared, a wrong tab name, a missing key), it returns a plain-English fix, for example the exact email to share the sheet with.
Google setup (about 5 minutes, once)
You need a Google service account: a robot Google user that only gets access to the sheets you share with it. It's free, and Google asks for no billing details to use the Sheets API.
- Open console.cloud.google.com, create a project and select it.
- Open the Google Sheets API page and click Enable.
- IAM & Admin > Service Accounts > Create service account. Name it, skip the optional role step, click Done.
- Open the service account, Keys > Add key > Create new key > JSON. A
.jsonfile downloads. - Copy its
client_email. Share each Google Sheet your agent should use with that email as Editor. - Turn the key into one line of base64:
base64 -w0 key.json(on macOS:base64 -i key.json).
Some Google Workspace organizations block service-account keys. If step 4 says key creation is disabled by policy, use a personal Google account for the project; the sheet can live anywhere as long as it's shared with the email.
Connect: hosted on Apify
Use the URL https://oldjard--google-sheets-mcp.apify.actor/mcp with two headers. For Claude Code:
Other clients take the same URL and headers in their JSON config.
Pricing (hosted): $0.001 per successful tool call, $0.0004 per row that export_dataset writes. Failed calls,
header rows and rows skipped as duplicates are free. Each server start costs $0.00005. As with any Apify Standby Actor, Apify also bills the platform
usage of the run while your agent is connected and for a short idle period after (the server runs at 256 MB, so this
is a fraction of a cent per session). The key travels over HTTPS to your own run, is held in memory only, and is never
logged or stored.
Connect: self-hosted
Needs Node.js 24 or newer.
Then point your client at http://localhost:3000/mcp with the X-Google-Service-Account-Key header (no Apify token
needed; export_dataset then reads datasets from the local ./storage folder). The Dockerfile builds the same
server for Apify; to run it elsewhere, set APIFY_META_ORIGIN=STANDBY and ACTOR_WEB_SERVER_PORT.
Limits worth knowing
- Google allows 10 million cells per spreadsheet and 50,000 characters per cell.
- A service account gets Google's standard quota of 60 write requests per minute. Rate limits and Google hiccups are retried with backoff.
Development
Related
Dataset to Pinecone & Qdrant Vector Export (an Apify Actor, not an MCP server) chunks and embeds a scraped dataset into your own Pinecone or Qdrant index.
License
MIT
来源:README.md,提交 23b8707
工具
0版本历史
1- v0.2.0最新Oct 21, 2026
评分
已满足适用检查项的 85%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通必需25 分
- 已声明认证方式必需10 分
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分