# google-sheets-mcp [Health: Active]

**Category:** 🏢 Workplace & Productivity  
**Repository:** https://github.com/mmedum/google-sheets-mcp  
**GitHub Stars:** 0  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/google-sheets-mcp-2

## Description
Google Sheets as MCP tools: read ranges, write without destroying formulas, format and validate.

## Tools
Capabilities this server exposes over MCP:

- **get_spreadsheet** — The spreadsheet card: title, link, locale, and every sheet's exact title, id, size, frozen rows, hidden state and what it holds, plus named ranges, tables, protected ranges and filter views. No cell data, so it costs the same on a spreadsheet of ten cells and one of ten million. Call it first
- **read_range** — An addressed grid of a range: column letters across the top, row numbers down the side. `show=both` prints each formula under the value it produced. Budgeted in cells and characters, with a continuation, and every read returns a checkpoint. `ranges` reads several at once
- **read_formatting** — What a range looks like — number formats, fonts, colors, borders, alignment — per block of identically formatted cells rather than per cell, with the merges, conditional rules, banding, validation and notes that decide how a cell looks without being on the cell
- **search_spreadsheets** — Find a spreadsheet by part of its title, by text inside it, by owner or by when it changed
- **find_in_spreadsheet** — Search one spreadsheet for text or an RE2 pattern and get back A1 addresses, saying whether each match was in a value, in the formula under it, or in a note beside it
- **create_spreadsheet** — A new spreadsheet, optionally with extra sheets and seed values. Returns its card, including the id every later call needs
- **write_values** — Write a rectangle, refusing first anything the write would destroy that you cannot see, then reporting every value Google stored differently from how it was sent. An overwrite carries the checkpoint of what it replaces
- **append_rows** — Add rows after a block of data and report where they actually landed — Google decides the destination, and the same sheet given different ranges appends in different places. It inserts, so it never writes over a row
- **format_cells** — Number format, font, colors, borders, alignment, wrapping, merges and notes, applied in one atomic batch. A merge, a clear and a note are the three that take something away, and each is refused until acknowledged
- **manage_range** — Add, update or delete what is attached to a range: a named range, a protected range, a validation rule, a table and the types of its columns, banding, or a conditional format rule or color scale. Existing ones are named by the range they cover, not by an id. A protected range's editors must already…
- **transform_range** — Sort, replace, trim, de-duplicate, split, shuffle, fill, copy or move a range — the operations that move data without you naming its new address, so each reads what it would land on first
- **manage_anchor** — Label a row, column or sheet so it can be found again after the spreadsheet has been edited around it. An anchor follows its row through inserts, deletes, moves and sorts, where an A1 address goes stale the moment somebody inserts a row. Pass `anchor:<name>` anywhere a range or band is taken, excep…
- **manage_chart** — Add, update, move, delete or list charts and slicers. A chart floats above the grid, so adding one overwrites nothing, and its data is named in A1, one range per series. A listing reports which charts have lost their series — what deleting a charted column does, and what nothing in Sheets tells you
- **manage_pivot_table** — Add, update, delete or list pivot tables, with groups by date or number ranges, filters and calculated values. Columns are named in A1 or by their heading, never by counting, and every result reports the rectangle the table covers right now: the size is computed from the data rather than chosen. A…
- **connect_data_source** — Off by default: connect a BigQuery query or table through Connected Sheets. Google makes a sheet for it and runs the query, charged to the Cloud project you name, now and on every refresh
- **manage_data_source** — Off by default: refresh one Connected Sheets data source, cancel a refresh, or list what is connected. `get_spreadsheet` already says whether a spreadsheet has one, with no extra scope
- **read_cell_comments** — The comment threads on a spreadsheet's cells: the cell each is on now, open or resolved, who it is assigned to, and every post. A thread follows its cell as rows move, and one whose row was deleted is still listed, without a cell
- **manage_cell_comment** — Comment on a cell, reply, edit a post, resolve or reopen. Google emails an assignee, and may notify an address the text names, which is how this server reaches someone outside the spreadsheet
- **manage_sheet** — Add, rename, duplicate, copy to another spreadsheet, hide, unhide, reorder, resize, freeze or color a sheet
- **edit_dimensions** — Insert, move, resize, auto-size, group, ungroup, hide or unhide rows and columns
- **delete_dimensions** — Destructive, off by default: remove rows or columns and the data on them, having counted what that is
- **clear_values** — Destructive, off by default: clear a range's values and keep its formatting, notes and validation rules
- **delete_sheet** — Destructive, off by default: delete a sheet and everything on it, having counted what that is
- **delete_cell_comment** — Destructive, off by default: delete a comment thread with its replies, or one reply. Resolving keeps it, and is usually what is wanted
- **delete_data_source** — Destructive, off by default: delete a Connected Sheets data source, the sheet Google made for it, and everything on that sheet; Google unlinks what was built on the source. The call names that sheet's title. Needs no BigQuery scope, so it reaches a source somebody else connected

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/mmedum/google-sheets-mcp), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
go install github.com/mmedum/google-sheets-mcp/v4/cmd/google-sheets-mcp@latest
```

2. Sign in:

```sh
google-sheets-mcp login -secret ./client_secret.json
```

3. Add to Claude Code:

```sh
claude mcp add google-sheets -- google-sheets-mcp
```

## Documentation

## What google-sheets-mcp does

google-sheets-mcp turns Google Sheets into a collection of MCP tools for agents and other MCP clients. It works within spreadsheets: reading cells and formulas, changing values, applying formatting, managing sheet structure, and inspecting or modifying objects attached to ranges. Spreadsheet discovery is supported through a Drive search operation, but broader file actions such as sharing, moving, deleting, or revision management are outside its scope.

The tool set covers both ordinary grid work and higher-level Sheets features. Agents can create spreadsheets, add or reorganize sheets, insert or resize rows and columns, manage named ranges and protected ranges, work with tables and validation, and operate on charts, slicers, pivot tables, and Connected Sheets data sources. Cell comments and notes are handled separately, including comment replies and resolution state.

## How it works

The server is a local Go executable that communicates with an MCP client over stdio. It uses the Google Sheets API for spreadsheet operations and the Drive API only for finding spreadsheets. Authentication uses a user-created Google OAuth desktop client. After `login` completes, the refresh token is kept in the OS keyring; if no keyring is available, it is stored in a permissions-restricted file under the configuration directory.

Ranges use A1 notation, with sheet titles handled for the caller. Reads return checkpoints and can continue when output is limited by cell or character budgets. Formatting reads describe contiguous blocks with the same formatting and also include related features such as merges, conditional formatting, banding, validation, and notes.

Writes are deliberately guarded. `write_values` checks the destination before changing it, refuses unsafe overwrites unless the relevant options are supplied, and reports values that Google stores differently from the submitted values. Operations that remove data or structure are disabled by default and require explicit enablement or acknowledgement. Durable anchors can identify rows, columns, or sheets even after edits make an A1 address obsolete.

## Setup and configuration

Create a Google Cloud project, enable the Google Sheets API and Google Drive API, configure the OAuth consent screen, and create a Desktop app OAuth client. Install the binary with:

```bash
go install github.com/mmedum/google-sheets-mcp/v4/cmd/google-sheets-mcp@latest
```

Authenticate it with:

```bash
google-sheets-mcp login -secret ./client_secret.json
```

The login flow opens a browser when possible and uses a loopback callback with PKCE and state protection. `status` reports the signed-in account and credential location, `logout` revokes the token and removes the local copy, and `doctor` checks credentials, granted scopes, and Google API responses.

Normal operation requires spreadsheet access and read-only Drive access. Connected Sheets additionally requires the BigQuery read-only scope and the `GSHEETS_ENABLE_DATA_SOURCES` setting. Setting `GSHEETS_READ_ONLY=true` requests read-only spreadsheet access and prevents write tools from being registered. Claude Desktop can install the release bundle, while Claude Code uses a normal command configuration; the bundle still requires a prior binary login.

## Tools and capabilities

- Inspect spreadsheet metadata, sheets, named ranges, tables, protections, and filter views with `get_spreadsheet`.
- Read values, formulas, formatting, comments, and cell-level matches with `read_range`, `read_formatting`, `find_in_spreadsheet`, and comment tools.
- Create spreadsheets, write or append values, format cells, clear values, and transform ranges.
- Add, update, or remove validations, tables, banding, conditional formats, protected ranges, and named ranges.
- Manage sheets, dimensions, anchors, charts, slicers, pivot tables, and Connected Sheets sources.
- Search spreadsheets by title, content, owner, or modification time through `search_spreadsheets`.

_Full upstream README: https://allmcps.com/mcp/google-sheets-mcp-2/readme_

