Integrates with Google Cloud Console for API management and OAuth 2.0 authentication setup required for Google Sheets access.
Enables access to Google Drive API for listing and managing spreadsheet files accessible through Google Drive integration.
Provides comprehensive tools for reading, searching, and modifying Google Sheets data, including smart cell updates, batch operations, range-based operations, and sheet management capabilities.
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
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:
Start the MCP server
Install the MCP server
Development
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
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
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.