google-sheets-mcp
Allows reading, appending, and updating cells in Google Sheets.
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-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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Latest Blog Posts
- 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/prafulstha98/google-sheets-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server