Skip to main content
Glama

MCP Google Sheets Server

This project provides a Model Context Protocol (MCP) server that allows interaction with Google Sheets.

It exposes tools to:

  • List sheets (tabs) within a spreadsheet.

  • Read data from specific cell ranges.

  • Write data to specific cell ranges.

It explicitly does not provide tools for managing Google Drive files (listing, creating, deleting folders/files). Access is restricted to spreadsheet content only.

Prerequisites

  1. Python 3.11+

  2. Google Cloud Project with the Google Sheets API enabled

  3. Service Account Key:

    • Go to the Google Cloud Console and create a new Service Account.

    • Download the service account key file (JSON format).

    • Grant this service account the "Editor" role for the Google Sheets you want to access.

Related MCP server: google-sheets-mcp

How to use

  1. Clone the repository.

    git clone https://github.com/shionhonda/mcp-gsheet.git
  2. Set up Google Credentials:

    • Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the absolute path of your downloaded service account JSON key file.

    export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/service-account-key.json"
    • Alternatively, you can place the key file in a standard location recognized by the Google Cloud client libraries (not recommended for shared environments).

  3. Install Dependencies:

    uv venv
    source .venv/bin/activate
  4. Run the Server

    To develop the server with MCP Inspector:

    mcp dev server.py

    To run the server:

    mcp run server.py

    The server will start and listen for MCP requests over standard input/output (stdio).

Claude Desktop

Add the following to your Claude Desktop configuration:

{
  "mcpServers": {
    "gsheet": {
      "command": "/path/to/uv",
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "/path/to/your/service-account-key.json"
      },
      "args": ["--directory", "/path/to/mcp-gsheet", "run", "server.py"]
    }
  }
}

MCP Tools Provided

  • list_sheets(spreadsheet_id: str) -> list[str]: Lists the names of all sheets in the specified spreadsheet.

  • read_cells(spreadsheet_id: str, range_name: str) -> list[list[str]]: Reads data from the given range (e.g., 'Sheet1!A1:B5').

  • write_cells(spreadsheet_id: str, range_name: str, values: list[list[str]]) -> str: Writes the provided 2D list of values to the specified starting cell/range (e.g., 'Sheet1!C1').

Available Tools

3 tools
list_sheetsB

Lists all sheets (tabs) in a specific Google Spreadsheet.

ParametersJSON Schema
NameRequiredDescriptionDefault
spreadsheet_idYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations supplied, the description carries the full burden of behavioral disclosure, but it only states the basic action. It does not mention the return format, whether the operation is read-only, or any side effects or error conditions; an agent gets only the singular purpose, not the behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no redundant words. It is short, readable, and does not waste space repeating the tool name or title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of an output schema and no annotations, the description must explain at least the response format, but it does not describe anything about the returned data (e.g., a list of sheet names/titles). This is a significant gap for an agent integrator, since the tool's behavior is minimal for real use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the description adds no meaning for spreadsheet_id. It merely restates that the spreadsheet is specific, without explaining the ID's format, origin, or how it is used in the operation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: it lists all sheets in a specific Google Spreadsheet. The verb 'lists', resource 'sheets', and scope 'specific Google Spreadsheet' are explicit, and the tool is clearly distinct from the cell-level sibling tools read_cells and write_cells.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives, no prerequisites are mentioned (e.g., how to obtain the spreadsheet_id), and there is no suggestion of a workflow such as listing sheets before reading cells. Usage is implied only by the tool's name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_cellsB

Reads data from a specified range in a Google Sheet.

ParametersJSON Schema
NameRequiredDescriptionDefault
range_nameYes
spreadsheet_idYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. The verb 'Reads' implies a non-destructive operation, but nothing else is disclosed: no return format, error behavior, or range syntax expectations. Beyond the inherent safety signal, the description adds no behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single efficient sentence with the verb front-loaded and no wasted words. It is appropriately sized for a simple 2-parameter tool, though its brevity edges toward under-specification, which is separately penalized in other dimensions.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite the tool being simple, there are no annotations, no output schema, and 0% parameter schema descriptions, so this one sentence carries the entire informational burden. It leaves the return shape, range syntax, and error behavior unspecified, and an agent would frequently need to guess at these details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It partially does: 'a specified range' maps to range_name and 'Google Sheet' maps to spreadsheet_id, giving both parameters some conceptual grounding that the bare schema lacks. However, it omits format details an agent needs, such as A1 notation for range_name and whether spreadsheet_id expects a URL or raw ID.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Reads') plus a clear resource ('data from a specified range in a Google Sheet'). It differentiates cleanly from its siblings: reading cell data vs listing sheets (list_sheets) vs writing cells (write_cells). An agent can tell this tool apart without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use read_cells versus list_sheets or write_cells. The read/write distinction is only implied by the verb, and there are no explicit conditions, exclusions, or mention of scenarios where a sibling is preferable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

write_cellsB

Writes data to a specified range in a Google Sheet.

ParametersJSON Schema
NameRequiredDescriptionDefault
valuesYes
range_nameYes
spreadsheet_idYes

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description must disclose behavioral traits. It only states that data is written, but does not mention that it overwrites the existing range, potential side effects, authentication requirements, or whether it returns anything. This is insufficient for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that immediately states the core purpose. It is front-loaded and has no wasted words. It is appropriately sized, though it could have included more detail without becoming verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With three required parameters, no annotations, and no output schema, the description is too sparse to fully guide an agent. It does not explain the exact structure of 'values' or the format for 'range_name,' and it omits any return value information, leaving important context gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It vaguely refers to 'data' and 'specified range,' which map to values and range_name, but it does not clarify that values must be a 2D array or how the range should be formatted. This leaves crucial parameter details undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the action ('Writes data') and the resource ('a specified range in a Google Sheet'). This is a specific verb+resource combination that unambiguously differentiates it from siblings list_sheets and read_cells without needing to open the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit statement of when to use this tool versus the siblings. However, the verb 'writes' implies usage for writing data, which is a clear context. It lacks any discussion of when not to use it or which alternative to choose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.1.0
    • First observedlist_sheets
    • First observedread_cells
    • First observedwrite_cells

TDQS

A3.6/5.0

Scored across 3 tools

Disambiguation5/5

Each tool performs a clearly distinct function: listing tabs, reading cell data, and writing cell data. There is no overlap or ambiguity between them.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern: list_sheets, read_cells, write_cells. The naming is uniform and predictable.

Tool Count5/5

Three tools is a well-scoped set for a Google Sheets server focused on basic data operations. Each tool is necessary and there are no redundant additions.

Completeness4/5

The core workflows of listing available sheets and reading/writing cell data are covered. Minor gaps exist such as creating or deleting sheets, but the essential use cases are addressed.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers