MCP Gsheets MCP Server

Model Context Protocol (MCP) server for Google Sheets API integration

Local serverstdioTypeScript

What is the MCP Gsheets MCP server?

MCP Gsheets becomes available to MCP clients through the mcp gsheets mcp server. Model Context Protocol (MCP) server for Google Sheets API integration.

What MCP Gsheets does

A Model Context Protocol (MCP) server for Google Sheets API integration. Enables reading, writing, and managing Google Sheets documents directly from your MCP client (e.g., Claude Code, Claude Desktop, Cursor, etc.).

Key capabilities

  • Complete Google Sheets Integration — Read, write, and manage spreadsheets
  • Advanced Operations — Batch operations, formatting, charts, and conditional formatting
  • Flexible Authentication — Support for both file-based and JSON string credentials
  • Production Ready — Built with TypeScript, comprehensive error handling, and full test coverage

Tools it exposes

Once connected, the assistant can call these 14 tools directly:

  • Toolset — Tools
  • core — 11
  • sheets — 9
  • formatting — 15
  • charts — 3
  • tables — 4
  • analysis — 2
  • Configuration — Tools
  • sheets_get_merged_cells — Return all merged cell ranges for a sheet, with A1 notation and raw GridRange coordinates
  • sheets_get_sheet_dimensions — Return column widths, row heights, frozen column/row counts, and hidden flags for every column and row
  • sheets_get_sheet_formatting — Read raw cell formatting (background colour, font, borders, alignment, number format) for a range without returning cell values
  • sheets_get_conditional_formatting — Read all conditional formatting rules and banded (alternating-colour) ranges defined on a sheet
  • sheets_get_sheet_structure — Lightweight structural metadata only — no per-cell data. Returns dimensions, frozen rows/cols, tab colour, column widths, row heights, hidden columns/rows, and
  • sheets_get_formatting_compact — Read cell formatting for a range and return it as compact A1Range→format pairs (run-length encoded). Identical adjacent cells are collapsed into rectangular

Installing the mcp gsheets mcp server

The server is distributed via npm as mcp-gsheets, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.

Configuration

Before the server will start you need to supply 8 environment variables: GOOGLE_PROJECT_ID, GOOGLE_APPLICATION_CREDENTIALS, GOOGLE_SERVICE_ACCOUNT_KEY, GOOGLE_PRIVATE_KEY, GOOGLE_CLIENT_EMAIL, GSHEETS_TOOLSETS, TEST_SPREADSHEET_ID, SPREADSHEET_ID. Keep credentials in your client's env block or a secrets manager rather than committing them.

Requirements

Where it fits

Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. MCP Gsheets sits in that group, and the shape of its toolset — Toolset, core, sheets among others — tells you what it is really for. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This server runs locally, so it operates with whatever access your machine and its credentials already have. Scope that deliberately rather than by default.
  • It will not start until its required credentials are present, so set those before wondering why the tools never appear.
  • With 14 tools exposed, expect a noticeable bump in prompt size — disable it in projects that never use MCP Gsheets.
  • Maintained by freema, written in TypeScript.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the mcp gsheets mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

Available tools

ToolWhat it does
ToolsetTools
core11
sheets9
formatting15
charts3
tables4
analysis2
ConfigurationTools
sheets_get_merged_cellsReturn all merged cell ranges for a sheet, with A1 notation and raw GridRange coordinates
sheets_get_sheet_dimensionsReturn column widths, row heights, frozen column/row counts, and hidden flags for every column and row
sheets_get_sheet_formattingRead raw cell formatting (background colour, font, borders, alignment, number format) for a range without returning cell values
sheets_get_conditional_formattingRead all conditional formatting rules and banded (alternating-colour) ranges defined on a sheet
sheets_get_sheet_structureLightweight structural metadata only — no per-cell data. Returns dimensions, frozen rows/cols, tab colour, column widths, row heights, hidden columns/rows, and all merges in A1 notation. Single fast API call
sheets_get_formatting_compactRead cell formatting for a range and return it as compact A1Range→format pairs (run-length encoded). Identical adjacent cells are collapsed into rectangular ranges — reduces output by 90 %+ compared to per-cell data

How to install the MCP Gsheets MCP server

{
  "mcpServers": {
    "mcp-gsheets": {
      "command": "npx",
      "args": ["-y", "mcp-gsheets@latest"],
      "env": {
        "GOOGLE_PROJECT_ID": "your-project-id",
        "GOOGLE_APPLICATION_CREDENTIALS": "/absolute/path/to/service-account-key.json"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
GOOGLE_PROJECT_IDConfiguration value read at startup.Optional
GOOGLE_APPLICATION_CREDENTIALSConfiguration value read at startup.Optional
GOOGLE_SERVICE_ACCOUNT_KEYCredential the server authenticates with.Yes
GOOGLE_PRIVATE_KEYCredential the server authenticates with.Yes
GOOGLE_CLIENT_EMAILConfiguration value read at startup.Optional
GSHEETS_TOOLSETSConfiguration value read at startup.Optional
TEST_SPREADSHEET_IDConfiguration value read at startup.Optional
SPREADSHEET_IDConfiguration value read at startup.Optional

Example prompts to try

  • Use MCP Gsheets to Toolset.
  • Use MCP Gsheets to core.
  • Use MCP Gsheets to sheets.

Frequently asked questions

It connects MCP Gsheets to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (Toolset, core, sheets, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with MCP Gsheets directly.