MCP Google Sheets Server
Enables reading, writing, and managing Google Sheets documents with support for batch operations, formatting, charts, and conditional formatting through the Model Context Protocol.
README
GoogleSheetsMCP - AgenticLedger Platform
Google Sheets MCP Server
Production-ready MCP server providing comprehensive Google Sheets integration for the AgenticLedger AI Agent Platform.
🚀 Features
- 26 Production-Ready Tools - Complete CRUD operations, formatting, charts, sheet management
- Service Account Authentication - Persistent, shareable credentials
- Batch Operations - 50-70% faster than sequential operations
- Advanced Formatting - Colors, fonts, borders, conditional formatting, cell merging
- Chart Creation - LINE, BAR, COLUMN, PIE, SCATTER, AREA, COMBO charts
- Type-Safe - Full TypeScript with Zod schema validation
- 100% Documented - Comprehensive guides for developers and AI agents
📦 Quick Start
Installation
# Clone repository
git clone https://github.com/oregpt/Agenticledger_MCP_SheetsOnly.git
cd Agenticledger_MCP_SheetsOnly
# Install dependencies
npm install
# Build
npm run build
Authentication Setup
- Create Google Cloud Project (see GOOGLE_CLOUD_SETUP.md)
- Enable Google Sheets API
- Create Service Account and download JSON key
- Configure environment:
# Create .env file
cp .env.example .env
# Edit .env with your credentials
GOOGLE_PROJECT_ID=your-project-id
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-key.json
TEST_SPREADSHEET_ID=your-test-spreadsheet-id
- Share spreadsheets with service account email (from JSON key)
Run Tests
npm run test:integration
🛠️ Available Tools (26)
<details> <summary><b>Reading Data (4 tools)</b></summary>
sheets_check_access- Verify spreadsheet accesssheets_get_values- Read cell values from rangesheets_batch_get_values- Read multiple ranges at oncesheets_get_metadata- Get spreadsheet metadata
</details>
<details> <summary><b>Writing Data (5 tools)</b></summary>
sheets_update_values- Update cell valuessheets_batch_update_values- Update multiple rangessheets_append_values- Append rows to tablesheets_clear_values- Clear cell contentssheets_insert_rows- Insert rows at position
</details>
<details> <summary><b>Sheet Management (6 tools)</b></summary>
sheets_insert_sheet- Create new sheetsheets_delete_sheet- Delete sheetsheets_duplicate_sheet- Duplicate sheetsheets_copy_to- Copy sheet to another spreadsheetsheets_update_sheet_properties- Update sheet propertiessheets_batch_delete_sheets- Delete multiple sheets
</details>
<details> <summary><b>Formatting (6 tools)</b></summary>
sheets_format_cells- Apply cell formattingsheets_batch_format_cells- Format multiple rangessheets_update_borders- Add/modify borderssheets_merge_cells- Merge cellssheets_unmerge_cells- Unmerge cellssheets_add_conditional_formatting- Add conditional rules
</details>
<details> <summary><b>Charts (3 tools)</b></summary>
sheets_create_chart- Create chartsheets_update_chart- Update existing chartsheets_delete_chart- Delete chart
</details>
<details> <summary><b>Additional (2 tools)</b></summary>
sheets_insert_link- Insert hyperlinksheets_insert_date- Insert formatted date/time
</details>
📖 Documentation
For Developers
- README_AGENTICLEDGER.md - Complete integration guide
- PLATFORM_INTEGRATION_REPORT.md - Detailed tool documentation with real API tests
- GOOGLE_CLOUD_SETUP.md - Step-by-step authentication setup
For AI Agents
- ABILITIES_LIMITATIONS.md - Smart workarounds, best practices, optimization strategies
Example Files
.env.example- Environment configuration templateservice-account-key.example.json- Credentials format exampletest-integration.ts- Integration test suite
💡 Example Usage
Read Data
const result = await sheets_get_values({
spreadsheetId: "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
range: "Sheet1!A1:C10"
});
Write Data
await sheets_update_values({
spreadsheetId: "1BxiMVs0XRA...",
range: "Sheet1!A1",
values: [
["Name", "Age", "Email"],
["Alice", "25", "alice@example.com"]
]
});
Format Cells
await sheets_format_cells({
spreadsheetId: "1BxiMVs0XRA...",
range: "Sheet1!A1:C1",
backgroundColor: "#4285F4",
foregroundColor: "#FFFFFF",
bold: true
});
Create Chart
await sheets_create_chart({
spreadsheetId: "1BxiMVs0XRA...",
sheetId: 0,
chartType: "COLUMN",
sourceRange: "Sheet1!A1:B10",
position: { anchorCell: "E1" }
});
🔐 Security
- Never commit credentials (
service-account-key.json,.env) - Share spreadsheets explicitly with service account email
- Use environment variables for sensitive data
- Rotate keys regularly (every 90 days recommended)
- Monitor API usage in Google Cloud Console
📊 Performance
- Average Response Time: 477ms per operation
- Batch Operations: 50-70% faster than sequential
- API Quotas: 100 requests per 100 seconds per user
- Recommendation: Use batch operations for 2+ ranges
🤝 Contributing
This is an AgenticLedger platform-customized version of freema/mcp-gsheets.
AgenticLedger Customizations:
- Platform-specific documentation
- Integration test suite
- AI agent guides
- Example files and templates
📜 License
MIT License - See LICENSE file
🔗 Links
- Repository: https://github.com/oregpt/Agenticledger_MCP_SheetsOnly
- Upstream Source: https://github.com/freema/mcp-gsheets
- AgenticLedger Platform: [Platform Documentation]
- Google Sheets API: https://developers.google.com/sheets/api
📞 Support
-
Check Documentation:
- README_AGENTICLEDGER.md - Integration guide
- PLATFORM_INTEGRATION_REPORT.md - Tool reference
- GOOGLE_CLOUD_SETUP.md - Authentication help
-
Run Diagnostics:
npm run test:integration -
Review Examples:
- See
test-integration.tsfor real API usage examples
- See
Status: ✅ Production Ready Version: 1.5.2 Last Updated: 2025-11-03 Total Tools: 26 Platform: AgenticLedger
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。