mcp-google-sheets

Read, write, format and share Google Sheets spreadsheets and browse Google Drive folders from an MCP client

By Xing Wu (individual) Python Local · stdio Data and analyticsProductivityFiles and storage

76 popularity score ★ 1.0k ↓ 111k/mo

Connect your client

Local (PyPI)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add google-sheets -- uvx mcp-google-sheets@latest
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "google-sheets": {
      "command": "uvx",
      "args": [
        "mcp-google-sheets@latest"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "google-sheets": {
      "command": "uvx",
      "args": [
        "mcp-google-sheets@latest"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "google-sheets": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-google-sheets@latest"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.google-sheets]
command = "uvx"
args = ["mcp-google-sheets@latest"]
Gemini CLITerminal
gemini mcp add --scope user google-sheets uvx -- mcp-google-sheets@latest
Local (from source)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

FirstTerminal
git clone https://github.com/xing5/mcp-google-sheets.git
Claude CodeTerminal
claude mcp add google-sheets -- uv run --directory '<PATH_TO_REPO>' mcp-google-sheets
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "google-sheets": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "<PATH_TO_REPO>",
        "mcp-google-sheets"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "google-sheets": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "<PATH_TO_REPO>",
        "mcp-google-sheets"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "google-sheets": {
      "type": "stdio",
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "<PATH_TO_REPO>",
        "mcp-google-sheets"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.google-sheets]
command = "uv"
args = ["run", "--directory", "<PATH_TO_REPO>", "mcp-google-sheets"]
Gemini CLITerminal
gemini mcp add --scope user google-sheets uv -- run --directory '<PATH_TO_REPO>' mcp-google-sheets

Settings 9

SERVICE_ACCOUNT_PATH Optional: Path to a service account JSON key; the first method its docs show.
DRIVE_FOLDER_ID Optional: ID of the Drive folder shared with the service account; default folder for listing and creating.
CREDENTIALS_CONFIG Optional: Base64 content of a service account or OAuth credentials file, checked first.
CREDENTIALS_PATH Optional: Path to an OAuth desktop client JSON (default credentials.json).
TOKEN_PATH Optional: Writable path where the OAuth refresh token is stored (default token.json).
GOOGLE_APPLICATION_CREDENTIALS Optional: Google's standard key path, picked up through Application Default Credentials.
ENABLED_TOOLS Optional: Comma-separated tool names to expose; all tools when unset.
HOST Optional: Listen address for the SSE transport (default 0.0.0.0).
PORT Optional: Listen port for the SSE transport (default 8000).

What it does

mcp-google-sheets is a Python MCP server that talks to the Google Sheets API and the Google Drive API on your behalf. It runs on your own machine (or in a container you build) and uses Google credentials you provide.

Through it an assistant can find spreadsheets by listing a Drive folder or searching file names and contents, list folders, preview several spreadsheets at once, read values or formulas from a range, and search for cells holding a given value. On the writing side it can create spreadsheets and tabs, overwrite ranges, insert empty rows or columns, copy and rename tabs, add charts (column, bar, line, area, pie, scatter, combo, histogram), share a spreadsheet with email addresses as reader, commenter or writer, and pass raw requests to the Sheets batchUpdate endpoint, which covers formatting, deleting rows or columns and other structural edits. A resource, spreadsheet://{spreadsheet_id}/info, returns basic metadata.

Four ways to sign in are supported: a Google Cloud service account key (the recommended path, working inside one shared Drive folder), a desktop OAuth client that opens a browser on first use, the same credentials passed as a Base64 string in an environment variable, and Google Application Default Credentials. All 20 tools take roughly 13,000 tokens of context by the project's own count, so it offers --include-tools and ENABLED_TOOLS to switch on only the ones you need.

What it needs

RuntimePython

uv (for uvx) or Docker. A Google Cloud project with the Google Sheets API and Google Drive API enabled, plus one set of credentials: a service account JSON key with a Drive folder shared to it, an OAuth desktop client JSON, or gcloud Application Default Credentials with a quota project set.

Limits

Works only on Google Sheets and Drive folders; it does not read Docs, Slides or other file types. With a service account it sees only what has been shared with that account, normally one Drive folder. update_cells and batch_update_cells overwrite what is in the range. The Docker image is built from the repository yourself and speaks SSE on port 8000, not stdio. search_spreadsheets returns at most 100 results.

Who it suits

Suits people who keep data in Google Sheets and want an assistant to read, update and chart it, and who can set up a Google Cloud project and credentials. The service account route keeps its reach to one shared folder, which fits automation and shared machines; OAuth or ADC suits personal use but reaches the whole Drive the account can see. It is a community project, not published by Google. If you only need to read sheets, use --include-tools to expose the read-only tools; if you need Docs, Gmail or Calendar as well, look for a broader Google Workspace server.

Tools 20

list_spreadsheets
List spreadsheets in a Drive folder or the configured default folder
search_spreadsheets
Search Drive for spreadsheets by file name or content
list_folders
List the folders inside a Drive folder or the My Drive root
create_spreadsheet
Create a new spreadsheet, optionally inside a given folder
list_sheets
List the tab names in a spreadsheet
create_sheet
Add a new tab to a spreadsheet
rename_sheet
Give an existing tab a new name
copy_sheet
Copy a tab into another spreadsheet under a chosen name
get_sheet_data
Read values, or full grid data with formatting, from a range or a whole tab
get_sheet_formulas
Read the formulas in a range or a whole tab
get_multiple_sheet_data
Read several ranges, across spreadsheets if needed, in one call
get_multiple_spreadsheet_summary
Preview titles, tabs, headers and first rows of several spreadsheets
find_in_spreadsheet
Find cells containing a given text, in one tab or all tabs
update_cells
Write a 2D array of values to a range, replacing what is there
batch_update_cells
Write values to several ranges of one tab in a single call
add_rows
Insert empty rows at a chosen position
add_columns
Insert empty columns at a chosen position
add_chart
Create a chart of a chosen type from a data range
share_spreadsheet
Share a spreadsheet with email addresses as reader, commenter or writer
batch_update
Send raw Sheets batchUpdate requests for formatting, deletions and other structural changes

Similar servers