google-sheet-mcp
# Google Sheets MCP
A local MCP server for creating, reading, and updating Google Sheets.
## Tools
- `sheets_create_spreadsheet` - create a new Google spreadsheet
- `sheets_get_values` - read a range from a sheet
- `sheets_update_values` - overwrite a range
- `sheets_append_values` - append rows
- `sheets_clear_values` - clear a range
- `sheets_add_sheet` - add a new tab
- `sheets_paste_markdown_report` - paste a markdown report as one line per row
## Setup
1. Enable the Google Sheets API for the Google Cloud project.
2. Enable the Google Drive API if you want to create new spreadsheets.
3. Fill `.env` with your OAuth client values.
4. Generate a Sheets-scoped refresh token:
```bash
npm run auth
```
Open the printed Google URL, approve access, then copy the printed `SHEETS_REFRESH_TOKEN` into `.env`.
5. Install and build:
```bash
npm install
npm run build
```
## Codex config
```toml
[mcp_servers.google-sheets]
command = "node"
args = ["/Users/sandeshsonabakhilari/Desktop/my-mcp/google-sheets-mcp/dist/index.js"]
```
The MCP reads credentials from `/Users/sandeshsonabakhilari/Desktop/my-mcp/google-sheets-mcp/.env`.
## Example
Create a spreadsheet:
```json
{
"title": "Gmail Reports",
"sheetTitle": "Read Mail Priority"
}
```
Paste a report:
```json
{
"spreadsheetId": "...",
"range": "Read Mail Priority!A1",
"markdown": "# Report...",
"clearFirst": true
}
```
TDQS
Scored across 7 tools
Each tool targets a distinct action (add sheet, append, clear, create, get, paste markdown, update) with no overlap in purpose, ensuring an agent can easily distinguish them.
All tools follow a consistent 'sheets_verb_noun' pattern (e.g., sheets_add_sheet, sheets_get_values), with only 'sheets_paste_markdown_report' slightly deviating in verb form but still predictable.
Seven tools is well-scoped for a Google Sheets server, covering creation, reading, writing, appending, clearing, tab management, and a specialized markdown paste function without being overwhelming.
The tool set covers core operations (create, read, update, append, clear) and adds tab management and markdown support, though missing explicit delete operations (e.g., delete sheet or row) which are minor gaps.