MCP Gsheets
Read, write and format Google Sheets from an MCP client using a service account
MCP Gsheets is an MCP server for productivity. It runs locally on your machine and is started by your AI client.
- Platforms
- CLI
- Runs
- Locally
- Version
- 1.11.2
- Listing updated
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add mcp-gsheets --env GOOGLE_PROJECT_ID='<GOOGLE_PROJECT_ID>' --env GOOGLE_SERVICE_ACCOUNT_KEY='<GOOGLE_SERVICE_ACCOUNT_KEY>' --env GOOGLE_PRIVATE_KEY='<GOOGLE_PRIVATE_KEY>' -- npx -y mcp-gsheetsAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"mcp-gsheets": {
"command": "npx",
"args": [
"-y",
"mcp-gsheets"
],
"env": {
"GOOGLE_PROJECT_ID": "<GOOGLE_PROJECT_ID>",
"GOOGLE_SERVICE_ACCOUNT_KEY": "<GOOGLE_SERVICE_ACCOUNT_KEY>",
"GOOGLE_PRIVATE_KEY": "<GOOGLE_PRIVATE_KEY>"
}
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"mcp-gsheets": {
"command": "npx",
"args": [
"-y",
"mcp-gsheets"
],
"env": {
"GOOGLE_PROJECT_ID": "<GOOGLE_PROJECT_ID>",
"GOOGLE_SERVICE_ACCOUNT_KEY": "<GOOGLE_SERVICE_ACCOUNT_KEY>",
"GOOGLE_PRIVATE_KEY": "<GOOGLE_PRIVATE_KEY>"
}
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-gsheets": {
"command": "npx",
"args": [
"-y",
"mcp-gsheets"
],
"env": {
"GOOGLE_PROJECT_ID": "<GOOGLE_PROJECT_ID>",
"GOOGLE_SERVICE_ACCOUNT_KEY": "<GOOGLE_SERVICE_ACCOUNT_KEY>",
"GOOGLE_PRIVATE_KEY": "<GOOGLE_PRIVATE_KEY>"
}
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"mcp-gsheets": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-gsheets"
],
"env": {
"GOOGLE_PROJECT_ID": "<GOOGLE_PROJECT_ID>",
"GOOGLE_SERVICE_ACCOUNT_KEY": "<GOOGLE_SERVICE_ACCOUNT_KEY>",
"GOOGLE_PRIVATE_KEY": "<GOOGLE_PRIVATE_KEY>"
}
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add mcp-gsheets --env GOOGLE_PROJECT_ID='<GOOGLE_PROJECT_ID>' --env GOOGLE_SERVICE_ACCOUNT_KEY='<GOOGLE_SERVICE_ACCOUNT_KEY>' --env GOOGLE_PRIVATE_KEY='<GOOGLE_PRIVATE_KEY>' -- npx -y mcp-gsheetsOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.mcp-gsheets]
command = "npx"
args = ["-y", "mcp-gsheets"]
env = { GOOGLE_PROJECT_ID = "<GOOGLE_PROJECT_ID>", GOOGLE_SERVICE_ACCOUNT_KEY = "<GOOGLE_SERVICE_ACCOUNT_KEY>", GOOGLE_PRIVATE_KEY = "<GOOGLE_PRIVATE_KEY>" }Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"mcp-gsheets": {
"command": "npx",
"args": [
"-y",
"mcp-gsheets"
],
"env": {
"GOOGLE_PROJECT_ID": "<GOOGLE_PROJECT_ID>",
"GOOGLE_SERVICE_ACCOUNT_KEY": "<GOOGLE_SERVICE_ACCOUNT_KEY>",
"GOOGLE_PRIVATE_KEY": "<GOOGLE_PRIVATE_KEY>"
}
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "mcp-gsheets": { "command": "npx", "args": [ "-y", "mcp-gsheets" ], "env": { "GOOGLE_PROJECT_ID": "<GOOGLE_PROJECT_ID>", "GOOGLE_SERVICE_ACCOUNT_KEY": "<GOOGLE_SERVICE_ACCOUNT_KEY>", "GOOGLE_PRIVATE_KEY": "<GOOGLE_PRIVATE_KEY>" } } } }Or run: gemini mcp add -s user -e GOOGLE_PROJECT_ID='<GOOGLE_PROJECT_ID>' -e GOOGLE_SERVICE_ACCOUNT_KEY='<GOOGLE_SERVICE_ACCOUNT_KEY>' -e GOOGLE_PRIVATE_KEY='<GOOGLE_PRIVATE_KEY>' mcp-gsheets npx -- -y mcp-gsheets
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "mcp-gsheets": { "command": "npx", "args": [ "-y", "mcp-gsheets" ], "env": { "GOOGLE_PROJECT_ID": "<GOOGLE_PROJECT_ID>", "GOOGLE_SERVICE_ACCOUNT_KEY": "<GOOGLE_SERVICE_ACCOUNT_KEY>", "GOOGLE_PRIVATE_KEY": "<GOOGLE_PRIVATE_KEY>" } } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "mcp-gsheets": { "command": "npx", "args": [ "-y", "mcp-gsheets" ], "env": { "GOOGLE_PROJECT_ID": "<GOOGLE_PROJECT_ID>", "GOOGLE_SERVICE_ACCOUNT_KEY": "<GOOGLE_SERVICE_ACCOUNT_KEY>", "GOOGLE_PRIVATE_KEY": "<GOOGLE_PRIVATE_KEY>" } } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "mcp-gsheets": { "command": "npx", "args": [ "-y", "mcp-gsheets" ], "env": { "GOOGLE_PROJECT_ID": "<GOOGLE_PROJECT_ID>", "GOOGLE_SERVICE_ACCOUNT_KEY": "<GOOGLE_SERVICE_ACCOUNT_KEY>", "GOOGLE_PRIVATE_KEY": "<GOOGLE_PRIVATE_KEY>" } } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "mcp-gsheets": { "command": "npx", "args": [ "-y", "mcp-gsheets" ], "env": { "GOOGLE_PROJECT_ID": "<GOOGLE_PROJECT_ID>", "GOOGLE_SERVICE_ACCOUNT_KEY": "<GOOGLE_SERVICE_ACCOUNT_KEY>", "GOOGLE_PRIVATE_KEY": "<GOOGLE_PRIVATE_KEY>" } } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "mcp-gsheets": { "command": "npx", "args": [ "-y", "mcp-gsheets" ], "env": { "GOOGLE_PROJECT_ID": "<GOOGLE_PROJECT_ID>", "GOOGLE_SERVICE_ACCOUNT_KEY": "<GOOGLE_SERVICE_ACCOUNT_KEY>", "GOOGLE_PRIVATE_KEY": "<GOOGLE_PRIVATE_KEY>" } } } }The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.
Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "mcp-gsheets": { "command": "npx", "args": [ "-y", "mcp-gsheets" ], "env": { "GOOGLE_PROJECT_ID": "<GOOGLE_PROJECT_ID>", "GOOGLE_SERVICE_ACCOUNT_KEY": "<GOOGLE_SERVICE_ACCOUNT_KEY>", "GOOGLE_PRIVATE_KEY": "<GOOGLE_PRIVATE_KEY>" } } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "mcp-gsheets": { "command": "npx", "args": [ "-y", "mcp-gsheets" ], "env": { "GOOGLE_PROJECT_ID": "<GOOGLE_PROJECT_ID>", "GOOGLE_SERVICE_ACCOUNT_KEY": "<GOOGLE_SERVICE_ACCOUNT_KEY>", "GOOGLE_PRIVATE_KEY": "<GOOGLE_PRIVATE_KEY>" } } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
Configuration
GOOGLE_PROJECT_IDGoogle Cloud project IDRequiredGOOGLE_APPLICATION_CREDENTIALSPath to service account key JSON file (auth method 1)GOOGLE_SERVICE_ACCOUNT_KEYService account key as JSON string (auth method 2)GOOGLE_PRIVATE_KEYService account private key in PEM format (auth method 3)GOOGLE_CLIENT_EMAILService account email (auth method 3)
About MCP Gsheets
MCP Gsheets connects an assistant to the Google Sheets API through a Google Cloud service account, so it can only touch spreadsheets you have shared with that account's email as Editor. It runs locally over stdio via npx mcp-gsheets@latest and needs Node.js 22 or newer plus a Cloud project with the Sheets API enabled.
Three credential routes are supported: a path to a key file, the whole key as a JSON string for CI or containers, or just the private key and client email. The README describes batch operations, formatting, charts and conditional formatting alongside plain reads and writes, written in TypeScript with tests.
The README includes setup snippets for Claude Code, Claude Desktop, Cursor and Cline, plus an interactive npm run setup script for local builds.
What it does
- Service account access
- Limited to sheets shared with the service account email.
- Three credential options
- Key file, JSON string or private key plus client email.
- Batch operations
- Group several changes into one request.
- Formatting and charts
- Format cells, add charts and conditional formatting.
- Interactive setup script
- Detects Node and the Claude Desktop config for local builds.
Good for
- Let an assistant fill a tracking sheet from notes
- Reformat a report sheet with consistent styling
- Run bulk updates across many ranges
- Add charts to a data sheet on request
Pricing
Pricing unknown
Free npm package; licence not published
More servers for the same service
MCP Gsheets FAQ
What do I need on Google Cloud?
A project with the Google Sheets API enabled and a service account with a JSON key.
How do I give MCP Gsheets access to a sheet?
Share the sheet with the service account email and grant Editor permission.
Can I avoid a key file?
Yes, pass GOOGLE_SERVICE_ACCOUNT_KEY as a one-line JSON string, or GOOGLE_PRIVATE_KEY with GOOGLE_CLIENT_EMAIL.
Which Node.js version is required?
Node.js 22 or higher.
How do I add MCP Gsheets to Claude Code?
Run this command in your terminal: claude mcp add mcp-gsheets --env GOOGLE_PROJECT_ID='<GOOGLE_PROJECT_ID>' --env GOOGLE_SERVICE_ACCOUNT_KEY='<GOOGLE_SERVICE_ACCOUNT_KEY>' --env GOOGLE_PRIVATE_KEY='<GOOGLE_PRIVATE_KEY>' -- npx -y mcp-gsheets
What are the best alternatives to MCP Gsheets?
The closest alternatives to MCP Gsheets are Ha MCP, Concord MCP, Open Sunsama, Scholar Sidekick and Dayfile.app.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.
