sheets-mcp
Enables Claude Desktop to read, write, and manage Google Sheets through natural language conversation using the Model Context Protocol.
README
Sheets MCP
Give Claude Desktop the ability to read, write, and manage Google Sheets — directly in conversation.
Overview
Claude has no built-in way to talk to Google Sheets. Sheets MCP is a small local server that sits between Claude Desktop and the Google Sheets/Drive APIs, speaking the Model Context Protocol so Claude can call it like any other tool.
Ask Claude things like:
"List my Google Sheets" "Read A1:D10 from my Budget spreadsheet" "Add a row to my Tasks sheet with today's date and 'Follow up with client'"
...and it actually happens, live, in your real spreadsheet.
How it works
You <──chat──> Claude Desktop <──MCP (stdio)──> Sheets MCP server <──REST──> Google Sheets / Drive API
Claude Desktop starts the server locally, sends it tool calls over stdio, and the server translates those into real Google API requests using a saved OAuth login.
Tools
| Tool | Description | Required arguments |
|---|---|---|
list_sheets |
Find spreadsheets by name | query (optional) |
read_range |
Read cell values from a range | spreadsheetId, range |
write_range |
Overwrite cell values in a range | spreadsheetId, range, values |
append_row |
Add row(s) to the end of a sheet | spreadsheetId, sheetName, values |
The spreadsheetId is the long string in a sheet's URL, between /d/ and /edit:
https://docs.google.com/spreadsheets/d/1XUqH2AumsmusdvsavsdvadsvewrvVAFAvEMcWzUmrlg/edit
└──────────── spreadsheetId ─────────────┘
In practice you can just ask Claude in plain English (e.g. "read my Budget sheet") and it'll use list_sheets to find the ID for you — you don't have to paste it yourself.
Prerequisites
- Node.js 18 or newer
- Claude Desktop already installed
- A Google account with access to the Sheets you want Claude to use
Setup
0. Clone this repo
git clone https://github.com/Luchitha7/sheets-mcp.git
cd sheets-mcp
1. Create Google OAuth credentials
All of this happens in Google Cloud Console, logged into the Google account you want Claude to access sheets as.
- Create a project — top-left project dropdown → New Project → name it (e.g.
sheets-mcp) → Create, then make sure it's selected as the active project. - Enable two APIs — use the top search bar to find and enable, one at a time:
Google Sheets APIGoogle Drive API(needed so the server can look up a spreadsheet by name, not just by ID)
- Set up the consent screen — left sidebar → Google Auth Platform → Branding (older docs may call this "OAuth consent screen," it's the same thing).
- User type: External (unless you're on a Google Workspace org)
- Fill in app name + your email, click through the wizard (Audience, Contact Information, Finish)
- On the Audience page, scroll to Test users → Add users → add your own Google account email. Skip this and Google will block your login later with an
access_deniederror, since unpublished apps only allow pre-approved accounts to sign in.
- Create the OAuth Client ID — left sidebar → Clients → Create OAuth client
- Application type: Desktop app (not "Web application" — a desktop app client is built for a local script doing its own login, not a website with a public redirect URL)
- Name it anything, e.g.
Sheets MCP Desktop, click Create
- Download the credentials — a popup shows a Client ID and Client Secret. If clicking "Download JSON" there doesn't produce a file (a known quirk), instead go to Clients → click your new client → use the download icon next to Client secret on its detail page.
- Save the downloaded file as
credentials/gcp-oauth-client.jsonin this project.
2. Install dependencies
npm install
3. Log in to Google (one-time)
npm run auth
This opens your browser to log in and grant access, then saves a token to credentials/token.json. You won't need to log in again unless access is revoked.
4. Connect it to Claude Desktop
Open Claude Desktop → Settings → Developer → Edit Config, and add this server under mcpServers (keep any existing entries in the file):
{
"mcpServers": {
"sheets-mcp": {
"command": "node",
"args": ["/absolute/path/to/sheets-mcp/server.js"]
}
}
}
Fully quit and reopen Claude Desktop. sheets-mcp should now appear under Settings → Developer → Local MCP servers.
Project structure
sheets-mcp/
├── server.js # The MCP server — exposes the 4 tools to Claude
├── auth.js # Shared OAuth login + token refresh logic
├── auth-setup.js # One-time login script (npm run auth)
├── credentials/ # gcp-oauth-client.json + token.json (gitignored)
└── package.json
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
access_denied during login |
App is in "Testing" mode | Add your Google account under Audience → Test users |
Drive API has not been used... |
Drive API not enabled on the project | Enable it in Google Cloud Console, wait a minute, retry |
| Server missing from Claude Desktop | Config not picked up | Fully quit and reopen Claude Desktop (not just close the window) |
| Login expired / revoked | Token no longer valid | Rerun npm run auth |
Security notes
credentials/gcp-oauth-client.jsonandcredentials/token.jsoncontain secrets and are gitignored — never commit or share them.- The server only requests the minimum scopes needed: read/write Sheets, and read-only Drive metadata (to list files).
License
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。