Google Sheets

v2.6.5
io.github.mcp-z/mcp-sheets Checked 1 hour ago Published 8 days ago

Google Sheets integration with OAuth, spreadsheet management, batch operations, and formatting

Values you need

VariableWhat it is
GOOGLE_CLIENT_IDrequired Google OAuth client ID (required for OAuth authentication modes)
GOOGLE_CLIENT_SECREToptional secret Google OAuth client secret (optional for public clients)
GOOGLE_SERVICE_ACCOUNT_KEY_FILEoptional Path to service account JSON key file (required for service-account auth mode)
AUTH_MODEoptional Authentication mode
HEADLESSoptional Disable browser auto-open, return auth URL instead (true/false) Default: false
REDIRECT_URIoptional OAuth redirect URI (optional, default: ephemeral loopback)
RESOURCE_STORE_URIoptional Resource store URI for exported files (file://). Default: .mcp-z/mcp-sheets/files beside the nearest .mcp.json, else ~/.mcp-z/mcp-sheets/files
PORToptional HTTP server port (overrides --port)
BASE_URLoptional Base URL for HTTP transport (used for OAuth/DCR endpoints and file links)
LOG_LEVELoptional Logging level

npm (npx) verified

Requires Node.js 18+

Run in a terminal
claude mcp add mcp-sheets -e 'GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID>' -- npx -y @mcp-z/mcp-sheets@2.6.5
Add to claude_desktop_config.json
{
  "mcpServers": {
    "mcp-sheets": {
      "args": [
        "-y",
        "@mcp-z/mcp-sheets@2.6.5"
      ],
      "command": "npx",
      "env": {
        "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "mcp-sheets": {
      "args": [
        "-y",
        "@mcp-z/mcp-sheets@2.6.5"
      ],
      "command": "npx",
      "env": {
        "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "GOOGLE_CLIENT_ID",
      "id": "google-client-id",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "mcp-sheets": {
      "args": [
        "-y",
        "@mcp-z/mcp-sheets@2.6.5"
      ],
      "command": "npx",
      "env": {
        "GOOGLE_CLIENT_ID": "${input:google-client-id}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.mcp-sheets]
command = "npx"
args = ["-y", "@mcp-z/mcp-sheets@2.6.5"]
env = { "GOOGLE_CLIENT_ID" = "<GOOGLE_CLIENT_ID>" }

For AI agents

  1. Ask the user for: GOOGLE_CLIENT_ID. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: account-list, account-me, account-remove, account-switch, cells-copy, cells-format, cells-metadata-get, chart-create, ….
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json