Google Sheets MCP Server
Lists recent spreadsheets from Google Drive so users can discover and access spreadsheets.
Provides full read/write access to Google Sheets via the Google Sheets API v4, including creating and managing spreadsheets, reading/writing/appending/clearing ranges, searching sheets, formatting cells, and retrieving sheet overviews.
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 Server read the sales data from my Q1 spreadsheet and summarize it"
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 production-ready Model Context Protocol server that gives AI assistants full access to Google Sheets. Read, write, format, and manage spreadsheets directly from Claude, GPT, or any MCP-compatible client.
What It Does
This MCP server wraps the Google Sheets API v4 and exposes 14 tools that let AI assistants:
Create and manage spreadsheets
Read and write cell data
Append rows, clear ranges, search across sheets
Apply formatting (bold, colors, number formats, alignment)
Get sheet overviews with sample data
Related MCP server: mcp-google-sheets
Available Tools (14)
Tool | Description |
| List recent spreadsheets from Google Drive |
| Create a new spreadsheet with custom sheet names |
| Get spreadsheet metadata (title, sheets, locale, timezone) |
| List all sheets/tabs in a spreadsheet |
| Add a new sheet/tab |
| Delete a sheet/tab by ID |
| Read cells from a range (e.g., |
| Write a 2D array of values to a range |
| Append rows to the end of a sheet |
| Clear all values in a range |
| Get all values from a sheet |
| Apply formatting (bold, italic, colors, number format, alignment) |
| Search for text across all sheets (case-insensitive) |
| Get row/column counts, headers, and sample data |
Quick Start
Install
npm install -g @xmqywxkris/google-sheets-mcpOr use directly with npx:
npx -y @xmqywxkris/google-sheets-mcpClaude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"google-sheets": {
"command": "npx",
"args": ["-y", "@xmqywxkris/google-sheets-mcp"],
"env": {
"GOOGLE_SERVICE_ACCOUNT_KEY": "/path/to/service-account.json"
}
}
}
}Claude Code
claude mcp add google-sheets -- npx -y google-sheets-mcp
# Set the environment variable
export GOOGLE_SERVICE_ACCOUNT_KEY="/path/to/service-account.json"Authentication
Option 1: Service Account (Recommended)
Full read/write access. Best for automation and production use.
Go to Google Cloud Console
Create a project (or select an existing one)
Enable the Google Sheets API and Google Drive API
Go to Credentials > Create Credentials > Service Account
Create the service account and download the JSON key file
Set the environment variable:
export GOOGLE_SERVICE_ACCOUNT_KEY="/path/to/service-account.json"Important: Share your spreadsheets with the service account email (found in the JSON file as
client_email) to grant access.
Option 2: API Key (Read-Only)
Simpler setup, but only works with publicly shared spreadsheets.
Go to Google Cloud Console
Enable the Google Sheets API
Go to Credentials > Create Credentials > API Key
Set the environment variable:
export GOOGLE_SHEETS_API_KEY="your-api-key"Configuration
Variable | Required | Description |
| One of these | Path to service account JSON key file (full access) |
| is required | Google API key (read-only, public sheets only) |
Usage Examples
Data analysis:
"Read the sales data from my spreadsheet and summarize Q1 results"
Report generation:
"Create a new spreadsheet called 'Monthly KPIs', add headers, and format them bold with a blue background"
Data entry:
"Append these 50 customer records to the Customers sheet"
Search and audit:
"Search all sheets for cells containing 'ERROR' or 'N/A'"
Formatting:
"Bold the header row, set currency format on column C, and color negative values red"
Sheet management:
"Add a 'Summary' tab and populate it with totals from other sheets"
Development
git clone https://github.com/xmqywx/google-sheets-mcp.git
cd google-sheets-mcp
npm install
npm run devBuild for production:
npm run build
npm startCursor Plugin
Install directly in Cursor IDE:
Open Cursor → Settings → Plugins
Search "google-sheets-mcp"
Click Install
Configure your Google credentials in the MCP server settings
Or manually: clone this repo and open it in Cursor — the plugin auto-discovers.
License
MIT
Available Tools
14 toolsadd_sheetC
Add a new sheet/tab to a spreadsheet
Inputs: title (required), spreadsheetId (required).
append_rowsB
Append rows to the end of a sheet
Inputs: range (required), values (required), spreadsheetId (required).
clear_rangeB
Clear all values from a range of cells
Inputs: range (required), spreadsheetId (required).
create_spreadsheetC
Create a new Google Spreadsheet
Inputs: title (required), sheetNames.
delete_sheetC
Delete a sheet/tab from a spreadsheet
Inputs: sheetId (required), spreadsheetId (required).
format_cellsC
Apply formatting to a range of cells (bold, color, number format, alignment)
Inputs: endCol (required), endRow (required), sheetId (required), startCol (required), +9 more.
get_spreadsheetB
Get spreadsheet metadata including title, sheets, and locale
Inputs: spreadsheetId (required).
get_valuesC
Get all values from a sheet
Inputs: sheetName (required), spreadsheetId (required).
list_sheetsB
List all sheets/tabs in a spreadsheet
Inputs: spreadsheetId (required).
list_spreadsheetsB
List recent spreadsheets from Google Drive (requires service account)
Inputs: maxResults.
read_rangeC
Read cells from a range (e.g., 'Sheet1!A1:D10')
Inputs: range (required), spreadsheetId (required).
search_sheetsA
Search for text across all sheets in a spreadsheet
Inputs: query (required), spreadsheetId (required).
sheet_overviewB
Get an overview of a sheet with row/column counts and sample data
Inputs: sheetName (required), spreadsheetId (required), sampleRows.
write_rangeC
Write data to a range in a spreadsheet
Inputs: range (required), values (required), spreadsheetId (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Most tools have clearly distinct actions and resources, but read_range, get_values, and sheet_overview all retrieve cell/range data with only modest differentiation from names and descriptions. search_sheets and list_sheets are also adjacent but still distinguishable.
Almost all names follow a verb_noun snake_case pattern (list_spreadsheets, create_spreadsheet, read_range, append_rows). The main deviation is sheet_overview, which uses a noun_noun form instead of a verb-led pattern.
With 14 tools, the server is well-scoped for spreadsheet work: enough tools to cover spreadsheet, sheet, range, formatting, and search operations without excessive fragmentation.
Core spreadsheet lifecycle and data operations are covered: listing, creating, reading, writing, appending, clearing, formatting, searching, and sheet management. Minor gaps exist, such as no delete_spreadsheet or rename_sheet/update_sheet metadata operation.
Maintenance
Related MCP Connectors
Connect AI assistants to Google Sheets through controlled tools for reading and updating rows.
Connect an AI assistant to your Google Sheets, Drive, Docs, PDFs, BigQuery and Gmail.
Google Sheets via Apify: write Apify datasets or JSON rows to a sheet, or read a sheet as JSON.
Read and write Google Sheets with your own service account: list tabs, read, append, update, export.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides a secure bridge for AI assistants to interact with the Google Sheets API via 31 tools for spreadsheet management, data manipulation, and table-level operations. It supports both Service Account and OAuth 2.0 authentication for tasks including batch updates, CSV imports, and conditional formatting.-
- 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.18MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Google Sheets, performing operations like creating, reading, updating, and clearing spreadsheet data.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to read, write, and manage Google Sheets using the Google Sheets API v4.MIT