# MCP Gsheets

> MCP Gsheets is an MCP server for productivity. Read, write and format Google Sheets from an MCP client using a service account. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Platforms:** CLI
- **Repository:** https://github.com/freema/mcp-gsheets
- **MCP Registry name:** io.github.freema/mcp-gsheets
- **Categories:** [productivity](https://ai-powered.com/categories/productivity), [files and documents](https://ai-powered.com/categories/files-and-documents)
- **Listing updated:** 2026-11-23

## About

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.

## Features

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

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
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.

### Claude Code: Or share it with your project (.mcp.json)

```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 Desktop (claude_desktop_config.json)

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

### Cursor (~/.cursor/mcp.json)

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

### VS Code (~/.copilot/mcp-config.json)

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

### Codex: Add with the CLI (Terminal)

```sh
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
```

### Codex: Or add to config.toml (~/.codex/config.toml)

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

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

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

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```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 (~/.config/devin/mcp_config.json)

```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 (cline_mcp_settings.json)

```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 (Zed settings.json)

```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 (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

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

The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```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 (~/.kiro/settings/mcp.json)

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

### Other clients (your client's MCP settings (most use this shape))

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

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

## Alternatives

- [Ha MCP](https://ai-powered.com/mcp/ha-mcp): Ha MCP is an open-source MCP server for productivity.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.
- [Open Sunsama](https://ai-powered.com/mcp/open-sunsama): Open Sunsama is an open-source MCP server for productivity.
- [Scholar Sidekick](https://ai-powered.com/mcp/scholar-sidekick): Scholar Sidekick is a freemium MCP server for education and exams.
- [Dayfile.app](https://ai-powered.com/mcp/dayfile-app): Dayfile.app is an open-source MCP server for productivity.
- [Stashpad](https://ai-powered.com/mcp/stashpad): Stashpad is an open-source MCP server for files and documents.
- [loremfile](https://ai-powered.com/mcp/loremfile): loremfile is a free MCP server for developer tools.
- [note1](https://ai-powered.com/mcp/note1): note1 is an MCP server for productivity.

---
Source: https://ai-powered.com/mcp/mcp-gsheets
