google-sheets-mcp

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.

Category
Visit Server

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/cols
  • create_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 formats
  • set_borders — outer + inner borders, styles, colors
  • merge_cells, unmerge_cells
  • set_dimension_size (column width / row height), auto_resize_dimensions
  • freeze rows/columns
  • add_conditional_format — boolean rules (number/text/custom-formula conditions)
  • batch_update — raw Sheets API batchUpdate escape hatch for anything else

Setup

1. Get an OAuth client secret

  1. In the Google Cloud Console, create (or pick) a project and enable the Google Sheets API (APIs & Services → Library).

  2. Configure the OAuth consent screen (External is fine for personal use; add your own Google account as a Test user).

  3. APIs & Services → Credentials → Create Credentials → OAuth client ID → application type Desktop app. Download the JSON.

  4. Save it as credentials.json under the config directory:

    ~/.config/google-sheets-mcp/credentials.json
    

    (Or set $GOOGLE_SHEETS_CREDENTIALS to 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 the Sheet! 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

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured