MCP.so
Sign In

Google Sheets MCP Server

@xing5

Basic information

Category

Files & Storage

License

MIT

Transports

stdio

Author

xing5

About Google Sheets MCP Server

This MCP server integrates with your Google Drive and Google Sheets, to enable creating and modifying spreadsheets.

Google Sheets MCP Server config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "mcp-google-sheets": {
      "command": "uvx",
      "args": [
        "mcp-google-sheets@latest"
      ]
    }
  }
}

Google Sheets MCP Server tools

Tool list not available yet

This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.

Fetch the live tool list by running this server in a temporary sandbox using the button above.

Overview

What is Google Sheets MCP Server?

Google Sheets MCP Server (mcp-google-sheets) is an open-source Python MCP server that connects Claude, Cursor and other MCP clients to the Google Sheets and Google Drive APIs, so an AI assistant can list, read, write, share and chart spreadsheets.

It is a community project by xing5 (MIT license), published on PyPI as mcp-google-sheets and launched with a single uvx command. It is not made by Google. The server does not store your data: every operation goes through the official Google Sheets and Drive APIs using credentials you control.

How to use Google Sheets MCP Server?

Prerequisites

  1. A Google Cloud project with the Google Sheets API and Google Drive API enabled (APIs & Services → Library).
  2. Credentials. The README recommends a service account: create one under IAM & Admin → Service Accounts, download a JSON key, then create a Google Drive folder and share it with the service account's client_email as Editor. Note the folder ID from its URL (https://drive.google.com/drive/folders/<FOLDER_ID>).
  3. uv installed, which provides uvx:
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

Environment variables

VariableMethodPurpose
SERVICE_ACCOUNT_PATHService accountPath to the JSON key file
DRIVE_FOLDER_IDService accountID of the Drive folder shared with the service account
CREDENTIALS_PATH / TOKEN_PATHOAuth 2.0OAuth client JSON and where to store the token (defaults credentials.json / token.json)
CREDENTIALS_CONFIGEitherBase64-encoded credentials JSON, useful in Docker or CI
GOOGLE_APPLICATION_CREDENTIALSADCGoogle's standard Application Default Credentials path

The server checks CREDENTIALS_CONFIG, then SERVICE_ACCOUNT_PATH, then CREDENTIALS_PATH, and finally falls back to Application Default Credentials. Test it from a terminal first:

export SERVICE_ACCOUNT_PATH="/path/to/your/service-account-key.json"
export DRIVE_FOLDER_ID="YOUR_DRIVE_FOLDER_ID"
uvx mcp-google-sheets@latest

The README recommends always using @latest; without it uvx may run a cached older version.

Claude Desktop

Add this to claude_desktop_config.json:

{
  "mcpServers": {
    "google-sheets": {
      "command": "uvx",
      "args": ["mcp-google-sheets@latest"],
      "env": {
        "SERVICE_ACCOUNT_PATH": "/full/path/to/your/service-account-key.json",
        "DRIVE_FOLDER_ID": "your_shared_folder_id_here"
      }
    }
  }
}

For OAuth instead, replace the env block with CREDENTIALS_PATH and TOKEN_PATH; a browser window opens for Google login on first use. On macOS, if you see spawn uvx ENOENT, set command to the full path, for example /Users/yourusername/.local/bin/uvx.

Claude Code

Register the same command with the Claude Code CLI:

claude mcp add google-sheets \
  -e SERVICE_ACCOUNT_PATH=/full/path/to/your/service-account-key.json \
  -e DRIVE_FOLDER_ID=your_shared_folder_id_here \
  -- uvx mcp-google-sheets@latest

Cursor

Put the same mcpServers JSON block shown for Claude Desktop into ~/.cursor/mcp.json (global) or .cursor/mcp.json (per project).

Key features of Google Sheets MCP Server

  • Direct integration with the Google Sheets API and Google Drive API.
  • Read and write tools for cell values, formulas, rows, columns and tabs, including batch reads and writes.
  • Spreadsheet management: create, list, search, copy, rename and share with reader, commenter or writer roles.
  • Chart creation (column, bar, line, area, pie, scatter, combo, histogram) through add_chart.
  • Four authentication methods: service account, OAuth 2.0, Base64 credential injection, and Application Default Credentials.
  • Tool filtering with --include-tools or ENABLED_TOOLS to cut the roughly 13K tokens the full tool set uses.
  • Zero-install launch via uvx, plus a Dockerfile for SSE deployments.
  • An MCP resource, spreadsheet://{spreadsheet_id}/info, for basic spreadsheet metadata.

