Google Sheets MCP Server
Provides tools for interacting with Google Sheets via the official Google Sheets API v4, enabling AI agents to read and write cell values, append rows, run batch operations, manage spreadsheets and sheet tabs, manipulate rows and columns, clean/sort/deduplicate data, and apply formatting and conditional formatting.
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 Server
A fully-featured MCP (Model Context Protocol) server that lets AI agents interact with Google Sheets via the official Google Sheets API v4.
Supports three authentication methods โ auto-detected based on what's available.
Built with Python and FastMCP. Designed to run as a Docker container and integrate with AI clients like Claude Desktop, Cursor, and others.
Features
28 tools covering the full Google Sheets API v4
Three auth methods: Docker Desktop config UI, Service Account file, OAuth 2.0
Runs as an isolated Docker container
Works with Claude Desktop, Cursor, Zed, and any MCP-compatible client
Related MCP server: Google Sheet MCP Server
Tools (28 total)
๐ Values โ Reading & Writing
# | Tool | Description |
1 |
| Read data from a single range |
2 |
| Write or update cell values |
3 |
| Append new rows to a sheet |
4 |
| Read multiple ranges in a single API call |
5 |
| Write to multiple ranges in a single API call |
6 |
| Clear multiple ranges in a single API call |
7 |
| Clear all values in a single range |
๐๏ธ Spreadsheet & Sheet Management
# | Tool | Description |
8 |
| Create a new Google Spreadsheet |
9 |
| Get title, sheet names, row/column counts |
10 |
| List all sheet tabs |
11 |
| Add a new sheet tab |
12 |
| Delete a sheet tab |
13 |
| Rename a sheet tab |
14 |
| Duplicate a sheet tab within the same spreadsheet |
15 |
| Copy a sheet tab to a different spreadsheet |
๐ข Rows & Columns
# | Tool | Description |
16 |
| Insert empty rows or columns at a specific position |
17 |
| Delete rows by index |
18 |
| Delete columns by index |
19 |
| Move rows or columns to a new position |
20 |
| Insert a blank range and shift cells down or right |
21 |
| Delete a range and shift cells up or left |
๐งน Data Cleaning
# | Tool | Description |
22 |
| Remove duplicate rows from a range |
23 |
| Trim extra spaces from cells in a range |
24 |
| Search and replace text across sheets |
25 |
| Sort a range by a specific column (asc or desc) |
๐จ Formatting
# | Tool | Description |
26 |
| Apply bold, font size, background and text colors |
27 |
| Freeze header rows and/or columns |
28 |
| Highlight cells based on rules (e.g. red if negative) |
Authentication
The server auto-detects which method to use in this priority order:
Priority | Method | How | Best for |
1st |
| Docker Desktop config UI | โ Easiest โ Docker users |
2nd |
| Volume mount | โ Teams, automation |
3rd |
| Volume mount + browser login | โ Personal, local dev |
Option A โ Docker Desktop Config UI โญ Easiest for Docker Users
If you're using Docker Desktop with the MCP Toolkit, you can configure the server directly from the UI without mounting any files.
Step 1 โ Get your Service Account JSON
Go to Google Cloud Console
Create a project and enable the Google Sheets API
Go to IAM & Admin โ Service Accounts โ Create Service Account
Give it a name and click Create and Continue โ Done
Click on the service account โ Keys tab โ Add Key โ Create new key โ JSON
A JSON file is downloaded โ open it and copy the entire contents
Step 2 โ Share your Google Sheet with the Service Account
โ ๏ธ The service account can only access sheets explicitly shared with it.
In the downloaded JSON, find the
client_emailfield (e.g.sheets-mcp@my-project.iam.gserviceaccount.com)Open your Google Sheet โ click Share
Paste the
client_emailand give it Editor access
Step 3 โ Paste in Docker Desktop
Open Docker Desktop โ MCP Toolkit โ Catalog โ Google Sheets
Go to the Configuration tab
Paste the full contents of your
service_account.jsoninto the Google Service Account JSON fieldClick Save โ done! No file mounting needed ๐
Option B โ Service Account File โ Recommended for Docker / Teams
Same as Option A but using a mounted file instead of the config UI.
Steps 1โ5 โ Same as Option A above
Step 6 โ Run with Docker
mkdir -p data
cp /path/to/service_account.json data/
docker run -i --rm \
-v $(pwd)/data:/data \
mcp/google-sheetsNo browser login needed! ๐
Option C โ OAuth 2.0 โ Recommended for Local / Personal Use
OAuth 2.0 lets you log in with your personal Google account via a browser. Best for local development.
Step 1 โ Create a Google Cloud Project
Go to Google Cloud Console
Click Select a project โ New Project, give it a name, click Create
Step 2 โ Enable the Google Sheets API
Go to APIs & Services โ Library
Search for Google Sheets API and click Enable
Step 3 โ Configure OAuth Consent Screen
Go to APIs & Services โ OAuth consent screen
Choose External and click Create
Fill in the App name and your email, click Save and Continue through all steps
Step 4 โ Create OAuth 2.0 Credentials
Go to APIs & Services โ Credentials
Click Create Credentials โ OAuth 2.0 Client ID
Choose Desktop app, give it a name, click Create
Click Download JSON and rename the file to
credentials.json
Step 5 โ Run Locally
git clone https://github.com/adalpan/google-sheets-mcp
cd google-sheets-mcp
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
mkdir data
cp /path/to/credentials.json data/
TOKEN_PATH=data/token.json CREDENTIALS_PATH=data/credentials.json python src/server.pyOn first run, a browser window will open for you to sign in to Google. A token.json is saved in data/ for future runs.
Connect to Claude Desktop
Using Docker with env var (Option A)
{
"mcpServers": {
"google-sheets": {
"command": "docker",
"args": ["run", "-i", "--rm", "mcp/google-sheets"],
"env": {
"GOOGLE_SERVICE_ACCOUNT_JSON": "{\"type\": \"service_account\", ...}"
}
}
}
}Using Docker with volume mount (Option B)
{
"mcpServers": {
"google-sheets": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "/path/to/your/data:/data",
"mcp/google-sheets"
]
}
}
}Using Python directly (Option C โ OAuth 2.0)
{
"mcpServers": {
"google-sheets": {
"command": "python",
"args": ["/path/to/google-sheets-mcp/src/server.py"],
"env": {
"TOKEN_PATH": "/path/to/data/token.json",
"CREDENTIALS_PATH": "/path/to/data/credentials.json"
}
}
}
}Testing with MCP Inspector
source venv/bin/activate
npx @modelcontextprotocol/inspector \
env TOKEN_PATH=data/token.json \
CREDENTIALS_PATH=data/credentials.json \
python src/server.pyOpen the URL shown in the terminal, set Transport Type to STDIO, and click Connect.
Usage Examples
"Read cells A1 to D10 from Sheet1"
"Write a header row with Name, Age, City to Sheet1"
"Append a new row with Alice, 30, Berlin"
"Create a spreadsheet called Q1 Budget with sheets Sales and Expenses"
"Rename Sheet1 to Sales Q1"
"Remove all duplicate rows from my data range"
"Sort the data by the second column descending"
"Highlight in red all cells less than 0"
"Freeze the first row and first column"
License
MIT License โ Copyright (c) 2026 Adalberto Perez Salas (pan)
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
Google Sheets via Apify: write Apify datasets or JSON rows to a sheet, or read a sheet as JSON.
Connect AI assistants to Google Sheets through controlled tools for reading and updating rows.
Read and write Google Sheets rows via SheetDB APIs; per-API agent permissions, approved deletes.
Read and write Google Sheets with your own service account: list tabs, read, append, update, export.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to read, write, and manage Google Sheets spreadsheets through natural language commands, providing a bridge between MCP clients and the Google Sheets API.470 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to read, write, and manage Google Sheets using the Google Sheets API v4.MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to read, write, and format Google Sheets using the Google Sheets API v4.1-
- AlicenseNot gradedqualityCmaintenanceEnables MCP-compatible clients to interact with Google Sheets and Drive through tools for reading, writing, searching, formatting, sharing, and managing spreadsheets via natural language.MIT