sheets-mcp
Allows reading, editing, and managing Google Sheets spreadsheets: list and create spreadsheets, read raw ranges or header-labelled records, find rows by value, and write, append, or clear data in tabs.
Click on "Install 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-mcpFind all rows in the Q3 Pipeline sheet where stage is Negotiation."
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
An MCP server that connects Claude — or any MCP client — to Google Sheets.
Ask in plain language, and the model reads and edits your spreadsheets directly:
"In my Q3 Pipeline sheet, find every deal marked
Negotiationand add a follow-up row to the Tasks tab for each one."
Built on the official MCP Python SDK (v2) and the Google Sheets API v4.
Why this exists
Most spreadsheet automation dies at the glue layer: a script that reads a sheet is easy, but a script that reads whatever sheet someone asks about is not. MCP moves that decision to the model. You expose a handful of well-described tools, and the client figures out which to call.
Two design choices worth knowing about:
read_recordsover raw grids. Handing a model a 2D array of strings wastes tokens and invites off-by-one errors.read_recordsuses the header row to return labelled objects, each tagged with its real sheet row number so a follow-up write lands in the right place.Read-only mode is enforced by registration, not by a check. With
SHEETS_MCP_READ_ONLY=true, the write tools are never registered, so the model cannot see them and cannot be talked into calling them.
Related MCP server: mcp-google-sheets
Tools
Tool | What it does |
| Lists accessible spreadsheets, newest first, optionally filtered by title. |
| Returns a spreadsheet's title, URL, and every tab with its dimensions. |
| Reads a raw grid from an A1 range. |
| Reads a tab as labelled records using a header row. Each record carries |
| Returns records whose named column matches a value (exact or substring). |
| Overwrites a range with the rows you supply. |
| Appends rows below the last used row. Overwrites nothing. |
| Clears values in a range, leaving formatting intact. |
| Creates a spreadsheet, optionally with named tabs, optionally shared with an email. |
| Adds a tab to an existing spreadsheet. |
The last five are omitted entirely in read-only mode.
Install
Requires Python 3.11+.
git clone https://github.com/niberdi01gold/sheets-mcp.git
cd sheets-mcp
pip install -e .Google setup (5 minutes)
A service account is the recommended path: no browser flow, no token to refresh, and it only ever sees the sheets you explicitly share with it.
In the Google Cloud Console, create a project.
Enable the Google Sheets API and the Google Drive API.
Go to IAM & Admin → Service Accounts, create one, then Keys → Add key → JSON. Save the file somewhere outside the repo.
Open the JSON and copy the
client_emailvalue.In Google Sheets, press Share on each spreadsheet you want the server to reach and paste that address (Viewer for read-only, Editor for writes).
Step 5 is the one people miss. A service account starts with access to nothing; sharing is what grants it.
Then point the server at the key:
cp .env.example .env
# set GOOGLE_SERVICE_ACCOUNT_FILE=/absolute/path/to/service-account.jsonUse this when you want the server to see everything you can see, without sharing sheets one by one. Create an OAuth client of type Desktop app, download the JSON, then:
export GOOGLE_OAUTH_CLIENT_FILE=/absolute/path/to/oauth-client.json
sheets-mcp auth # opens a browser once; caches a token at ~/.sheets-mcp/token.jsonThe server itself never opens a browser — it reads the cached token and fails with a clear message if there isn't one.
Connect it to a client
Claude Desktop
Edit claude_desktop_config.json (Settings → Developer → Edit Config):
{
"mcpServers": {
"sheets": {
"command": "sheets-mcp",
"env": {
"GOOGLE_SERVICE_ACCOUNT_FILE": "/absolute/path/to/service-account.json",
"SHEETS_MCP_READ_ONLY": "false"
}
}
}
}Use absolute paths. Claude Desktop launches the server in its own process and does not inherit your shell environment.
Claude Code
claude mcp add sheets -e GOOGLE_SERVICE_ACCOUNT_FILE=/absolute/path/to/service-account.json -- sheets-mcpMCP Inspector (for development)
mcp dev src/sheets_mcp/server.pyUsage examples
Once connected, these are the kinds of requests the tools are shaped for.
Read and summarise
Open the spreadsheet called "Monthly Expenses" and tell me which category grew the most between June and July.
The model calls list_spreadsheets → get_spreadsheet → read_records, then reasons over the labelled rows.
Append without clobbering
Add these three leads to the Leads tab: Acme (acme@example.com, cold), Globex (ops@globex.com, warm), Initech (hi@initech.com, cold).
Calls append_rows, which anchors below the last used row, so concurrent edits by a human do not get overwritten.
Targeted update
In the Inventory tab, find the row where SKU is TH-4410 and set its Stock column to 0.
Calls find_rows to get the record and its _row, then write_range on the single cell.
Build a new sheet from a conversation
Create a spreadsheet called "Q4 Content Calendar" with tabs for Blog, Email and Social, share it with me at nico@example.com, and fill the Blog tab with a header row.
Calls create_spreadsheet then write_range.
Configuration
Variable | Default | Purpose |
| — | Path to the service account JSON key. |
| — | The same key inlined, for hosts without a filesystem. |
| — | OAuth client secrets, for the user-account flow. |
|
| Where the cached OAuth token lives. |
|
| When true, only the read tools are registered. |
Credentials are resolved in the order listed above; the first one set wins.
Development
pip install -e ".[dev]"
pytest -q
ruff check .The tests run the real server in memory through the SDK's Client, with a fake Google client injected — no network, no credentials required.
Notes and limits
Reads use
FORMATTED_VALUE, so you get what a human sees in the cell, not the underlying float.create_spreadsheetunder a service account produces a file owned by that account. Passshare_withor it will be invisible in your Drive.Cell formatting, charts, and pivot tables are out of scope for now.
batchUpdatesupport is the obvious next addition.Very large tabs are read whole before slicing. Fine to a few thousand rows; range-limited reads would be the fix beyond that.
License
MIT — see LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Read and edit GA4, Search Console and Google Tag Manager from any MCP client. 29 tools.
Google Docs MCP Pack — read, create, and edit Google Docs via OAuth.
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides read-only access to Google Sheets data through OAuth 2.0 authentication, enabling users to retrieve spreadsheet metadata, list tabs, and read cell data using natural language queries.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to read, write, and manage Google Sheets spreadsheets through natural language commands, providing a bridge between MCP clients and the Google Sheets API.6061MIT
- AlicenseNot gradedqualityFmaintenanceEnables AI assistants to interact with Google Sheets for reading, writing, and managing spreadsheets through a set of MCP tools.MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for Google Sheets operations, enabling spreadsheet management including reading, writing, appending, creating, and searching sheets via natural language.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/niberdi01gold/sheets-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server