google-sheets-readonly-mcp
Reads Google Sheets data for AI agents in a strictly read-only way: reads link-shared public sheet tabs via CSV export without any auth, and reads private sheets via OAuth (spreadsheets.readonly) to list spreadsheet metadata (title, locale, tab names, grid dimensions) and to fetch any tab or A1 range as Markdown tables and structured rows.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@google-sheets-readonly-mcp read the 'Sales' tab from my private Google Sheet"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
google-sheets-readonly-mcp
A lightweight, strictly READ-ONLY Model Context Protocol (MCP) server for reading Google Sheets from AI agents (Antigravity, Claude Code, Claude Desktop, Cursor, etc.).
Designed for teams and knowledge bases that enforce a zero-write safety policy on company spreadsheets.
Why This Exists (3-Layer Read-Only Guarantee)
Most Google Sheets MCP servers request full read+write scopes and expose cell-editing tools. google-sheets-readonly-mcp enforces read-only access at three independent layers:
OAuth Consent Layer: Requests strictly one scope:
https://www.googleapis.com/auth/spreadsheets.readonly.Token Verification Layer: Refuses to run if
token.jsoncontains any non-readonly scope.Code & Transport Layer: Only executes HTTP
GETagainst allowlisted Google hosts (sheets.googleapis.com/docs.google.com) and exposes only read tools (read_only_hint=True, destructive_hint=False), plus built-in PII cell warnings (phones/emails) and?hypothesis-cell highlighting.
Related MCP server: Google Sheets MCP Server
Exposed Tools (4 Read-Only Tools)
Tool | Auth Required | What It Does |
| None (view-only shared link) | Reads a link-shared Google Sheet tab ( |
| OAuth | Lists spreadsheet title, locale, and all tab names & grid dimensions. |
| OAuth | Reads any tab or A1 range from a private/shared Google Sheet as Markdown + rows + PII cell warnings. |
| OAuth | Reads a structured matrix tab (e.g., qualitative Persona / research table) with |
Installation
pip install git+https://github.com/taittag/google-sheets-readonly-mcp.gitOr install locally in editable mode:
git clone https://github.com/taittag/google-sheets-readonly-mcp.git
cd google-sheets-readonly-mcp
python3 -m venv .venv
.venv/bin/pip install -e ".[dev]"
.venv/bin/pytest -qQuick Setup
Mode A — View-Only Shared Links (Zero OAuth)
Works immediately after installation via sheets_read_public_csv.
Mode B — Private Google Sheets (One-Time OAuth spreadsheets.readonly, ~3 min)
In Google Cloud Console, enable Google Sheets API.
Configure OAuth consent screen (add scope
https://www.googleapis.com/auth/spreadsheets.readonlyand add your Google account under Test Users).Create Credentials → OAuth client ID → Desktop app and download the JSON file.
Save it outside git with
0600permissions:mkdir -p ~/.config/google-sheets-readonly-mcp mv ~/Downloads/client_secret_*.json ~/.config/google-sheets-readonly-mcp/credentials.json chmod 600 ~/.config/google-sheets-readonly-mcp/credentials.jsonAuthorize once (opens browser, saves
token.jsonat mode0600, auto-refreshes):google-sheets-readonly-mcp --auth google-sheets-readonly-mcp --status
Agent Configuration
Antigravity CLI (~/.gemini/config/mcp_config.json)
{
"mcpServers": {
"google-sheets-readonly": {
"command": "/path/to/google-sheets-readonly-mcp/.venv/bin/google-sheets-readonly-mcp",
"args": []
}
}
}Claude Code (.mcp.json or ~/.claude.json)
{
"mcpServers": {
"google-sheets-readonly": {
"command": "/path/to/google-sheets-readonly-mcp/.venv/bin/google-sheets-readonly-mcp",
"args": []
}
}
}(Override credential directory via GSHEETS_CONFIG_DIR, GSHEETS_CREDENTIALS_PATH, or GSHEETS_TOKEN_PATH.)
License
MIT
Available Tools
4 toolssheets_get_metadataBRead-onlyIdempotent
Read Google Spreadsheet title and list of tabs/dimensions via OAuth spreadsheets.readonly (READ ONLY).
Inputs: spreadsheet (required). Returns: object
sheets_read_persona_matrixBRead-onlyIdempotent
Read a matrix/persona tab via OAuth spreadsheets.readonly, extracting ? hypothesis cells and PII warnings (READ ONLY).
Inputs: spreadsheet (required), tab_name. Returns: object
sheets_read_public_csvBRead-onlyIdempotent
Read a link-shared (view-only) Google Sheet tab via HTTP GET CSV export with zero OAuth setup, plus PII & ? cell highlights (READ ONLY).
Inputs: spreadsheet (required), gid, max_rows. Returns: object
sheets_read_tabARead-onlyIdempotent
Read a Google Sheet tab or A1 range via OAuth spreadsheets.readonly as Markdown + rows with PII cell warnings (READ ONLY).
Inputs: tab_name (required), spreadsheet (required), a1_range, max_rows. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a distinct read path: metadata, generic tab/range, persona-matrix extraction, and public CSV export. The boundary between sheets_read_tab and sheets_read_persona_matrix is a bit soft (the latter is a specialized tab read), but descriptions make the difference clear.
All names use the sheets_ prefix with a verb_noun shape (sheets_read_tab, sheets_read_public_csv). The lone deviation is sheets_get_metadata using 'get' instead of 'read', which is a minor inconsistency rather than a confusing one.
Four tools is a sensible surface for a deliberately read-only Sheets server. No obvious padding, though the set is just shy of feeling thin since a couple of tools are narrowly scoped variants.
For a read-only scope, the surface covers the lifecycle: discover sheet structure (metadata), read arbitrary tabs/ranges, handle a specialized matrix format, and access link-shared sheets without OAuth. No write operations exist by design, so there are no true gaps for the stated purpose.
Related MCP Connectors
Connect AI assistants to Google Sheets through controlled tools for reading and updating rows.
Read-only Google Search Console and Google Analytics for AI agents.
Connect an AI assistant to your Google Sheets, Drive, Docs, PDFs, BigQuery and Gmail.
Read and write Google Sheets rows via SheetDB APIs; per-API agent permissions, approved deletes.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to seamlessly interact with Google Sheets through secure OAuth 2.0 authentication. Supports reading, searching, updating spreadsheet data, and managing sheets with smart text replacement and batch operations.MIT
- AlicenseNot gradedqualityDmaintenanceProvides read-only access to Google Sheets data through OAuth 2.0 authentication, enabling users to retrieve spreadsheet metadata, list tabs, and read cell data using natural language queries.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to read, write, and manage Google Sheets through 34 tools across optional toolsets, including formatting, charts, and pivot tables, with OAuth/service-account auth and token-efficient responses.43 npm1MIT
- AlicenseAqualityBmaintenanceEnables AI apps to work with Google Sheets in plain language: finding spreadsheets, reading and writing ranges, managing sheets, formatting, validation, protected ranges, tables, charts, and access control, with deliberate writes and destructive operations clearly marked.26278 npm3MIT