A clean, practical MCP (Model Context Protocol) server for analyzing Google Sheets data with multi-tab support. Built for Claude Code and other MCP-compatible AI assistants by TNTM.
Transform Google Sheets into a conversational database. Ask questions like "What are the top 10 customers by revenue?" and get instant SQL-powered insights through any MCP-compatible AI assistant.
星數
4
工具
—
可用率
—
🚀 Features
Smart Sync - Sync Google Sheets with configurable row limits to prevent timeouts
Multi-tab Support - Query across multiple sheets with SQL JOINs
SQL Queries - Direct SQL access to synced data
Sheet Analysis - Get suggestions for cross-sheet queries
Quick Preview - Preview sheets without full sync
Performance Optimized - Row limits and result pagination for large datasets
📋 Prerequisites
Python 3.8+
Claude Code or another MCP-compatible client
Google Cloud Project with Sheets API enabled
OAuth2 credentials from Google Cloud Console
🛠️ Setup
⚡ One-Click Setup with Claude Code (Recommended)
Drag this project folder into Claude Code
Ask Claude Code: "Follow the README instructions to install this MCP server into Claude Code"
Get Google OAuth credentials (Claude Code will guide you through this):
Download and save as credentials.json in the project root
That's it! Claude Code will handle virtual environments, dependencies, and OAuth setup automatically.
🚀 Automated Installation (Alternative)
For non-Claude Code users or manual setup:
Option 1: Shell Script (macOS/Linux)
# Download and run the automated installer
curl -sSL https://raw.githubusercontent.com/yourusername/google-sheet-analytics-mcp/main/install.sh | bash
# Or clone first, then run
git clone https://github.com/yourusername/google-sheet-analytics-mcp.git
cd google-sheet-analytics-mcp
./install.sh
Option 2: Python Script (All platforms)
# Clone the repository
git clone https://github.com/yourusername/google-sheet-analytics-mcp.git
cd google-sheet-analytics-mcp
# Run the Python installer
python3 setup.py
Query Response: <1 second for most queries on 1M rows
Memory Usage: Constant ~200-500MB regardless of dataset size
1M Row Sync Time: ~10-20 seconds
🔍 Example Use Cases
Multi-tab Analysis
-- Combine sales data with customer information
SELECT
s.product_name,
s.sales_amount,
c.customer_name,
c.customer_segment
FROM sales_data s
JOIN customer_data c ON s.customer_id = c.id
WHERE s.sales_amount > 1000
Cross-sheet Aggregation
-- Total revenue by region from multiple sheets
SELECT
region,
SUM(amount) as total_revenue
FROM (
SELECT region, amount FROM q1_sales
UNION ALL
SELECT region, amount FROM q2_sales
)
GROUP BY region
ORDER BY total_revenue DESC
🔒 Security
OAuth2 authentication with Google
Credentials stored locally (never committed to repo)
Read-only access to Google Sheets
Local SQLite database (no external data transmission)
🐛 Troubleshooting
Installation Issues
Issue
Solution
"Failed to reconnect to google-sheets-analytics"
Run automated setup: python3 setup.py or ./install.sh
"ModuleNotFoundError: No module named 'google'"
Dependencies not installed - use automated installer or manual venv setup
"externally-managed-environment"
Use virtual environment (automated installers handle this)
"MCP server not appearing"
Check Claude Code config and restart app
Common Runtime Issues
Issue
Solution
"No credentials found"
Ensure credentials.json exists in project root or config/ directory
"Authentication failed"
Check token status with venv/bin/python src/auth/oauth_setup.py --status
"Token expired"
Run venv/bin/python src/auth/oauth_setup.py --test (auto-refreshes)
"Sync timeout"
Reduce max_rows parameter in smart_sync
"Tools not appearing"
Restart Claude Desktop after configuration
"Rate limit errors"
Wait a few minutes and try again with smaller batches
Need help? Open an issue on GitHub or check the troubleshooting section above.
G
Google Sheet Analytics
talknerdytome-labs·4 顆星·
Transform Google Sheets into a conversational database. Ask questions like "What are the top 10 customers by revenue?" and get instant SQL-powered insights through any MCP-compatible AI assistant.
上次檢查時間:2026-10-28。 Transform Google Sheets into a conversational database. Ask questions like "What are the top 10 customers by revenue?" and get instant SQL-powered insights through any MCP-compatible AI assistant.