Google Sheets MCP Server
Read, write, create, and manage Google Sheets through AI assistants with 19 tools for data operations, charts, sharing, and batch updates.
Overview
The Google Sheets MCP Server enables AI assistants to read, write, create, and manage spreadsheets in Google Sheets. With 19 tools covering data CRUD, batch operations, chart creation, sheet management, formula reading, and sharing, it provides comprehensive access to the Google Sheets API through natural language.
Popular Community Server:
Developed by xing5 with 840+ stars on GitHub. Python-based, installable via uvx. Supports Service Account, OAuth 2.0, and Application Default Credentials.
Key Features
Read & Write Data
Read cell values and formulas, update ranges, and perform batch writes across multiple ranges in one call.
Chart Creation
Create column, bar, line, area, pie, scatter, and combo charts from spreadsheet data with custom labels.
Sheet Management
Create, rename, copy sheets across spreadsheets, add rows and columns at specified positions.
Share & Collaborate
Share spreadsheets with users by email with reader, commenter, or writer roles. Send notifications.
Find & Search
Search for values across spreadsheets, list and search spreadsheets by name, and get multi-sheet summaries.
Tool Filtering
Reduce context usage by enabling only the tools you need via command-line args or environment variables.
Available Tools
Quick Reference
| Tool | Purpose | Category |
|---|---|---|
list_spreadsheets | List spreadsheets in the configured folder | Discovery |
create_spreadsheet | Create a new spreadsheet | Write |
get_sheet_data | Read data from a range | Read |
get_sheet_formulas | Read formulas from a range | Read |
get_multiple_sheet_data | Fetch data from multiple ranges | Read |
get_multiple_spreadsheet_summary | Get summaries of multiple spreadsheets | Read |
update_cells | Write data to a range | Write |
batch_update_cells | Update multiple ranges in one call | Write |
add_rows | Insert empty rows | Structure |
add_columns | Insert empty columns | Structure |
list_sheets | List all sheet names | Discovery |
create_sheet | Add a new sheet | Structure |
rename_sheet | Rename a sheet | Structure |
copy_sheet | Copy a sheet to another spreadsheet | Structure |
find_in_spreadsheet | Search for values | Search |
search_spreadsheets | Search spreadsheets by name | Search |
share_spreadsheet | Share with users | Collaboration |
add_chart | Create a chart | Visualization |
Detailed Usage
get_sheet_data▶
Read data from a range in a sheet.
use_mcp_tool({
server_name: "google-sheets",
tool_name: "get_sheet_data",
arguments: {
spreadsheet_id: "abc123",
sheet: "Sheet1",
range: "A1:C10"
}
});
update_cells▶
Write data to a specific range, overwriting existing content.
use_mcp_tool({
server_name: "google-sheets",
tool_name: "update_cells",
arguments: {
spreadsheet_id: "abc123",
sheet: "Sheet1",
range: "A1:C3",
data: [[1, 2, 3], ["a", "b", "c"]]
}
});
add_chart▶
Create a chart from spreadsheet data. Supports column, bar, line, area, pie, scatter, combo, and histogram types.
use_mcp_tool({
server_name: "google-sheets",
tool_name: "add_chart",
arguments: {
spreadsheet_id: "abc123",
sheet: "Sheet1",
chart_type: "COLUMN",
data_range: "A1:C10",
title: "Monthly Revenue"
}
});
share_spreadsheet▶
Share a spreadsheet with recipients, assigning reader, commenter, or writer roles.
use_mcp_tool({
server_name: "google-sheets",
tool_name: "share_spreadsheet",
arguments: {
spreadsheet_id: "abc123",
recipients: [
{ email_address: "[email protected]", role: "writer" }
],
send_notification: false
}
});
Installation
{
"mcpServers": {
"google-sheets": {
"command": "uvx",
"args": [
"mcp-google-sheets@latest"
],
"env": {
"SERVICE_ACCOUNT_PATH": "/path/to/service-account-key.json",
"DRIVE_FOLDER_ID": "your_drive_folder_id"
}
}
}
}
Google Cloud Setup Required:
You need a Google Cloud Project with the Sheets API and Drive API enabled. Create a Service Account, share a Drive folder with it, and set SERVICE_ACCOUNT_PATH and DRIVE_FOLDER_ID environment variables.
Authentication
The server supports multiple authentication methods checked in order:
| Method | Variable | Best For |
|---|---|---|
| Service Account | SERVICE_ACCOUNT_PATH | Servers, automation |
| OAuth 2.0 | CREDENTIALS_PATH | Interactive / personal use |
| Credentials Config | CREDENTIALS_CONFIG (Base64) | Docker, CI/CD |
| Application Default | GOOGLE_APPLICATION_CREDENTIALS | GCP environments |
Configuration
Tool Filtering
Reduce context usage by enabling only the tools you need:
{
"mcpServers": {
"google-sheets": {
"command": "uvx",
"args": [
"mcp-google-sheets@latest",
"--include-tools",
"get_sheet_data,update_cells,list_spreadsheets,list_sheets"
],
"env": {
"SERVICE_ACCOUNT_PATH": "/path/to/credentials.json"
}
}
}
}
Reducing Context:
All 19 tools consume ~13K tokens. Use --include-tools or the ENABLED_TOOLS environment variable to enable only the tools you actually use.
Common Use Cases
- Data Entry Automation: Populate and update spreadsheet data from AI conversations
- Report Generation: Create formatted reports with charts, summaries, and structured data
- Inventory Management: Track and update inventory lists, pricing, and stock levels
- Collaborative Editing: Read, analyze, and update shared spreadsheets during team workflows
- Multi-Sheet Analysis: Query multiple spreadsheets and sheets in a single operation
Sources
Related Articles
Txtai MCP Server
Txtai MCP servers enable AI models to interact with txtai, an AI-powered search engine that builds vector indexes (also known as embeddings) to perform similarity searches.
Moralis MCP Server
Moralis MCP servers enable AI models to query on-chain data — wallet activity, token metrics, NFTs, and dapp usage — via the Moralis Web3 APIs.
Seq MCP Server: Real-time Log Analytics for AI Models
Search, stream, and analyze structured log events from Datalust Seq using the Seq MCP Server. Integrate log analytics directly with AI assistants through the Model Context Protocol.