home / mcp / google sheets mcp server

Google Sheets MCP Server

Provides an MCP server to create, read, write, format, and manage Google Sheets via Claude Desktop.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "amaboh-google-sheets-mcp-server": {
      "command": "/path/to/your/.venv/bin/python",
      "args": [
        "/path/to/your/google_sheets.py",
        "--credentials-path",
        "/Users/yourusername/.config/google_sheets_mcp/google-sheets-mcp.json",
        "--log-level",
        "DEBUG"
      ]
    }
  }
}

You run an MCP server that lets Claude Desktop interact with Google Sheets directly. It enables you to create, read, write, format, and manage sheets through a local Python-based service, streamlining automation and workflows without leaving your editor or Claude environment.

How to use

Once you have the Google Sheets MCP Server running, you connect Claude Desktop to it as a local MCP server. You can perform common sheet operations by calling the exposed tools from Claude Desktop and passing the required identifiers (sheet IDs) and parameters. The available actions include creating new sheets, reading and writing data, applying cell formats, adding or deleting sheets, writing formulas, and getting sheet properties. Each tool takes straightforward arguments such as file_id (sheet ID) and ranges (e.g., A1:B10), returning results or confirmations that you can use in your workflows.

Using the supported tools

- Create a new sheet: use create_sheet(title) to add a sheet with the given title to a Google Sheets file.

- Read and write data: use read_range and write_range (or the equivalent tools) to fetch and update cell values within a specified range.

- Format cells: use format_range(file_id, range, format) to apply styling or number formats to a cell range.

- Add or delete sheets: use add_sheet(file_id, title) to create a new sheet and delete_sheet(file_id, sheet_id) to remove one by its identifier.

- Write formulas: use write_formula(file_id, range, formula) to insert spreadsheet formulas into a range.

- Retrieve sheet properties: use get_sheet_properties(file_id) to obtain metadata about the sheets in a file.

Authentication and credentials

Set up OAuth 2.0 credentials in Google Cloud Console and download them to your local machine. The first-time start will open a browser window to complete the OAuth flow and save a token for subsequent runs.

Troubleshooting usage

If you encounter issues, verify that Claude Desktop is connected to the correct local MCP server, ensure the Google Sheets API is enabled for your project, and confirm that the saved credentials token is present at the expected path.

Notes on usage limits

Operations against Google Sheets are subject to Google API quotas and rate limits. If you hit quota errors, review your Google Cloud Console quotas and consider batching requests where possible.

Available tools

create_sheet

Create a new sheet within a Google Sheets file using a specified title.

read_range

Read data from a specific cell range within a sheet.

write_range

Write data to a specific cell range within a sheet.

format_range

Apply formatting to a cell range, such as font, color, or number formats.

add_sheet

Add a new sheet to a Google Sheets file with a given title.

delete_sheet

Delete a sheet by its sheet_id from a Google Sheets file.

write_formula

Insert a spreadsheet formula into a specified range.

get_sheet_properties

Retrieve properties and metadata for sheets within a Google Sheets file.