google-sheets-mcp
Allows AI agents to read, write, append, create, and clear data in Google Spreadsheets, including managing sheet tabs and cell ranges.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
google-sheets-mcp
A Model Context Protocol (MCP) server that lets Claude interact with Google Sheets — read, write, append, create, and clear spreadsheet data using natural language.
Features
Tool | Description |
| Read cell values from a spreadsheet (single cell, range, or entire sheet) |
| Write values to a cell range |
| Append rows to the end of a sheet |
| Create a new spreadsheet with custom sheet tabs |
| List all sheet tabs in a spreadsheet |
| Clear cell values while preserving formatting |
Related MCP server: google-sheets-mcp
Prerequisites
1. Google Cloud Setup
Go to Google Cloud Console
Create a project (or select an existing one)
Enable the Google Sheets API: APIs & Services → Library → search "Google Sheets API" → Enable
Create OAuth 2.0 credentials:
APIs & Services → Credentials → + Create Credentials → OAuth client ID
Application type: Desktop app
Name:
google-sheets-mcp(or any name)Click Create → Download JSON
Save the downloaded file as
credentials/client_secret.json
Important: Make sure to select Desktop app as the application type. Web application credentials will cause a
redirect_uri_mismatcherror.
2. Requirements
Python 3.11+
uv (recommended) or pip
Installation
Using uv (recommended)
git clone https://github.com/takehirokawaguchi/google-sheets-mcp.git
cd google-sheets-mcp
uv syncUsing pip
git clone https://github.com/takehirokawaguchi/google-sheets-mcp.git
cd google-sheets-mcp
pip install -e .Configuration
Create a .env file in the project root:
# Path to your OAuth2 client secret JSON (required)
GOOGLE_OAUTH_CLIENT_SECRET_FILE=/path/to/google-sheets-mcp/credentials/client_secret.json
# Path to token cache file (optional, defaults to ~/.config/google-sheets-mcp/token.json)
# GOOGLE_OAUTH_TOKEN_FILE=/path/to/token.jsonFirst-time authentication
Run the server once to complete the OAuth2 flow in your browser:
uv run google-sheets-mcpA browser window will open asking you to sign in to your Google account and grant access to Google Sheets. After authorization, the token is cached at ~/.config/google-sheets-mcp/token.json and subsequent runs will not require browser interaction.
Usage with Claude Desktop
Add the following to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"google-sheets": {
"command": "uv",
"args": [
"run",
"--project",
"/path/to/google-sheets-mcp",
"google-sheets-mcp"
],
"env": {
"GOOGLE_OAUTH_CLIENT_SECRET_FILE": "/path/to/google-sheets-mcp/credentials/client_secret.json"
}
}
}
}Restart Claude Desktop after saving the configuration. The Google Sheets tools will then be available in your conversations.
Example prompts
Read the data from Sheet1 of my spreadsheet (ID: 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms)Append a new row with ["Alice", 30, "Tokyo"] to the "Users" sheetCreate a new spreadsheet called "Q1 Budget" with sheets: Overview, Jan, Feb, MarMCP Tools Reference
read_cells
Read cell values from a Google Spreadsheet.
Parameter | Type | Required | Default | Description |
| string | yes | — | Spreadsheet ID from the URL |
| string | yes | — | A1 notation range, e.g. |
| string | no |
|
|
write_cells
Write values to a cell range.
Parameter | Type | Required | Default | Description |
| string | yes | — | Spreadsheet ID |
| string | yes | — | A1 notation range, e.g. |
| array | yes | — | 2D array of values, e.g. |
| string | no |
|
|
append_rows
Append rows to the end of data in a sheet.
Parameter | Type | Required | Default | Description |
| string | yes | — | Spreadsheet ID |
| string | yes | — | Sheet tab name, e.g. |
| array | yes | — | 2D array of rows to append |
| string | no |
|
|
| string | no |
|
|
create_spreadsheet
Create a new Google Spreadsheet.
Parameter | Type | Required | Default | Description |
| string | yes | — | Title of the new spreadsheet |
| array | no |
| List of sheet tab names to create |
list_sheets
List all sheet tabs in a spreadsheet.
Parameter | Type | Required | Description |
| string | yes | Spreadsheet ID |
clear_cells
Clear cell values (formatting is preserved).
Parameter | Type | Required | Description |
| string | yes | Spreadsheet ID |
| string | yes | A1 notation range to clear, e.g. |
Development
Run tests
uv run pytest -vProject structure
google-sheets-mcp/
├── src/
│ └── google_sheets_mcp/
│ ├── auth.py # OAuth2 authentication
│ ├── sheets_client.py # Google Sheets API wrapper
│ ├── server.py # MCP tool definitions (FastMCP)
│ └── __main__.py # Entry point
├── tests/
│ ├── conftest.py
│ ├── test_auth.py
│ ├── test_sheets_client.py
│ └── test_server.py
├── credentials/ # Place client_secret.json here (git-ignored)
└── pyproject.tomlLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect AI assistants to Google Sheets through controlled tools for reading and updating rows.
Google Sheets via Apify: write Apify datasets or JSON rows to a sheet, or read a sheet as JSON.
Read-only Google Ads, GA4 and Search Console data for Claude, with no Google Cloud setup.
Give Claude only the Google Drive files you choose. Every action logged.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude to read, write, append, and clear data in Google Sheets directly using a Google Cloud Service Account. It provides tools for real-time spreadsheet interaction, including fetching sheet metadata and managing cell ranges through simple commands.643 npmMIT
- AlicenseBqualityDmaintenanceConnects Claude.ai to Google Sheets, allowing read, append, and update operations on spreadsheets directly from chat.3ISC
- AlicenseNot gradedqualityCmaintenanceEnables reading, writing, and managing Google Sheets from Claude and any MCP-compatible AI client through tools like append_row, update_range, and batch updates.20 npm1MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude Code to read and write Google Sheets, including cell operations, row appending, sheet creation, formatting, and batch updates via the Google Sheets API.MIT