
google sheets mcp
一个用于操作和分析 Google Sheets 数据的 Model Context Protocol 服务器。
Repository Info
About This Server
一个用于操作和分析 Google Sheets 数据的 Model Context Protocol 服务器。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Google Sheets MCP Server
A Model Context Protocol server for manipulating and analyzing Google Sheets data.
Features
- Fetch and update sheet data
- Add, edit, and delete rows
- Add, rename, and transform columns
- Proper async implementation for better performance
- Integration with Claude Desktop
Installation
Using uvx (recommended)
uvx google-sheets-mcp
For Development
- Clone the repository:
git clone https://github.com/riyanshibohra/google-sheets-mcp
cd google-sheets-mcp
- Create a virtual environment with uv:
uv venv
source .venv/bin/activate # On Unix/macOS
- Install dependencies:
uv pip install -r requirements.txt
Usage with Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"google-sheets": {
"command": "uvx",
"args": ["google-sheets-mcp"],
"env": {
"SERVICE_ACCOUNT_PATH": "/path/to/your/service-account-key.json",
"DRIVE_FOLDER_ID": "your_shared_folder_id_here"
}
}
}
}
Alternative Authentication Method
For OAuth authentication, use this configuration instead:
{
"mcpServers": {
"google-sheets": {
"command": "uvx",
"args": ["google-sheets-mcp"],
"env": {
"CREDENTIALS_PATH": "/path/to/your/credentials.json",
"TOKEN_PATH": "/path/to/your/token.json"
}
}
}
}
Example Prompts for Claude
Once connected, you can use prompts like:
- "Fetch data from Sheet1 in my spreadsheet"
- "Add a new row with name 'John' and age '30'"
- "Update the 'status' column for row with ID '123' to 'completed'"
- "Add a new calculated column 'full_name' by combining first and last name"
- "Delete the row where email is 'john@example.com'"
- "Transform the 'date' column to MM/DD/YYYY format"
Development
To run the server locally:
# First check if port 8000 is available
lsof -i :8000
# Start the server
python src/server.py
# Verify the server is running
curl http://localhost:8000/health
The server will start on port 8000 by default. You can change this by setting the PORT environment variable.
License
MIT License - See LICENSE file for details
Quick Start
Clone the repository
git clone https://github.com/riyanshibohra/google-sheets-mcpInstall dependencies
cd google-sheets-mcp
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.