google-sheets-mcp
Allows reading, appending, and updating cells in Google Sheets.
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-mcpRead all data from Sheet1"
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 for Claude.ai
Connect Claude.ai to your Google Sheets via a custom MCP (Model Context Protocol) server hosted on Vercel. Once set up, Claude can read, append, and update your spreadsheet directly from the chat.
What you get
read_sheet— read any range from your sheetappend_row— add a new rowupdate_cell— update a specific cell
Related MCP server: Google Sheets MCP Server
Prerequisites
A Vercel account
A Google Cloud account
A Google Sheet you want Claude to access
Node.js 18+ installed locally
Git
Step 1 — Clone and install
git clone <your-repo-url>
cd custom_mcp
npm installStep 2 — Create a Google Cloud OAuth app
Go to Google Cloud Console
Create a new project (or use existing)
Go to APIs & Services → Enable APIs → enable Google Sheets API
Go to APIs & Services → Credentials → Create Credentials → OAuth 2.0 Client ID
Application type: Web application
Name it (e.g.
Claude MCP)Under Authorized redirect URIs add:
https://YOUR-VERCEL-APP.vercel.app/oauth/google/callbackReplace
YOUR-VERCEL-APPwith your actual Vercel app name.Click Save — copy the Client ID and Client Secret
⚠️ Make sure the redirect URI matches your Vercel deployment URL exactly — no trailing slash, must be
https.
Step 3 — Configure OAuth consent screen
Go to APIs & Services → OAuth consent screen
User type: External
Fill in app name, support email
Add scope:
https://www.googleapis.com/auth/spreadsheetsUnder Audience → Test users add your Gmail address
Click Publish app → Confirm
⚠️ You must publish the app (even unverified) or Google will block the login. When you see the "unverified app" warning during login, click Advanced → Go to app.
Step 4 — Deploy to Vercel
Option A — Via Vercel CLI
npm install -g vercel
vercel login
vercel --prodOption B — Via GitHub
Push to GitHub → import project in Vercel dashboard → it auto-deploys.
Step 5 — Set environment variables in Vercel
Go to Vercel Dashboard → Your Project → Settings → Environment Variables and add:
JWT secret is a private random string only your server knows — it's used to sign and verify tokens so Claude can't be impersonated. It must be at least 32 characters, completely random, and never shared or committed to Git. Generate one with:
bashnode -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
This outputs 64 random hex characters like a3f8c2... — copy that output directly as your JWT_SECRET value in Vercel. Never use a human-readable phrase like "mysecret123" — it's trivially guessable.|
Variable | Value |
| From Google Cloud Console OAuth client |
| From Google Cloud Console OAuth client |
|
|
| A long random string (generate below) |
| Your Google Sheet ID (from the URL) |
Generate a secure JWT secret:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"Get your Spreadsheet ID from the sheet URL:
https://docs.google.com/spreadsheets/d/SPREADSHEET_ID_IS_HERE/edit⚠️ After adding env vars, you must redeploy for them to take effect:
vercel --prod
Step 6 — Verify deployment
Hit your health endpoint:
https://YOUR-VERCEL-APP.vercel.app/healthShould return:
{ "status": "ok", "message": "Google Sheets MCP OAuth Server" }Step 7 — Connect to Claude.ai
Go to claude.ai → Settings → Connectors
Click Add connector
Enter:
Name:
Google Sheets MCPURL:
https://YOUR-VERCEL-APP.vercel.app
Click Connect
Google login screen appears → sign in with the account you whitelisted
Authorize the Sheets scope
Done — Claude now has access to your sheet ✅
Usage examples
Once connected, just ask Claude naturally:
Read the data in Sheet1!A1:D10Append a row with ["John", "Doe", "john@example.com"] to Sheet1!A:ZUpdate cell Sheet1!B3 to "Completed"Project structure
├── api/
│ └── oauth.cjs ← Main server (Vercel entry point)
├── public/
│ └── index.html ← Dashboard UI
├── vercel.json ← Vercel routing config
└── package.jsonHow it works
Claude.ai → POST / (tools/list) → Your Vercel server → returns tool definitions
Claude.ai → GET /oauth/authorize → Redirects to Google login
Google → GET /oauth/google/callback → Issues JWT token back to Claude
Claude.ai → POST / (tools/call) + JWT → Your server → Google Sheets API → dataTroubleshooting
500 FUNCTION_INVOCATION_FAILED
Your package.json likely has "type": "module" — remove it. The server uses CommonJS (require).
"This connector has no tools available"
The tools/list method is behind auth middleware. Make sure it's handled in the unauthenticated first handler.
Error 400: redirect_uri_mismatch
Check
GOOGLE_REDIRECT_URIin Vercel matches exactly what's registered in Google ConsoleMake sure you're using the OAuth Client ID, not a service account ID
Publish your OAuth app in Google Console (Testing mode blocks logins)
"Authorization with the MCP server failed" Disconnect and reconnect the Claude connector to force a fresh token. Cached tokens from failed attempts won't work.
POST returning 404
All JSON-RPC errors must return HTTP 200, not 404. Check that unknown methods return res.status(200).json(...).
Security notes
Change
MCP_API_KEYfrom any placeholder value before sharing the deploymentJWT_SECRETshould be at least 32 random charactersThe Spreadsheet ID and OAuth credentials are tied to your Vercel deployment — don't commit
.envfilesFor production use, replace in-memory
pkceStore/tokenStoreMaps with a database (Redis, Upstash, etc.) — they reset on cold starts
License
MIT
Available Tools
3 toolsappend_rowB
Append a row to a Google Sheet
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | Sheet range (e.g., "Sheet1!A:Z") | |
| values | Yes | Array of values for the row |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description must cover behavioral traits. It does not disclose error conditions, permissions required, idempotency, or what happens if the sheet is empty. Only states the operation without depth.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise single sentence with no wasted words. Appropriate for a simple tool with minimal parameters.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and no annotations, the description is insufficient. It lacks information about return values, error handling, and operational behavior, making it incomplete for an agent to invoke confidently.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline 3. The description adds no extra meaning beyond the schema's parameter descriptions. 'range' and 'values' are already defined in the input schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Append a row to a Google Sheet' uses a specific verb (append) and resource (row to Google Sheet), clearly distinguishing from siblings 'read_sheet' and 'update_cell'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like 'update_cell' for modifying existing rows or 'read_sheet' for reading. The description lacks any context for decision-making.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_sheetC
Read data from a Google Sheet
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | Sheet range (e.g., "Sheet1!A1:B10") |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations present, the description bears the full burden of behavioral disclosure. It only states 'Read data from a Google Sheet', which is a basic functional description. It does not mention safety, idempotency, rate limits, error behavior, or any other behavioral traits. For a read operation, minimal disclosure is acceptable, but it still falls short of providing useful behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that front-loads the purpose. It is efficient with no wasted words. However, it is somewhat minimal and could benefit from including sibling differentiation or a hint about the output format without losing conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity of the tool (one parameter, no output schema), the description adequately explains what the tool does but lacks completeness in describing the output. It does not mention what the returned data looks like (e.g., an array of rows/values), which is important since there is no output schema. The description also omits any usage context like typical use cases or prerequisites.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with a single 'range' parameter that has a clear description and example ('Sheet1!A1:B10'). The tool description does not add any additional parameter information beyond what the schema provides. Baseline 3 is appropriate since the schema already does its job.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Read' and the resource 'Google Sheet', effectively conveying the tool's purpose. It distinguishes from sibling tools 'append_row' and 'update_cell' which are write operations. However, it could be more precise by explicitly mentioning that it reads from a specified range, as indicated by the required 'range' parameter.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance is provided on when to use this tool versus alternatives. While the name and description imply it's for reading, and siblings handle writing, the description lacks direct statements of when/when-not to use it, nor does it mention exclusions or prerequisites. The agent must infer usage from context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_cellB
Update a specific cell in a Google Sheet
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | Cell range (e.g., "Sheet1!A1") | |
| value | Yes | Value to set |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It merely states 'Update' without explaining consequences like overwriting, idempotency, error handling, or required permissions. This is insufficient for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that conveys the core functionality without wasted words. It is appropriately concise for a simple tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity, the description adequately explains the basic operation. However, the absence of behavioral transparency (e.g., confirmation of overwrite) and no output schema leaves some gaps for an agent to confidently use the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already provides 100% coverage with descriptions for both parameters ('range' and 'value'). The description adds no additional semantic value beyond the schema, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Update') and the resource ('a specific cell in a Google Sheet'), making the tool's purpose instantly understandable. It differentiates from sibling tools like 'append_row' and 'read_sheet' by focusing on updating a single cell.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. The sibling tools are listed but not compared, leaving the agent to infer usage context without explicit direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v1.0.0- First observed
append_row - First observed
read_sheet - First observed
update_cell
TDQS
Scored across 3 tools
Each tool targets a distinct operation: appending a row, reading a sheet, and updating a cell. There is no overlap in functionality, making it clear to an agent which tool to select.
All tool names follow the consistent verb_noun pattern: append_row, read_sheet, update_cell. This makes the set predictable and easy to understand.
With 3 tools, the set is slightly lean but still reasonable for basic Google Sheets operations. It covers create (append), read, and update, but lacks a delete operation, which is a minor shortfall.
The set covers core CRUD operations except delete, and lacks ability to create or delete sheets themselves. Agents may need additional functionality for full lifecycle management, indicating notable gaps.
Maintenance
Related MCP Connectors
Give Claude only the Google Drive files you choose. Every action logged.
Multiple Google accounts (Gmail, Calendar, Drive, Contacts, Tasks) in one Claude connector.
GA4, Google Ads and Search Console in Claude. Read-only OAuth, multi-account for agencies.
Personal CRM for Claude. Contacts live as plain-text files in your own Google Drive.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables Claude Desktop to interact with Google Sheets through the Sheeter API, allowing users to create, read, write, update, and analyze spreadsheet data through natural language conversations.-
- AlicenseNot gradedqualityDmaintenanceEnables Claude to read, write, append, and clear data in Google Sheets directly using a Google Cloud Service Account. It provides tools for real-time spreadsheet interaction, including fetching sheet metadata and managing cell ranges through simple commands.453 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables Claude to read, write, append, create, and clear Google Sheets data using natural language.-
- AlicenseNot gradedqualityBmaintenanceEnables Claude Desktop to read, write, and manage Google Sheets through natural language conversation using the Model Context Protocol.7 npmMIT