# Google Sheets MCP
**English** | [Русский](./README.ru.md)
[](https://www.npmjs.com/package/@a1-x-tech/mcp-google-sheets)
[](https://glama.ai/mcp/servers/A1-x-Tech/mcp-google-sheets)
[](https://github.com/A1-x-Tech/mcp-google-sheets/actions/workflows/ci.yml)
[](./LICENSE)
**A1 Google Sheets MCP** lets an AI app work with Google Sheets in plain language. Find a spreadsheet, read its data, write and append rows, shape sheets and formatting, build charts and share the result.
It uses the Google Sheets API with your Google account. It separates reading from writing, keeps destructive operations explicit and makes the limits of the Sheets API clear instead of implying that every spreadsheet task is possible.
- **20 tools.** Search and create spreadsheets, read and write ranges, manage sheets, formatting, data validation, protected ranges, conditional formats, structured tables, charts and access.
- **Writes are deliberate.** A write is never replayed after an ambiguous failure — a replayed append would duplicate rows — and destructive tools are marked so your AI client can ask first.
- **Sheets only.** Drive is an internal dependency for spreadsheet search and sharing alone; there is no generic Drive tool, and `raw_request` cannot reach Drive.
- **Minimal Google scopes.** `spreadsheets` covers every Sheets tool; a Drive scope is needed only for spreadsheet search and sharing.
Start with a read-only question:
> Find the quarterly budget spreadsheet and summarize what each of its sheets contains.
[Connect the server](#quick-start) · [Explore use cases](#what-you-can-ask-it-to-do) · [Open technical documentation](#technical-documentation)
---
## See it work in a minute
> **You:** Show me the structure of the sales report spreadsheet — its sheets, their sizes and frozen rows.
>
> **Assistant:** Shows the sheets with their sizes, frozen headers and the objects on them. Nothing changes.
>
> **You:** Prepare a “March” sheet as a copy of “February” and clear the numbers, keeping the layout.
>
> **Assistant:** Shows the plan — duplicate the sheet, rename it and clear the data ranges — then asks for confirmation before changing anything.
>
> **You:** Confirm.
>
> **Assistant:** Duplicates the sheet and clears the values. Formatting, data validation and frozen rows stay.
## Contents
- [Quick start](#quick-start)
- [What you can ask it to do](#what-you-can-ask-it-to-do)
- [How a spreadsheet changes](#how-a-spreadsheet-changes)
- [What can change](#what-can-change)
- [Getting access](#getting-access)
- [Configuration](#configuration)
- [Data, limits and background work](#data-limits-and-background-work)
- [Technical documentation](#technical-documentation)
- [Support](#support)
## Quick start
You need Node.js 20+, a Google account and OAuth credentials from a Google Cloud project with the Google Sheets API enabled.
1. [Prepare Google OAuth access](#getting-access).
2. Add the server to your AI app.
3. Ask the read-only question above.
Codex
**In the app:** open **Settings → MCP servers**, select **Add server**, choose **STDIO**, enter the command `npx -y @a1-x-tech/mcp-google-sheets@latest` and environment variables `GOOGLE_SHEETS_CLIENT_ID`, `GOOGLE_SHEETS_CLIENT_SECRET`, `GOOGLE_SHEETS_REFRESH_TOKEN`, then select **Save** and **Restart**.
**From the command line:**
```bash
codex mcp add google-sheets \
--env GOOGLE_SHEETS_CLIENT_ID=your_client_id \
--env GOOGLE_SHEETS_CLIENT_SECRET=your_client_secret \
--env GOOGLE_SHEETS_REFRESH_TOKEN=your_refresh_token \
-- npx -y @a1-x-tech/mcp-google-sheets@latest
```
```bash
codex mcp list
```
[Codex MCP documentation](https://learn.chatgpt.com/docs/extend/mcp?surface=cli)
Claude Code
```bash
claude mcp add \
--env GOOGLE_SHEETS_CLIENT_ID=your_client_id \
--env GOOGLE_SHEETS_CLIENT_SECRET=your_client_secret \
--env GOOGLE_SHEETS_REFRESH_TOKEN=your_refresh_token \
--transport stdio --scope user google-sheets \
-- npx -y @a1-x-tech/mcp-google-sheets@latest
```
```bash
claude mcp list
```
[Claude Code MCP documentation](https://code.claude.com/docs/en/mcp)
Claude Desktop
The current official path is **Settings → Extensions**. For a custom desktop extension, open **Advanced settings → Extension Developer → Install Extension…**, select a `.mcpb` file and follow the prompts.
This repository currently publishes an npm stdio package and does not contain a `.mcpb` bundle. For Claude Desktop builds that still support local configuration, use the following JSON stdio configuration as a fallback:
```json
{
"mcpServers": {
"google-sheets": {
"command": "npx",
"args": ["-y", "@a1-x-tech/mcp-google-sheets@latest"],
"env": {
"GOOGLE_SHEETS_CLIENT_ID": "your_client_id",
"GOOGLE_SHEETS_CLIENT_SECRET": "your_client_secret",
"GOOGLE_SHEETS_REFRESH_TOKEN": "your_refresh_token"
}
}
}
}
```
In those builds, save it to `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS or `%APPDATA%\Claude\claude_desktop_config.json` on Windows.
[Claude Desktop MCP documentation](https://support.claude.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop)
Cursor
Add this to `~/.cursor/mcp.json` on macOS/Linux or `%USERPROFILE%\.cursor\mcp.json` on Windows:
```json
{
"mcpServers": {
"google-sheets": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@a1-x-tech/mcp-google-sheets@latest"],
"env": {
"GOOGLE_SHEETS_CLIENT_ID": "your_client_id",
"GOOGLE_SHEETS_CLIENT_SECRET": "your_client_secret",
"GOOGLE_SHEETS_REFRESH_TOKEN": "your_refresh_token"
}
}
}
}
```
[Cursor MCP documentation](https://cursor.com/docs/mcp)
VS Code
Run **MCP: Open User Configuration** and add:
```json
{
"servers": {
"google-sheets": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@a1-x-tech/mcp-google-sheets@latest"],
"env": {
"GOOGLE_SHEETS_CLIENT_ID": "${input:sheets_client_id}",
"GOOGLE_SHEETS_CLIENT_SECRET": "${input:sheets_client_secret}",
"GOOGLE_SHEETS_REFRESH_TOKEN": "${input:sheets_refresh_token}"
}
}
},
"inputs": [
{ "type": "promptString", "id": "sheets_client_id", "description": "Google OAuth client ID" },
{ "type": "promptString", "id": "sheets_client_secret", "description": "Google OAuth client secret", "password": true },
{ "type": "promptString", "id": "sheets_refresh_token", "description": "Google OAuth refresh token", "password": true }
]
}
```
Check it with **MCP: List Servers**.
[VS Code MCP documentation](https://code.visualstudio.com/docs/agent-customization/mcp-servers)
You made it to the end!