# Google Sheets

MCP server for Google Sheets : read, write, format, and manage spreadsheets through 23 tools.

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add node2flow/google-sheets

# Browse available tools
npx -y @smithery/cli@latest tool list node2flow/google-sheets

# Get full schema for a tool
npx -y @smithery/cli@latest tool get node2flow/google-sheets gs_create_spreadsheet

# Call a tool
npx -y @smithery/cli@latest tool call node2flow/google-sheets gs_create_spreadsheet '{}'
```

## Direct MCP Connection

Endpoint: `https://google-sheets--node2flow.run.tools`

**Required config:**
- `GOOGLE_CLIENT_ID` (query) — OAuth 2.0 Client ID from Google Cloud Console
- `GOOGLE_CLIENT_SECRET` (query) — OAuth 2.0 Client Secret
- `GOOGLE_REFRESH_TOKEN` (query) — Refresh token with spreadsheets scope (from OAuth consent flow or OAuth Playground)

## Tools (23)

- `gs_create_spreadsheet` — Create a new Google Sheets spreadsheet. Optionally specify sheet/tab names, locale, and timezone. Returns the spreadshe…
- `gs_get_spreadsheet` — Get spreadsheet metadata — title, sheets list with properties (ID, title, row/column count, frozen rows), and optionall…
- `gs_read_values` — Read cell values from a range using A1 notation (e.g. "Sheet1!A1:C10", "A1:Z", "Sheet1"). Returns a 2D array of values.
- `gs_batch_read` — Read values from multiple ranges at once. More efficient than multiple gs_read_values calls.
- `gs_write_values` — Write values to a range. Values are provided as a 2D array (rows of columns). By default uses USER_ENTERED input (formu…
- `gs_append_values` — Append rows after the last row with data in the specified range. Automatically finds the end of existing data and adds …
- `gs_clear_values` — Clear all values in a range. Only clears values — formatting, data validation, and other properties are preserved.
- `gs_batch_write` — Write values to multiple ranges at once. More efficient than multiple gs_write_values calls.
- `gs_add_sheet` — Add a new sheet/tab to a spreadsheet. Optionally set row/column count and tab color.
- `gs_delete_sheet` — Delete a sheet/tab from a spreadsheet. Use gs_get_spreadsheet to find the sheet_id first. This action is irreversible.
- `gs_rename_sheet` — Rename a sheet/tab in a spreadsheet.
- `gs_copy_sheet` — Copy a sheet/tab to another spreadsheet. The authenticated user must have edit access to the destination spreadsheet.
- `gs_duplicate_sheet` — Duplicate a sheet/tab within the same spreadsheet. Creates a copy with an optional new name.
- `gs_format_cells` — Apply formatting to cells in a range — bold, italic, font size, colors, alignment, number format, and more. Uses 0-base…
- `gs_merge_cells` — Merge cells in a range. All values except the top-left cell are cleared.
- `gs_unmerge_cells` — Unmerge previously merged cells in a range.
- `gs_auto_resize` — Auto-resize columns or rows to fit their content.
- `gs_sort_range` — Sort a range of data by a specific column. Uses 0-based indices for the range and sort column.
- `gs_find_replace` — Find and replace text across one sheet or all sheets. Supports case-sensitive and regex search.
- `gs_set_basic_filter` — Set or clear a basic filter (auto-filter) on a sheet. When set, filter dropdowns appear in column headers.
- `gs_add_protected_range` — Protect a range of cells from editing. Optionally allow specific editors or show a warning instead of blocking.
- `gs_add_chart` — Add a chart to a sheet. Specify chart type, data range, and anchor position. The chart is overlaid on the sheet.
- `gs_batch_update` — Send a raw batchUpdate request with one or more request objects. Use this for advanced operations not covered by other …

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get node2flow/google-sheets <tool-name>
```

## Resources

- `google-sheets://server-info` — Connection status and available tools for this Google Sheets MCP server

## Prompts (2)

- `read-and-analyze` — Guide for reading spreadsheet data and analyzing values
- `write-and-format` — Guide for writing data, formatting cells, and managing sheets

---

License: MIT
