Google Sheets MCP
MCP server for Google Sheets — read, write, append, and clear data in any spreadsheet using OAuth. Works with Claude Desktop and any MCP client.
Google Sheets MCP
A Model Context Protocol (MCP) server that gives Claude (and other MCP clients) read/write access to any Google Sheet via OAuth.
Tools
| Tool | Description |
|---|---|
read_sheet | Read data from any range in a spreadsheet |
write_sheet | Write or update data in a spreadsheet |
append_rows | Append new rows to a spreadsheet |
get_sheet_info | Get sheet names, row counts, and column counts |
clear_range | Clear a range of cells |
All tools accept a full Google Sheets URL or a bare spreadsheet ID.
Prerequisites
- Node.js 18+
- A Google account
- A Google Cloud project (free)
Setup
1. Clone the repo
git clone https://github.com/generalist-club/google-sheets-mcp.git
cd google-sheets-mcp
npm install
2. Create a Google Cloud project & OAuth credentials
- Go to Google Cloud Console
- Create a new project (or select an existing one)
- Enable the Google Sheets API and Google Drive API:
- Navigate to APIs & Services → Library
- Search for and enable both APIs
- Create OAuth credentials:
- Navigate to APIs & Services → Credentials
- Click Create Credentials → OAuth client ID
- Application type: Desktop app
- Download the JSON file
- Rename the downloaded file to
credentials.jsonand place it in the project root
3. Authenticate
Run the auth script to generate your token:
node auth.js
It will print a URL. Open it in your browser, authorize the app, then paste the code back into the terminal. This creates a token.json file locally — keep it secret.
Token refresh: The server automatically refreshes the access token when it expires. You should only need to run
auth.jsonce.
4. Configure Claude Desktop (or any MCP client)
Add this server to your Claude Desktop config at ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"google-sheets": {
"command": "node",
"args": ["/absolute/path/to/google-sheets-mcp/index.js"]
}
}
}
Replace /absolute/path/to/google-sheets-mcp with the actual path on your machine.
Restart Claude Desktop. The five Google Sheets tools will now be available.
Usage examples
Once connected, you can ask Claude things like:
- "Read the data from this spreadsheet:
https://docs.google.com/spreadsheets/d/..." - "Append a new row with today's date and 42 to Sheet1"
- "What sheets are in this workbook and how many rows does each have?"
- "Clear the range B2:D10 in my spreadsheet"
Security notes
credentials.jsonandtoken.jsonare excluded from git via.gitignore— never commit them- The OAuth token is stored locally and only grants access to your own Google account
- Scopes requested:
spreadsheets(read/write) anddrive.readonly(to resolve sheet metadata)
License
MIT
相關伺服器
CMP MCP Server
An MCP server for CMP API integration, built to run on Cloudflare Workers.
CISA M365 MCP Server
Implements CISA Binding Operational Directive 25-01 security controls for Microsoft 365 and Azure AD/Entra ID.
Umbrix MCP Server
An MCP server for the Umbrix CTI platform, providing AI-powered threat intelligence.
Strava MCP Server
Access the Strava API to interact with activities, athlete information, and other Strava data.
Cisco Hyperfabric MCP
An MCP server that enables LLMs to interact with Cisco Intersight APIs.
Weather MCP Server
Provides weather information using the OpenWeatherMap API.
Elastic Email MCP
The Elastic Email MCP Server enables AI agents like GitHub Copilot, ChatGPT, Claude, and other compatible assistants to seamlessly integrate with your Elastic Email account.
OpenWeatherMap
Provides comprehensive weather data and forecasts using the OpenWeatherMap API.
Deployment.io
Deploy and manage apps on your cloud from coding agents. Create environments, choose regions, configure infrastructure, and monitor jobs. Supports OAuth 2.0 with Dynamic Client Registration, RBAC permissions, and approval workflows for production environments.
Netbird
List and analyze Netbird network peers, groups, policies, and more.