google-sheets-mcp
Provides tools to read, write, format, and manage Google Sheets spreadsheets, including editing values, appending rows, managing tabs, applying formatting and borders, conditional formatting, data validation, sorting, find/replace, and raw batch updates.
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., "@google-sheets-mcpAdd Q3 revenue figures to the forecast spreadsheet"
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
MCP server for Google Sheets — read, write, format, and manage spreadsheets from Claude Code, Claude Desktop, Cursor, or any MCP client, using your own Google account via OAuth 2.0.
25 task-oriented tools designed for AI agents: A1 notation, flat inputs, actionable errors — plus a raw
batch_updateescape hatch for everything else.Minimal access: requests only the
spreadsheetsscope. No Drive access — you provide a spreadsheet URL or ID.Local-first: runs over stdio on your machine; tokens are cached locally with
0600permissions and auto-refreshed.
Setup
1. Create Google OAuth credentials (one time, ~5 minutes)
Go to Google Cloud Console and create (or pick) a project.
Enable the Google Sheets API: APIs & Services → Library → search "Google Sheets API" → Enable.
Configure the OAuth consent screen (APIs & Services → OAuth consent screen): choose External, fill in the required app fields, and add yourself as a user. Then — important — publish the app to Production (Audience → Publish app). Apps left in "Testing" issue tokens that expire every 7 days, forcing weekly re-auth. Publishing for personal use with this scope does not require Google verification.
Create credentials: APIs & Services → Credentials → Create credentials → OAuth client ID → application type Desktop app. Download the JSON.
Save the downloaded file to
~/.config/google-sheets-mcp/oauth-keys.json(or anywhere, pointingGOOGLE_SHEETS_OAUTH_PATHat it).
2. Build and authorize
git clone https://github.com/ethanratnofsky/google-sheets-mcp.git
cd google-sheets-mcp
npm install
npm run setupnpm run setup is interactive: it builds the project, walks you through the
credential steps above if needed (you point it at your downloaded OAuth JSON
and it installs it with safe permissions), opens the browser consent flow, and
prints the exact MCP client config for your machine. Already-completed steps
are skipped, so it's safe to re-run. (npm run auth re-runs just the consent
flow.)
3. Add to your MCP client
Claude Code:
claude mcp add google-sheets -- node /absolute/path/to/google-sheets-mcp/dist/index.jsClaude Desktop / Cursor (claude_desktop_config.json / mcp.json):
{
"mcpServers": {
"google-sheets": {
"command": "node",
"args": ["/absolute/path/to/google-sheets-mcp/dist/index.js"]
}
}
}Related MCP server: mcp-google-sheets
Configuration
Env var | Meaning | Default |
| Path to your OAuth client JSON |
|
| Where the granted token is cached |
|
Tools
Every tool accepts a spreadsheet ID or full URL. Ranges use A1 notation
(Sheet1!A2:D10); row/column positions are 1-based.
Tool | What it does |
| Read one or more ranges (formatted, raw, or formulas) |
| Overwrite a range; |
| Append rows to the end of a table |
| Clear values, keep formatting |
| Title, URL, and all tabs with sizes |
| New spreadsheet with optional named tabs |
| Tab management |
| Insert/delete rows or columns |
| Freeze header rows/columns |
| Set column width / row height, or auto-fit |
| Bold, colors, alignment, number formats, wrap |
| Borders: all, outer, or inner |
| Merge or unmerge |
| Highlight cells matching a condition |
| Read cell formatting, colors (as #RRGGBB hex), number formats, borders, and merges |
| List conditional-format rules with their indices |
| Delete a conditional-format rule by index |
| Sort by one or more columns |
| Find/replace in a range, sheet, or everywhere |
| Dropdowns and checkboxes |
| ⚠️ Raw Sheets API requests — charts, pivots, and anything else |
Formulas: writes default to USER_ENTERED, so any value starting with =
becomes a real formula — exactly as if typed into the sheet. Read them back
with valueRender: "FORMULA".
Quotas
The Sheets API allows 300 read and 300 write requests per minute per project by default, but also caps each user at 60 read and 60 write requests per minute — since this server runs as a single user, that per-user limit is the one you'll actually hit first. The server automatically retries rate-limited requests (3 attempts, exponential backoff).
Troubleshooting
"Not authenticated" — run
npm run auth.Re-auth required every 7 days — your OAuth consent screen is in "Testing" status; publish it to Production (Setup step 3).
"You don't have access to this spreadsheet" — the authorized Google account can't open that sheet; share it with that account.
Browser didn't open during auth — copy the printed URL manually.
Security
Your OAuth client JSON and tokens never leave your machine; the token file is written with
0600permissions.The server talks only to
sheets.googleapis.comand only with thespreadsheetsscope.Never commit
oauth-keys.jsonortoken.json(both are gitignored).
Contributing
See CONTRIBUTING.md. MIT licensed.
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
Connect AI assistants to Google Sheets through controlled tools for reading and updating rows.
SEO & marketing toolkit for AI agents: GA4, Search Console, AdSense, GTM, PageSpeed, Trends.
OAuth 2.1 short-link tools for AI agents with scoped tokens, approvals, audit logs, and revocation.
Connect AI agents to 1000+ apps with managed authentication and tool-calling.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to seamlessly interact with Google Sheets through secure OAuth 2.0 authentication. Supports reading, searching, updating spreadsheet data, and managing sheets with smart text replacement and batch operations.178MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to create, read, update, and manage Google Sheets data and structure using tools like create, listSheets, sheetData, updateCells, and shareSpreadsheet, supporting OAuth2 and service-account authentication.5,26818MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Google Sheets, performing operations like creating, reading, updating, and clearing spreadsheet data.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to read, write, and manage Google Sheets using the Google Sheets API v4.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/ethanratnofsky/google-sheets-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server