Google Sheets MCP Server
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.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Google Sheets MCP Serversearch for 'Q3 sales' in my budget spreadsheet"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: Google Sheet MCP Server
Quick Start
Prerequisites
Node.js 18+
Google Cloud Project with Sheets API enabled
OAuth 2.0 credentials from Google Cloud Console
Installation
npm installConfiguration
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.jsonStart the MCP server
# Development
npm run dev
# Production
npm run build
npm startInstall 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 formatAvailable 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 deployed
Maintenance
Related MCP Connectors
Connect AI assistants to Google Sheets through controlled tools for reading and updating rows.
Multiple Gmail accounts, editable Google Sheets & Docs for AI agents. Deny-by-default access rules.
SEO & marketing toolkit for AI agents: GA4, Search Console, AdSense, GTM, PageSpeed, Trends.
Create and manage documents, spreadsheets, and presentations from your AI assistant.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to create, read, update, and manage Google Sheets data and structure using tools like create, listSheets, sheetData, updateCells, and shareSpreadsheet, supporting OAuth2 and service-account authentication.7,188 npm18MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to read, write, and manage Google Sheets using the Google Sheets API v4.MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to read, write, and format Google Sheets using the Google Sheets API v4.1-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Google Sheets, allowing CRUD operations, sheet management, and data manipulation through natural language.MIT