MCP server for Google Sheets operations.
| Tool | Description |
|---|---|
gsheet_list_tabs |
List tabs in a spreadsheet by name or ID |
gsheet_read_range |
Read values from a range |
gsheet_update_range |
Update a range with user-entered values |
gsheet_append_rows |
Append rows to a range |
gsheet_create |
Create a new spreadsheet |
gsheet_search |
Search Drive for spreadsheets by name |
gsheet_clear_range |
Clear all values in a range |
gsheet_touch_range |
Rewrite formulas in a range to trigger recalculation |
- Python 3.10+
- Google account with Sheets and Drive API access
- OAuth desktop client credentials from Google Cloud Console
git clone https://github.com/<your-user>/gsheets-mcp.git
cd gsheets-mcp
python3 -m venv venv
source venv/bin/activate
pip install -e .- Save your OAuth desktop credentials file as
drive_credentials.jsonin the repository root. - Run an auth bootstrap once:
source venv/bin/activate
python -c "from src import sheets_client; sheets_client.authenticate()"- Complete browser consent. A local
token.picklecache will be created.
Add to ~/.claude.json:
{
"mcpServers": {
"gsheets-mcp": {
"type": "stdio",
"command": "/path/to/gsheets-mcp/venv/bin/python",
"args": ["/path/to/gsheets-mcp/run_server.py"]
}
}
}source venv/bin/activate
pytest
python run_server.pyMIT