google-sheets-mcp
Enables reading data, editing cells, appending rows, inserting/deleting rows and columns, filling formulas, formatting cells, finding and replacing, managing tabs, and performing batch updates on Google Sheets spreadsheets.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@google-sheets-mcp Update the inventory sheet: set stock of SKU-123 to 45."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Google Sheets MCP
An MCP server that lets Claude work with your Google Sheets in place — no more "here's a new spreadsheet" every time.
Read data, edit cells inline with natural language, append rows, insert/delete rows and columns, fill formulas, format cells, and find & replace — all against the sheet you already have open.
Runs two ways from one codebase:
Local — a
.mcpbdesktop extension for Claude Desktop and local Cowork sessions.Remote — a Cloudflare Worker you add as a custom connector, which also works in cloud Cowork sessions, claude.ai on the web, and mobile.
Built on the MCP TypeScript SDK v2
(2026-07-28 spec) and the Google Sheets API v4, with no Google SDK dependency — just
fetch and WebCrypto, so the same code runs on Node and in V8 isolates.
Tools
Tool | What it does |
| List/search your spreadsheets, most recent first |
| Spreadsheet title, tabs, and grid sizes |
| Read values, raw values, or formulas from a range |
| Overwrite a range in place ( |
| Append rows after the last row of data |
| Clear values (keeps formatting) |
| Fill one formula across a range with relative references adjusting |
| Insert blank rows/columns at a position |
| Delete entire rows/columns |
| Manage tabs |
| Bold, colors, alignment, wrap, number formats |
| Find & replace across a sheet or the whole file |
| Raw Sheets API batchUpdate escape hatch (charts, merges, validation, …) |
Spreadsheet IDs can be given as bare IDs or full Google Sheets URLs. Rows are 1-based numbers and columns are letters, exactly as in the Sheets UI.
Related MCP server: Claude Google Sheets MCP Server
1. Google Cloud credentials (one-time, needed either way)
In Google Cloud Console, create or pick a project.
Enable the Google Sheets API and Google Drive API.
APIs & Services → OAuth consent screen: set it up, add yourself under Test users. Then click Publish app. This does not require Google's verification review — personal-use apps (under 100 known users) are exempt; you just click through an "unverified app" warning once during authorization. Publishing matters because while the app sits in Testing, Google revokes refresh tokens every 7 days. The local extension recovers automatically by re-opening the browser, but a remote deployment needs a manual re-mint each time.
APIs & Services → Credentials → Create Credentials → OAuth client ID → Desktop app. Save the Client ID and Client Secret.
The Sheets and Drive APIs are free to use, and this project never needs a Cloud billing account attached. Leaving billing unattached is the simplest guarantee against charges.
2a. Local install (Claude Desktop / local Cowork sessions)
npm install
npm run pack # builds and produces google-sheets.mcpb (~1.7 MB)Double-click google-sheets.mcpb, or Claude Desktop → Settings → Extensions →
Install Extension…. Paste your Client ID and Secret into the extension settings.
On first use a browser opens to authorize; the refresh token is cached at
~/.config/google-sheets-mcp/token.json.
The extension asks only for OAuth credentials. Service-account auth is still
supported when running the server directly or remotely — set
GOOGLE_SERVICE_ACCOUNT_KEY_FILE or GOOGLE_SERVICE_ACCOUNT_KEY in the
environment instead.
Local MCP servers do not run in cloud Cowork sessions or on claude.ai — for those, use the remote deployment below.
2b. Remote install (cloud Cowork sessions, web, mobile)
Mint a refresh token — this runs the same browser consent flow and prints a long-lived token for the server to use:
GOOGLE_OAUTH_CLIENT_ID=…apps.googleusercontent.com \
GOOGLE_OAUTH_CLIENT_SECRET=… \
npm run mint-tokenPick a bearer token. This is the shared secret Claude must present on every request:
node -e "console.log(require('crypto').randomBytes(32).toString('base64url'))"Deploy to Cloudflare Workers (free tier is plenty; the Worker is ~174 KB gzipped):
npx wrangler login
npx wrangler secret put MCP_BEARER_TOKEN # the value you just generated
npx wrangler secret put GOOGLE_OAUTH_CLIENT_ID
npx wrangler secret put GOOGLE_OAUTH_CLIENT_SECRET
npx wrangler secret put GOOGLE_REFRESH_TOKEN # from mint-token
npm run deployWrangler prints a URL like https://google-sheets-mcp.<you>.workers.dev. Verify it with
curl https://…/health — it should return ok.
Add it to Claude: Settings → Connectors → Add custom connector.
If your Add-connector dialog has a Request headers section (beta, gradual rollout): URL
https://google-sheets-mcp.<you>.workers.dev/mcpwith headerauthorization: Bearer <your MCP_BEARER_TOKEN>.If it doesn't, put the token in the URL path instead:
https://google-sheets-mcp.<you>.workers.dev/mcp/<your MCP_BEARER_TOKEN>.
Security notes
The endpoint is public, so the bearer token is the only thing standing between the internet and your spreadsheets. Use a long random value and treat it like a password.
Auth fails closed: if
MCP_BEARER_TOKENis unset, every request to/mcpis rejected with 401 rather than running unauthenticated.Token comparison is constant-time, so the secret can't be recovered by timing.
GOOGLE_REFRESH_TOKENgrants access to every spreadsheet your account can open. To narrow that, use a service account instead (GOOGLE_SERVICE_ACCOUNT_KEY, inline JSON) and share only specific sheets with its email address.To revoke everything at once: myaccount.google.com/permissions.
Configuration reference
Env var / secret | Purpose |
| OAuth client (both modes) |
| Pre-minted refresh token (required for remote) |
| Inline service-account JSON (alternative to OAuth) |
| Path to a service-account key (local only) |
| Shared secret required by the remote endpoint |
| Override the local token cache location |
Scopes: spreadsheets (read/write) + drive.metadata.readonly (list/search files).
Development
npm install
npm run build # compile to dist/
npm run typecheck # tsc --noEmit
npm run pack # build + package the .mcpb bundle
npm run dev:worker # run the Worker locally via wrangler
npm run deploy # deploy the Workersrc/
index.ts stdio entry point (local)
worker.ts Cloudflare Worker entry (remote) + bearer auth
server.ts server factory: registers all tool groups
config.ts credentials → token provider, shared by both entries
google/
auth.ts fetch + WebCrypto token providers (refresh token, service account)
client.ts REST client for the Sheets/Drive endpoints used
types.ts minimal API types
node/
localOAuth.ts Node-only desktop OAuth loopback flow
mintToken.ts CLI to print a refresh token for remote deploys
tools/ one module per tool group (read, write, structure, format, advanced)
utils/ A1-notation parsing, tool result/error helpersAvailable Tools
16 toolsadd_sheetAdd a sheet (tab)C
Add a new sheet (tab) to an existing spreadsheet.
Inputs: title (required), spreadsheetId (required), rows, columns.
append_rowsAppend rowsA
Append rows after the last row of data in a sheet (or of the table containing range). Strings starting with '=' become formulas.
Inputs: values (required), spreadsheetId (required), range, sheet.
batch_updateRaw batch update (advanced)A
Escape hatch: apply raw Google Sheets API batchUpdate requests (charts, conditional formatting, merges, data validation, sorting — anything the API supports). Each item is one request object from the Sheets API v4 batchUpdate schema.
Inputs: requests (required), spreadsheetId (required).
clear_rangeClear a rangeA
Clear cell values in a range (formatting is kept). To remove rows or columns entirely, use delete_rows / delete_columns instead.
Inputs: range (required), spreadsheetId (required), sheet.
delete_columnsDelete columnsADestructive
Delete entire columns, shifting the columns to the right left. This removes the columns themselves, not just their values.
Inputs: startColumn (required), spreadsheetId (required), count, sheet.
delete_rowsDelete rowsADestructive
Delete entire rows, shifting the rows below up. This removes the rows themselves, not just their values.
Inputs: startRow (required), spreadsheetId (required), count, sheet.
delete_sheetDelete a sheet (tab)BDestructive
Delete a sheet (tab) and all of its data from a spreadsheet.
Inputs: sheet (required), spreadsheetId (required).
fill_formulaFill a formula across a rangeA
Write one formula into every cell of a range, with relative references adjusting per cell (like dragging the fill handle). For a formula in a single cell, update_cells works too.
Inputs: range (required), formula (required), spreadsheetId (required), sheet.
find_replaceFind and replaceC
Find and replace text across a sheet or the whole spreadsheet. Can also search inside formulas.
Inputs: find (required), replacement (required), spreadsheetId (required), sheet, +4 more.
format_cellsFormat cellsB
Apply formatting to a range: bold/italic, font size, text and background color, alignment, wrapping, and number format. Only the options you pass are changed.
Inputs: range (required), spreadsheetId (required), bold, wrap, +7 more.
get_spreadsheet_infoGet spreadsheet infoARead-only
Get a spreadsheet's title and its sheets (tabs) with their IDs and grid sizes. Call this before structural edits to see what sheets exist.
Inputs: spreadsheetId (required).
insert_columnsInsert columnsA
Insert blank columns at a position, shifting existing columns right. Existing formulas and references adjust automatically.
Inputs: startColumn (required), spreadsheetId (required), count, sheet, +1 more.
insert_rowsInsert rowsA
Insert blank rows at a position, shifting existing rows down. Existing formulas and references adjust automatically.
Inputs: startRow (required), spreadsheetId (required), count, sheet, +1 more.
list_spreadsheetsList spreadsheetsARead-only
List Google Sheets spreadsheets the authorized account can access, most recently modified first. Optionally filter by name.
Inputs: limit, nameContains.
read_rangeRead a rangeARead-only
Read cell values from a sheet. Omit range to read the whole sheet. Use render 'formula' to see the formulas behind cells.
Inputs: spreadsheetId (required), range, sheet, render.
update_cellsUpdate cellsA
Write values into a range in place, overwriting existing cells. Values are parsed as if typed in the Sheets UI, so strings starting with '=' become formulas, and dates/numbers are recognized.
Inputs: range (required), values (required), spreadsheetId (required), sheet, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Tools are separated by both resource and action: listing spreadsheets vs. inspecting structure vs. reading values, and writing (update_cells), appending (append_rows), and filling (fill_formula) are explicitly distinguished in the descriptions. The main soft spot is batch_update, which overlaps with nearly every other tool, though it is clearly framed as a raw API escape hatch.
Every tool follows a consistent snake_case verb_noun pattern (read_range, update_cells, insert_rows, delete_columns, format_cells, find_replace). Verbs are used consistently per action type and no camelCase or vague verbs appear.
16 tools is on the high side but each maps to a distinct Sheets operation, with structural edits (row/column/sheet insert/delete) legitimately multiplying the count. Nothing feels redundant except the deliberate batch_update catch-all, which earns its place as an escape hatch.
The surface covers reading, writing, appending, clearing, structural row/column/sheet edits, formatting, find/replace, and a raw API escape hatch — enough for most lifecycle workflows. Gaps remain at the spreadsheet level: no create_spreadsheet, delete_spreadsheet, or rename/duplicate sheet, which batch_update cannot compensate for.
Related MCP Connectors
Hosted Google Sheets MCP server, with each action switched on or off per account.
Hosted BigQuery MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Hosted Airtable MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseBqualityBmaintenanceMCP server for Google Sheets - Read, write and manipulate spreadsheets through Claude Desktop445,724 npm106MIT
- AlicenseNot gradedqualityDmaintenanceA comprehensive MCP server for Google Sheets integration with Claude, enabling spreadsheet discovery, data manipulation, and formatting through natural language commands and slash commands.19MIT
- AlicenseBqualityDmaintenanceAn MCP server that enables Claude to interact with Google Sheets via the SheetsDB API, supporting CRUD operations and smart data addition.6MIT
- FlicenseNot gradedqualityDmaintenanceA remote MCP server that lets Claude edit existing Google Docs and Sheets, supporting search, replace, append, and insert operations for Docs, and search, update, and append rows for Sheets.-