
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 分