Google Sheets

io.github.domdomegg由 GitHub 帳號 domdomegg 發布v1.2.1更新於 Oct 24, 2026

Allow AI systems to read, write, and query spreadsheet data via Google Sheets.

已驗證STDIO僅桌面效率與工作流資料與分析

概覽

AI 產生的概覽

一個 MCP 伺服器,讓助理透過 Google Sheets API 讀取、寫入與查詢 Google 試算表資料。

可以做什麼
  • 檢視與建立試算表,包含中繼資料與工作表清單
  • 讀取單一或多個範圍的儲存格資料
  • 寫入、批次寫入、附加或清除儲存格資料
  • 在試算表中新增與刪除工作表(分頁)
  • 執行格式化、合併、篩選等進階批次操作
適用情境
適合讓助理直接依試算表資料回答問題、把報帳等紀錄附加到追蹤表,或讓試算表與其他工具保持同步。適用於需要直接讀寫 Google 試算表的工作流程。
執行需求
以 npm 套件 google-sheets-mcp 透過 stdio 在本機執行,或作為本機 HTTP 服務執行。需要 Google OAuth 憑證:GOOGLE_CLIENT_ID、GOOGLE_CLIENT_SECRET,以及具備 Sheets 權限範圍的 GOOGLE_ACCESS_TOKEN,另需設定 MCP_TRANSPORT。需要啟用 Sheets API 的 Google Cloud 專案,並設定 OAuth 同意畫面與重新導向 URI。
安裝前請注意
伺服器要求完整的試算表讀寫權限,助理可能覆寫、附加、清除或刪除試算表資料。它涉及 OAuth 機密(GOOGLE_CLIENT_SECRET、GOOGLE_ACCESS_TOKEN),並作為 OAuth 代理將憑證轉送至 Google,請妥善保管這些值。試算表內容會傳送至 Google Sheets API。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Google Sheets,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

google-sheets-mcp

MCP server for Google Sheets - read, write, and query spreadsheet data.

Use Cases

Data questions: "How many open deals are in the pipeline?" or "What's our total Q3 revenue?" → reads the spreadsheet and answers directly.

Quick expense entry: Snap a photo of a receipt → extracts the details and appends a row to your expense tracker.

Cross-tool status sync: "Check all our vendor Slack channels and update the tracking spreadsheet with their latest updates" → reads Slack, updates the sheet.

Data analysis: "Break down the Salesforce figures by region and compare against our events calendar" → pulls data from multiple sources into a spreadsheet for analysis.

(These are just examples - any workflow that needs spreadsheet data can use this. Use in combination with google-drive-mcp for finding files, deleting, comments, and sharing permissions.)

Setup

1. Create Google OAuth credentials

  1. Go to Google Cloud Console
  2. Create a new project (or use existing)
  3. Enable the Google Sheets API
  4. Go to APIs & Services → OAuth consent screen, set up consent screen
  5. Go to APIs & Services → Credentials → Create Credentials → OAuth client ID
  6. Choose Web application
  7. Add http://localhost:3000/callback to Authorized redirect URIs
  8. Note your Client ID and Client Secret

2. Run the server

bash
GOOGLE_CLIENT_ID='your-client-id' \GOOGLE_CLIENT_SECRET='your-client-secret' \MCP_TRANSPORT=http \npm start

The server runs on http://localhost:3000 by default. Change with PORT=3001.

3. Add to your MCP client

With the server running, follow the instructions on install-mcp, which generates the right config for your MCP client (Claude Code, Claude Desktop, Cursor, Cline, VS Code, and more).

Architecture

This server acts as an OAuth proxy to Google:

mermaid
graph LR    A[MCP client] <--> B[google-sheets-mcp] <--> C[Google OAuth/API]
  1. Server advertises itself as an OAuth authorization server via /.well-known/oauth-authorization-server
  2. /register returns the Google OAuth client credentials
  3. /authorize redirects to Google, encoding the client's callback URL in state
  4. /callback receives the code from Google and forwards to the client's callback
  5. /token proxies token requests to Google, injecting client credentials
  6. /mcp handles MCP requests, using the bearer token to call Google Sheets API

The server holds no tokens or state - it just proxies OAuth to Google.

Tools

ToolDescription
Spreadsheet
sheets_spreadsheet_getGet spreadsheet metadata (title, sheets list, optionally cell data)
sheets_spreadsheet_createCreate a new spreadsheet
Values
sheets_values_getRead cell values from a range
sheets_values_batch_getRead cell values from multiple ranges
sheets_values_updateWrite cell values to a range (overwrites)
sheets_values_batch_updateWrite cell values to multiple ranges
sheets_values_appendAppend rows after existing data
sheets_values_clearClear cell values from a range
Sheets (tabs)
sheets_sheets_listList all sheets in a spreadsheet
sheets_sheet_addAdd a new sheet (tab)
sheets_sheet_deleteDelete a sheet (tab)
Advanced
sheets_batch_updateExecute batch operations (formatting, merging, filters, etc.)

Google Sheets API Scope

  • spreadsheets - Full read/write access to spreadsheets

Contributing

Pull requests are welcomed on GitHub! To get started:

  1. Install Git and Node.js
  2. Clone the repository
  3. Install dependencies with npm install
  4. Run npm run test to run tests
  5. Build with npm run build

Releases

Versions follow the semantic versioning spec.

To release:

  1. Use npm version <major | minor | patch> to bump the version
  2. Run git push --follow-tags to push with tags
  3. Wait for GitHub Actions to publish to the NPM registry.

來源:README.md,提交 e604ee6

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.2.1最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。