Google Sheets MCP Server tools

  • Discovery: list_spreadsheets, search_spreadsheets, list_folders, list_sheets and get_multiple_spreadsheet_summary find files and preview titles, tabs, headers and the first rows.
  • Reading: get_sheet_data reads a range in A1 notation (optionally with full grid data and formatting), get_sheet_formulas returns formulas instead of values, and get_multiple_sheet_data reads several ranges across spreadsheets in one call. find_in_spreadsheet is also available.
  • Writing: update_cells overwrites a range, batch_update_cells writes many ranges at once, add_rows and add_columns insert empty rows or columns, and batch_update is exposed for broader updates.
  • Structure and sharing: create_spreadsheet, create_sheet, copy_sheet, rename_sheet and share_spreadsheet manage files and access; add_chart builds charts from a data range.

The README's recommended minimal subset is get_sheet_data, update_cells, list_spreadsheets and list_sheets.

Use cases of Google Sheets MCP Server

  • Reporting: "Create a new spreadsheet titled 'Quarterly Sales Report Q3' and add a 'Summary' sheet."
  • Data lookup: "In the 'Quarterly Sales Report' spreadsheet, get the data from Sheet1 range A1 to E10 and summarize the trend."
  • Task tracking: "In my 'Project Tasks' spreadsheet, sheet 'Tasks', update cell B2 to 'In Progress'."
  • Logging from an agent: append rows of results to a 'Log' sheet as Claude Code finishes steps of a job.
  • Sharing: "Share the 'Team Vacation Schedule' spreadsheet with team@example.com as a reader and don't send notifications."
  • Charts: "Create a column chart in my 'Sales Report' spreadsheet showing monthly revenue from A1:B13."

Google Sheets MCP Server vs alternatives

Among these, xing5's mcp-google-sheets has the largest GitHub following and the widest Sheets tool set, which is why it is the usual choice for a Google Sheets MCP setup.

Troubleshooting Google Sheets MCP Server

  • spawn uvx ENOENT on macOS: the client cannot find uvx. Use the full path, such as /Users/yourusername/.local/bin/uvx.
  • Spreadsheets missing from list_spreadsheets: with a service account, only files in the folder you shared with the service account email (and set in DRIVE_FOLDER_ID) are visible. Share the folder or file with that client_email as Editor.
  • Permission or API errors: confirm both the Google Sheets API and Google Drive API are enabled in the same Cloud project as your credentials.
  • Old behavior after an update: run uvx mcp-google-sheets@latest; without @latest, uvx may keep a cached version.
  • Context window filling up: restrict tools with --include-tools or ENABLED_TOOLS, comma-separated with no spaces.

Frequently asked questions

1

Is there an official Google Sheets MCP server from Google?

This server is a community project by xing5, not a Google product. It talks to Google's official Sheets and Drive APIs using your own credentials.

2

Is the Google Sheets MCP server free?

Yes. mcp-google-sheets is open source under the MIT license. You only need a Google Cloud project, and normal Google API quotas apply.

3

Do I need an API key?

No API key in the usual sense. You authenticate with a service account JSON key (recommended), an OAuth 2.0 client, Base64 credentials in `CREDENTIALS_CONFIG`, or Application Default Credentials.

4

Does it work with Claude Code, Cursor and VS Code?

It is a standard stdio MCP server, so any MCP client that can launch `uvx mcp-google-sheets@latest` can use it, including Claude Desktop, Claude Code and Cursor. The README's own examples target Claude Desktop.

5

Can I run it remotely?

Yes. The included Dockerfile runs the server with SSE transport on a configurable host and port; use `CREDENTIALS_CONFIG` to pass credentials into the container.

6

Which spreadsheets can the AI access?

With a service account, only spreadsheets in folders or files shared with that account. With OAuth, whatever your Google account can access, so grant the narrowest scope that fits your use.

7

How do I reduce token usage?

All tools are enabled by default (about 13K tokens). Pass `--include-tools get_sheet_data,update_cells,list_spreadsheets,list_sheets` or set `ENABLED_TOOLS` to expose only what you need.

8

Where is my spreadsheet data stored?

It stays in Google Drive and Google Sheets. The server only relays requests to the Google APIs and does not keep a copy.

Comments

More Files & Storage MCP servers