Google Sheets MCP Server
Enables AI agents to seamlessly interact with Google Sheets through secure OAuth 2.0 authentication. Supports reading, searching, updating spreadsheet data, and managing sheets with smart text replacement and batch operations.
README
Google Sheets MCP Server
A Model Context Protocol (MCP) server that provides seamless integration with Google Sheets, enabling AI agents to read, search, and intelligently modify spreadsheet data.
Features
- 📊 Read spreadsheet data by file, sheet, or specific range
- ✏️ Smart cell updates with partial text replacement
- 🔍 Search and filter capabilities across sheets
- 📝 Preserve formatting and formulas during updates
- 🔐 Secure OAuth 2.0 authentication
- ⚡ Batch operations for efficient bulk updates
- 🛡️ Type-safe with full TypeScript support
Quick Start
Prerequisites
- Node.js 18+
- Google Cloud Project with Sheets API enabled
- OAuth 2.0 credentials from Google Cloud Console
Installation
npm install
Configuration
-
Enable Google Sheets API
- Go to Google Cloud Console
- Create a new project or select existing one
- Enable "Google Sheets API" and "Google Drive API"
- Create OAuth 2.0 credentials (Desktop app)
-
Set up environment variables
Create a .env file:
# Google OAuth 설정
GOOGLE_CLIENT_ID=your_client_id
GOOGLE_CLIENT_SECRET=your_client_secret
GOOGLE_REDIRECT_URI=http://localhost:3000/oauth/callback
# 서비스 계정 설정 (선택사항)
GOOGLE_SERVICE_ACCOUNT_KEY_PATH=./path/to/service-account-key.json
- Start the MCP server
# Development
npm run dev
# Production
npm run build
npm start
- Install the MCP server
# add this to mcp.json etc.
"google-sheets-mcp-server": {
"command": "node",
"args": ["YOUR_PATH/google-sheets-mcp/dist/index.js"],
"env": {
"GOOGLE_CLIENT_ID":"YOUR_CLIENT_ID",
"GOOGLE_CLIENT_SECRET":"YOUR_CLIENT_SECRET",
"GOOGLE_REDIRECT_URI":"http://localhost:3000/oauth/callback",
"NODE_ENV":"development",
"LOG_LEVEL":"info"
}
}
Development
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build for production
npm run build
# Run tests
npm test
# Lint code
npm run lint
# Format code
npm run format
Available Tools
Read Tools
sheets_list_files- List accessible spreadsheetssheets_list_sheets- List sheets in a spreadsheetsheets_read_data- Read all data from a sheetsheets_read_range- Read data from a specific rangesheets_search- Search for text in cells
Update Tools
sheets_update_cell- Update a single cellsheets_update_range- Update multiple cellssheets_smart_replace- Smart text replacementsheets_append_rows- Add new rows
Management Tools
sheets_create_sheet- Create a new sheetsheets_delete_sheet- Delete a sheetsheets_rename_sheet- Rename a sheet
Documentation
- API Reference - Complete tool documentation
- Tutorials - Step-by-step guides
- Contributing - How to contribute
Features
- ✅ OAuth 2.0 Authentication - Secure Google account integration
- ✅ Service Account Support - For automated workflows
- ✅ Smart Text Replacement - Partial text updates with context preservation
- ✅ Batch Operations - Efficient bulk updates
- ✅ Error Handling - Comprehensive error management with retry logic
- ✅ Rate Limiting - Built-in API quota management
- ✅ Type Safety - Full TypeScript support
- ✅ Comprehensive Testing - Unit and integration tests
Performance
- Read operations: < 2 seconds for sheets up to 10,000 cells
- Write operations: < 5 seconds for batches up to 1,000 cells
- Smart replace: < 3 seconds for sheets up to 5,000 cells
- Rate limiting: 60 requests per minute by default
Security
- OAuth tokens stored securely using system keychain
- All API communications use HTTPS
- No sensitive data logged
- Read-only mode available for sensitive spreadsheets
- Input validation and sanitization
License
MIT
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。