Skip to content
MCP server

MCP Gsheets

Read, write and format Google Sheets from an MCP client using a service account

Runs locally

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-gsheets

Add --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>"
      }
    }
  }
}

Claude Code setup guide

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.

Claude Desktop setup guide

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.

Cursor setup guide

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.

VS Code setup guide

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-gsheets

Or 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>" }

Codex setup guide

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.

    Gemini CLI and Antigravity setup guide

  • 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.

    Devin Desktop setup guide

  • 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.

    Cline setup guide

  • 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.

    Zed setup guide

  • 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.

    JetBrains AI Assistant and Junie setup guide

  • 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.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • GOOGLE_PROJECT_IDGoogle Cloud project IDRequired
  • GOOGLE_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.

How AIPoweredBot checks servers