sheets-mcp
Provides tools for interacting with Google Sheets, including reading and writing cell values, batch value operations, appending rows, clearing ranges, creating spreadsheets, copying sheets, retrieving metadata, and applying raw formatting/update requests via the Google Sheets API v4.
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., "@sheets-mcpRead the values from Sheet1 cells A1 to C10"
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.
sheets-mcp
MCP server exposing the Google Sheets API v4 (read/write cell values, batch value operations, create spreadsheets, copy sheets, raw batch formatting updates) over stdio, authenticated as a single Google user via OAuth 2.0.
One-time setup
1. Create a Google Cloud project
Go to https://console.cloud.google.com/projectcreate and create a project (or pick an existing one).
2. Enable the Google Sheets API
In your project, go to APIs & Services > Library, search for "Google Sheets API", and click Enable.
3. Configure the OAuth consent screen
Go to APIs & Services > OAuth consent screen.
User type: Internal if your Google Workspace admin allows it (simplest), otherwise External.
Fill in the required app name/support email fields.
Add your Google account as a test user if the app is in "Testing" publish status (External apps stay in Testing indefinitely for personal/internal use without Google's review — just re-consent every 7 days, or use Internal to avoid that entirely).
4. Create an OAuth 2.0 Client ID (Desktop app)
Go to APIs & Services > Credentials > Create Credentials > OAuth client ID.
Application type: Desktop app.
Give it any name (e.g. "sheets-mcp").
Click Create, then Download JSON.
5. Install the credentials
Save the downloaded file as credentials.json in this project's root directory:
mv ~/Downloads/client_secret_*.json /path/to/sheets-mcp/credentials.json6. Install dependencies and build
npm install
npm run build7. First run — one-time browser consent
node build/index.jsThe first run opens your default browser to Google's consent screen. Approve
access. After approval, a token.json file is created in the project root
(mode 0600) — subsequent runs use it silently without opening a browser
again, refreshing automatically as needed.
Related MCP server: Google Sheets MCP Server
Usage
Point your MCP client (e.g. Claude Code) at node /path/to/sheets-mcp/build/index.js as a stdio MCP server:
claude mcp add sheets --scope user -- node "/path/to/sheets-mcp/build/index.js"Tools
Tool | Description |
| Read cell values from an A1-notation range, with control over |
| Read multiple A1-notation ranges in one call |
| Overwrite cell values in a range |
| Overwrite cell values across multiple ranges in one call |
| Append row(s) after the last row with data |
| Clear cell contents without deleting the sheet |
| Clear cell contents across multiple ranges in one call |
| Create a new spreadsheet, optionally with named tabs |
| Get title, sheet names/IDs/dimensions; optionally full grid data (formatting, validation, merges) via |
| Copy a sheet/tab into another spreadsheet |
| Apply raw Sheets API |
Anything not covered by a dedicated tool (sort, find/replace, charts,
conditional formatting, data validation, named ranges, protected ranges,
pivot tables, merges) is reachable through batch_update's raw request
passthrough — see the Sheets API Request reference.
Security notes
OAuth scope is the minimal
https://www.googleapis.com/auth/spreadsheets— no broader Drive access is requested.credentials.jsonandtoken.jsonare gitignored and never committed;token.jsonpermissions are (re-)set to0600on every write, including overwrites of a pre-existing file.All dynamic path segments (spreadsheet IDs, sheet IDs, A1 ranges) are
encodeURIComponent-escaped before being placed in request URLs.batch_updateis annotateddestructiveHint: truesince its raw request objects can delete sheets, named ranges, or overwrite data — MCP clients should gate it accordingly.The one-time OAuth consent callback server (
src/auth.ts) binds explicitly to127.0.0.1, not all interfaces — it's implemented in-repo rather than via@google-cloud/local-auth, whose equivalent server bound to0.0.0.0, briefly exposing the callback endpoint to other hosts on the same network during first-run consent.Requests to the Sheets API have a 30s timeout and don't retry non-idempotent POSTs (
append_row,create_spreadsheet,copy_sheet_to,batch_update) on network error, to avoid double-executing a request whose response was simply lost in transit.
Testing
npm testAll tests run offline against mocked HTTP responses — no real Google credentials or network access required.
This server cannot be deployed
Maintenance
Related MCP Connectors
Query your Google Sheets as structured JSON: list sheets and tabs, read schemas, filter rows.
Connect AI assistants to Google Sheets through controlled tools for reading and updating rows.
Streamable HTTP MCP server for Google Calendar and Sheets with OAuth login.
- SiglataOAuthcom.siglata
Manage Siglata org files, folders, grants, members, invitations, sessions via CallScript over OAuth.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables comprehensive interaction with Google Sheets and Google Drive through OAuth2 authentication. Supports spreadsheet creation, data manipulation, formatting, chart creation, and advanced operations like SQL queries and batch updates.-
- FlicenseNot gradedqualityDmaintenanceProvides tools to read, write, append, and create Google Sheets via MCP, using OAuth2 authentication shared with gmail_mcp.-
- AlicenseNot gradedqualityCmaintenanceEnables Claude to read and edit individual cells and ranges in Google Sheets via a local stdio server, authenticating as the user with a one-time Google sign-in.MIT
- AlicenseBqualityBmaintenanceProvides tools for reading, modifying, and analyzing Google Sheets, as well as searching and managing Google Drive spreadsheets with access control.25MIT