google-sheets-mcp
A locally running MCP server that provides cell-level and formatting-level control over Google Sheets via the Sheets API v4, enabling reading, writing, formatting, and managing spreadsheets through natural language.
README
google-sheets-mcp
A locally running MCP server that gives an LLM cell-level and formatting-level control over Google Sheets via the Sheets API v4. Runs over stdio, authenticates with your own Google account via OAuth.
Capabilities
Structure
get_spreadsheet_info— list sheets with ids, dimensions, frozen rows/colscreate_spreadsheet,add_sheet,rename_sheet
Cell values
read_range,batch_read— read A1 ranges (formatted, unformatted, or formulas)write_range,append_rows,clear_range
Formatting
format_cells— bold/italic/underline/strikethrough, font size & family, text & background color, horizontal/vertical alignment, wrap strategy, number formatsset_borders— outer + inner borders, styles, colorsmerge_cells,unmerge_cellsset_dimension_size(column width / row height),auto_resize_dimensionsfreezerows/columnsadd_conditional_format— boolean rules (number/text/custom-formula conditions)batch_update— raw Sheets APIbatchUpdateescape hatch for anything else
Setup
1. Get an OAuth client secret
-
In the Google Cloud Console, create (or pick) a project and enable the Google Sheets API (APIs & Services → Library).
-
Configure the OAuth consent screen (External is fine for personal use; add your own Google account as a Test user).
-
APIs & Services → Credentials → Create Credentials → OAuth client ID → application type Desktop app. Download the JSON.
-
Save it as
credentials.jsonunder the config directory:~/.config/google-sheets-mcp/credentials.json(Or set
$GOOGLE_SHEETS_CREDENTIALSto its path.)
2. Install
uv sync
3. Authenticate once
uv run google-sheets-mcp auth
This opens a browser, you log in, and the token is cached at
~/.config/google-sheets-mcp/token.json. After this the server runs without
prompting (the token auto-refreshes).
Running
The server speaks MCP over stdio — point your MCP client at it.
Claude Code
claude mcp add google-sheets -- uv run --directory /path/to/google-sheets-mcp google-sheets-mcp
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"google-sheets": {
"command": "uv",
"args": ["run", "--directory", "/path/to/google-sheets-mcp", "google-sheets-mcp"]
}
}
}
Notes on ranges
- A1 notation (
Sheet1!A1:C10,A:C,2:5,B2) is used by all value/formatting tools. If you omit theSheet!prefix the first sheet is used. - Dimension tools (
set_dimension_size,auto_resize_dimensions) use zero-based, half-open indices:start_index=0, end_index=3= first three. - Colors accept
#RRGGBB, short#RGB, named colors (red,lightgray, …), or a{"red":..,"green":..,"blue":..}dict (0.0–1.0).
Config / environment variables
| Variable | Default | Purpose |
|---|---|---|
GOOGLE_SHEETS_MCP_HOME |
~/.config/google-sheets-mcp |
Config directory |
GOOGLE_SHEETS_CREDENTIALS |
<home>/credentials.json |
OAuth client secret |
GOOGLE_SHEETS_TOKEN |
<home>/token.json |
Cached user token |
Development
uv run pytest
Secrets (credentials.json, token.json) are git-ignored — never commit them.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.