Google Sheets MCP Server
March 12, 2025 ยท View on GitHub
An MCP server to read, write, and manage Google Sheets directly through Claude chat.
Features
- List all available spreadsheets
- Open spreadsheets by title or URL
- Create new spreadsheets and worksheets
- Read data from worksheets (entire sheet or specific ranges)
- Update individual cells or ranges of cells
- Append rows to worksheets
Quick Setup
Prerequisites
- Google Sheets API Credentials:
- Go to Google Cloud Console
- Create a new project
- Enable the Google Sheets API and Google Drive API
- Create a Service Account
- Download the JSON credentials file
- Share your target Google Sheets with the service account email
Installing via Smithery (Recommended)
To install Google Sheets MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install sheets-mcp --client claude
Manual Installation
- Clone the repository:
git clone https://github.com/yourusername/sheets-mcp.git
- Install UV globally using Homebrew in Terminal:
brew install uv
-
Create claude_desktop_config.json:
- For MacOS: Open directory
~/Library/Application Support/Claude/and create the file inside it - For Windows: Open directory
%APPDATA%/Claude/and create the file inside it
- For MacOS: Open directory
-
Add this configuration to claude_desktop_config.json:
{
"mcpServers": {
"sheets_mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/sheets-mcp",
"run",
"sheets-mcp"
],
"env": {
"GOOGLE_SHEETS_CREDENTIALS_FILE": "/path/to/your-credentials.json"
}
}
}
}
-
Update the config file:
- Replace
/path/to/sheets-mcpwith your actual repository path - Replace
/path/to/your-credentials.jsonwith the path to your Google Service Account credentials JSON file
- Replace
-
Quit Claude completely and reopen it
Usage Examples
- "Show me all my available spreadsheets"
- "Open my Budget 2025 spreadsheet"
- "List all worksheets in my spreadsheet"
- "Read data from my Expenses worksheet"
- "Update cell A1 to 'Total Expenses' in my Budget worksheet"
- "Add a new row with today's expenses"
- "Create a new spreadsheet called 'Project Tracker'"
Troubleshooting
If not working:
- Make sure UV is installed globally (if not, uninstall with
pip uninstall uvand reinstall withbrew install uv) - Or find UV path with
which uvand replace"command": "uv"with the full path - Verify your Google Sheets API credentials file exists and is correctly referenced
- Check if the sheets-mcp path in config matches your actual repository location
- Ensure your Google Service Account has access to the spreadsheets you're trying to read/write
API Reference
Available Tools
-
list_spreadsheets
- Lists all available spreadsheets
- No parameters required
-
open_spreadsheet
- Opens a spreadsheet by title or URL
- Parameters:
identifier(string) - The title or URL of the spreadsheet
-
list_worksheets
- Lists all worksheets in a spreadsheet
- Parameters:
spreadsheet_id(string) - The ID of the spreadsheet
-
read_worksheet
- Reads data from a worksheet
- Parameters:
spreadsheet_id(string) - The ID of the spreadsheetworksheet_name(string) - The name of the worksheetrange(string, optional) - The range to read (e.g., 'A1:D10')
-
update_cell
- Updates a single cell in a worksheet
- Parameters:
spreadsheet_id(string) - The ID of the spreadsheetworksheet_name(string) - The name of the worksheetcell(string) - The cell reference (e.g., 'A1')value(string/number/boolean) - The value to write
-
update_range
- Updates a range of cells in a worksheet
- Parameters:
spreadsheet_id(string) - The ID of the spreadsheetworksheet_name(string) - The name of the worksheetrange(string) - The range to update (e.g., 'A1:B2')values(2D array) - The values to write
-
append_row
- Appends a row to a worksheet
- Parameters:
spreadsheet_id(string) - The ID of the spreadsheetworksheet_name(string) - The name of the worksheetvalues(array) - The values to append as a new row
-
create_spreadsheet
- Creates a new spreadsheet
- Parameters:
title(string) - The title for the new spreadsheet
-
create_worksheet
- Creates a new worksheet in an existing spreadsheet
- Parameters:
spreadsheet_id(string) - The ID of the spreadsheettitle(string) - The title for the new worksheetrows(integer, optional) - Number of rows (default: 100)cols(integer, optional) - Number of columns (default: 26)