Skip to main content
Glama

Google Sheets MCP Server

Powerful tools for automating Google Sheets using Model Context Protocol (MCP)

mcp-name: io.github.henilcalagiya/google-sheets-mcp

Overview

Google Sheets MCP Server provides seamless integration of Google Sheets with any MCP-compatible client. It enables full spreadsheet automation — including creating, reading, updating, and deleting sheets — through a simple and secure API layer.

Related MCP server: @node2flow/google-sheets-mcp

Features

  • Full CRUD support for Google Sheets and tables

  • Works with Continue.dev, Claude Desktop, Perplexity, and other MCP clients

  • Secure authentication via Google Service Account

  • Comprehensive tools for Google Sheets automation

  • Automatic installation via uvx

Requirements

  • Python 3.10+

  • uv package manager (for uvx command)

  • A Google Cloud project with a Service Account

  • MCP-compatible client (e.g., Continue.dev)

Install uv:

# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows PowerShell
irm https://astral.sh/uv/install.ps1 | iex

Quick Start

1. Set Up Google Service Account

Step 1: Create a Google Cloud Project

  1. Go to Google Cloud Console

  2. Click "Select a project" → "New Project"

  3. Enter a project name (e.g., "my-sheets-automation")

  4. Click "Create"

Step 2: Enable Required APIs

  1. In your project, go to "APIs & Services" → "Library"

  2. Search for "Google Sheets API" → Click → "Enable"

  3. Search for "Google Drive API" → Click → "Enable"

Step 3: Create Service Account

  1. Go to "IAM & Admin" → "Service Accounts"

  2. Click "Create Service Account"

  3. Enter service account name (e.g., "sheets-mcp-service")

  4. Click "Create and Continue"

  5. Skip role assignment → Click "Continue"

  6. Click "Done"

Step 4: Generate JSON Key

  1. Click on your new service account email

  2. Go to "Keys" tab → "Add Key" → "Create new key"

  3. Choose "JSON" format → Click "Create"

  4. The JSON file will download automatically

Step 5: Extract Required Values Open the downloaded JSON file and note these values:

Example Google service account JSON structure:

{
  "type": "service_account",
  "project_id": "your-project-id",
  "private_key_id": "your-private-key-id",
  "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
  "client_email": "your-service@your-project.iam.gserviceaccount.com",
  "client_id": "your-client-id",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/your-service%40your-project.iam.gserviceaccount.com"
}

Follow this guide if needed

2. Configure MCP Client

{
  "mcpServers": {
    "google-sheets-mcp": {
      "command": "uvx",
      "args": ["google-sheets-mcp@latest"],
      "env": {
        "project_id": "your-project-id",
        "private_key_id": "your-private-key-id",
        "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
        "client_email": "your-service@your-project.iam.gserviceaccount.com",
        "client_id": "your-client-id",
        "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/your-service%40your-project.iam.gserviceaccount.com"
      }
    }
  }
}

💡 Pro Tip: You can copy the values directly from your Google service account JSON file. The field names in the JSON file are used exactly as they are - no changes needed!

🔄 Backward Compatibility: The server also supports the old GOOGLE_ prefixed variable names (e.g., GOOGLE_PROJECT_ID) for existing configurations.

3. Share Your Google Sheet with the Service Account

  • Open your target Google Spreadsheet in your web browser.

  • Click the Share button.

  • Enter the service account email (e.g., your-service@your-project.iam.gserviceaccount.com) and assign Editor access.

  • Click Send to provide editor permissions.

🎉 You're all set! Your MCP client will automatically install and run the package when needed.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Henil C Alagiya

Support & Contributions:

  • 🐛 Report Issues: GitHub Issues

  • 💬 Questions: Reach out on LinkedIn

  • 🤝 Contributions: Pull requests welcome!

Available Tools

24 tools
add_table_column_toolA
Add new columns to an existing table in Google Sheets.

This tool extends an existing table with additional columns.
New columns can have different data types and validation rules.
Supports adding multiple columns at once with proper positioning.

Args:
    spreadsheet_name: Name of the spreadsheet
    sheet_name: Name of the sheet containing the table
    table_name: Name of the table to add columns to
    column_names: List of column names to add
    column_types: List of column types corresponding to column_names
    positions: List of positions to insert columns (0-based index, empty list for end)
    dropdown_columns: List of column names that should have dropdown validation
    dropdown_values: List of comma-separated dropdown options for each dropdown column

Returns:
    JSON string with success status and column addition details

Inputs: spreadsheet_name (required), sheet_name (required), table_name (required), column_names (required), +4 more. Returns: result

add_table_records_toolA
Add records (rows) into a table in Google Sheets at the end.

This tool adds new records into a table at the end using InsertRangeRequest,
UpdateCellsRequest, and UpdateTableRequest operations. Each record must match the table's column structure.
Records are automatically formatted according to column types.

Args:
    spreadsheet_name: Name of the spreadsheet
    sheet_name: Name of the sheet containing the table
    table_name: Name of the table to add records into
    records: List of records, where each record is a list of values matching table columns

Returns:
    JSON string with success status and operation details

Inputs: spreadsheet_name (required), sheet_name (required), table_name (required), records (required). Returns: result

analyze_sheet_structure_toolA
Analyze a specific sheet's structure - quick overview.

This tool provides a simple overview of what's in the sheet:
- Sheet basic info (name, size, hidden status)
- Tables (count, names, ranges, sizes)
- Charts (count, IDs, positions)
- Slicers (count, IDs, positions)
- Drawings (count, IDs, positions)
- Developer metadata (count, keys, values)
- Summary (total elements, sheet type, frozen panes)

Args:
    spreadsheet_name: The name of the Google Spreadsheet
    sheet_name: Name of the specific sheet to analyze

Returns:
    JSON string with simplified structure overview

Inputs: spreadsheet_name (required), sheet_name (required). Returns: result

create_duplicate_sheet_toolB

Create a duplicate of an existing sheet.

Inputs: spreadsheet_name (required), source_sheet_name (required), new_sheet_name, insert_position. Returns: result

create_sheets_toolC

Create new sheets in a Google Spreadsheet.

Inputs: spreadsheet_name (required), sheet_names (required). Returns: result

create_table_toolA
Create a new table in Google Sheets.

This tool creates a structured table with specified columns and data types.
Tables provide better data organization, validation, and formatting capabilities.

Args:
    spreadsheet_name: Name of the spreadsheet
    sheet_name: Name of the sheet to create table in
    table_name: Name for the table
    start_cell: Starting cell for the table (e.g., "A1")
    column_names: List of column names
    column_types: List of column types corresponding to column_names
    dropdown_columns: List of column names that should have dropdown validation
    dropdown_values: List of comma-separated dropdown options for each dropdown column

Returns:
    JSON string with success status and table details

Inputs: spreadsheet_name (required), sheet_name (required), table_name (required), start_cell (required), +4 more. Returns: result

delete_sheets_toolB

Delete sheets from a Google Spreadsheet.

Inputs: spreadsheet_name (required), sheet_names (required). Returns: result

delete_table_column_toolA
Delete specific columns from a table in Google Sheets.

This tool removes the specified columns from the table and updates the table structure
accordingly. The remaining columns will be shifted left to fill the gaps.

Args:
    spreadsheet_name: Name of the spreadsheet
    sheet_name: Name of the sheet containing the table
    table_name: Name of the table to delete columns from
    column_names: List of column names to delete

Returns:
    JSON string with operation results

Inputs: spreadsheet_name (required), sheet_name (required), table_name (required), column_names (required). Returns: result

delete_table_records_toolA
Delete specific records (rows) from a table.

This tool removes specific records from a table while preserving the table structure.
Record numbers are 1-based and exclude the header row. Records are deleted in descending order
(bigger numbers first) to avoid index shifting issues.

Args:
    spreadsheet_name: Name of the spreadsheet
    sheet_name: Name of the sheet containing the table
    table_name: Name of the table to delete records from
    record_numbers: List of record numbers to delete (1-based, excluding header)

Returns:
    JSON string with success status and deletion details

Inputs: spreadsheet_name (required), sheet_name (required), table_name (required), record_numbers (required). Returns: result

delete_table_toolA
Delete tables from Google Sheets.

This tool removes specified tables from a sheet while preserving other content.
The table structure and data will be permanently deleted.

Args:
    spreadsheet_name: Name of the spreadsheet
    sheet_name: Name of the sheet containing the tables
    table_names: List of table names to delete

Returns:
    JSON string with success status and deletion details

Inputs: spreadsheet_name (required), sheet_name (required), table_names (required). Returns: result

discover_spreadsheets_toolB
Discover spreadsheets and their sheet names.

Args:
    max_spreadsheets: Maximum number of spreadsheets to analyze (default: 10)

Returns:
    JSON string containing spreadsheet names and their sheet names

Inputs: max_spreadsheets. Returns: result

get_sheet_cells_by_notation_toolA
Get values from specific cells in a sheet.

This tool retrieves values from multiple cells in a sheet using A1 notation.

Args:
    spreadsheet_name: Name of the spreadsheet
    sheet_name: Name of the sheet to get cells from
    cell_notations: List of cell notations to get values from (e.g., ['A1', 'A6', 'A10', 'E5'])

Returns:
    JSON string with cell values and mapping

Inputs: spreadsheet_name (required), sheet_name (required), cell_notations (required). Returns: result

get_sheet_cells_by_range_toolB
Get sheet cells by range.

This tool retrieves cell data from a specific range within a sheet.
You can specify the exact cell range using A1 notation.

Args:
    spreadsheet_name: Name of the spreadsheet
    sheet_name: Name of the sheet to get cells from
    start_cell: Starting cell reference (e.g., 'A1', 'B2')
    end_cell: Ending cell reference (e.g., 'C5', 'D10')
    include_headers: Whether to include header row

Returns:
    JSON string with cells data and metadata

Inputs: spreadsheet_name (required), sheet_name (required), start_cell (required), end_cell (required), +1 more. Returns: result

get_table_data_toolB
Get table data with optional column filtering using Google Sheets API.

This unified tool can retrieve all table data or specific columns based on user input.
If column_names is provided, it uses spreadsheets.values.get for efficiency.
If column_names is not provided, it uses spreadsheets.tables.get for full data.

Args:
    spreadsheet_name: Name of the spreadsheet
    sheet_name: Name of the sheet containing the table
    table_name: Name of the table to read data from
    column_names: List of column names to retrieve (optional - if not provided, gets all columns)
    start_row: Starting row index (0-based, optional)
    end_row: Ending row index (0-based, optional)
    include_headers: Whether to include header row in results
    max_rows: Maximum number of rows to return (optional)

Returns:
    JSON string with table data and metadata

Inputs: spreadsheet_name (required), sheet_name (required), table_name (required), column_names, +4 more. Returns: result

get_table_metadata_toolA
Get comprehensive metadata for tables in Google Sheets.

This tool provides detailed information about table structure, columns, data types,
formatting, statistics, and other properties. If no table name is provided, returns 
metadata for all tables.

Args:
    spreadsheet_name: Name of the spreadsheet
    sheet_name: Name of the sheet containing the table
    table_name: Name of the table to get metadata for (optional)
    include_sample_data: Whether to include sample data rows
    include_formulas: Whether to include formula information
    include_formatting: Whether to include cell formatting details
    include_statistics: Whether to include data statistics
    max_sample_rows: Maximum number of sample rows to return
    specific_columns: List of column names to get metadata for (optional)
    exclude_metadata_types: List of metadata types to exclude

Returns:
    JSON string containing table metadata or list of all tables

Inputs: spreadsheet_name (required), sheet_name (required), table_name, include_sample_data, +6 more. Returns: result

update_dropdown_options_toolA
Update dropdown options in a table column.

This tool can add or remove specific dropdown options from an existing column in a table.
For 'add' action: Adds new options to existing dropdown (preserves existing options).
For 'remove' action: Removes specific options from existing dropdown.

Args:
    spreadsheet_name: Name of the spreadsheet
    sheet_name: Name of the sheet containing the table
    table_name: Name of the table to update dropdown options in
    action: Action to perform - "add" or "remove"
    column_name: Name of the column to update dropdown options for
    dropdown_options: List of dropdown options to add/remove

Returns:
    JSON string with success status and dropdown update details

Inputs: spreadsheet_name (required), sheet_name (required), table_name (required), action (required), +2 more. Returns: result

update_sheet_titles_toolC

Update sheet titles in a Google Spreadsheet.

Inputs: spreadsheet_name (required), sheet_names (required), new_titles (required). Returns: result

update_spreadsheet_title_toolC

Update a Google Spreadsheet title.

Inputs: spreadsheet_name (required), new_title (required). Returns: result

update_table_cells_by_notation_toolA
Update specific cells in a table.

This tool updates multiple cells in a table with new values using A1 notation.

Args:
    spreadsheet_name: Name of the spreadsheet
    sheet_name: Name of the sheet containing the table
    table_name: Name of the table to update
    cell_updates: List of cell updates with cell_notation and value

Returns:
    JSON string with success status and update details

Inputs: spreadsheet_name (required), sheet_name (required), table_name (required), cell_updates (required). Returns: result

update_table_cells_by_range_toolB
Update table cells by range.

This tool updates cell data in a specific range within a table.
You can specify the exact cell range using A1 notation.

Args:
    spreadsheet_name: Name of the spreadsheet
    sheet_name: Name of the sheet containing the table
    table_name: Name of the table to update
    start_cell: Starting cell reference (e.g., 'A1', 'B2')
    end_cell: Ending cell reference (e.g., 'C5', 'D10')
    cell_values: 2D array of values to update (rows x columns)

Returns:
    JSON string with update details

Inputs: spreadsheet_name (required), sheet_name (required), table_name (required), start_cell (required), +2 more. Returns: result

update_table_column_name_toolA
Update column names in a table.

This tool updates existing column names in a table by their index.
The number of column indices must match the number of new column names.

Args:
    spreadsheet_name: Name of the spreadsheet
    sheet_name: Name of the sheet containing the table
    table_name: Name of the table to update column names in
    column_indices: List of column indices to update (0-based)
    new_column_names: List of new column names

Returns:
    JSON string with success status and update details

Inputs: spreadsheet_name (required), sheet_name (required), table_name (required), column_indices (required), +1 more. Returns: result

update_table_column_type_toolA
Update column types in a table.

This tool updates the data type of existing columns in a table.
The number of column names must match the number of new column types.

Available column types:
- DOUBLE: Numeric data with decimals
- CURRENCY: Monetary values ($#,##0.00)
- PERCENT: Percentage values (0.00%)
- DATE: Date values (yyyy-mm-dd)
- TIME: Time values (hh:mm:ss)
- DATE_TIME: Date and time values
- TEXT: Plain text data
- BOOLEAN: True/false values
- DROPDOWN: Selection from predefined options

Args:
    spreadsheet_name: Name of the spreadsheet
    sheet_name: Name of the sheet containing the table
    table_name: Name of the table to update column types in
    column_names: List of column names to update types for
    new_column_types: List of new column types

Returns:
    JSON string with success status and type update details

Inputs: spreadsheet_name (required), sheet_name (required), table_name (required), column_names (required), +1 more. Returns: result

update_table_sorting_toolA
Update table sorting by a specific column.

This tool sorts all data rows in a table based on a specified column.
The header row remains in place, and data rows are reordered.

Args:
    spreadsheet_name: Name of the spreadsheet
    sheet_name: Name of the sheet containing the table
    table_name: Name of the table to sort
    column_name: Name of the column to sort by
    sort_order: Sort order - "ASC" or "DESC" (default: "ASC")

Returns:
    JSON string with success status and sorting details

Inputs: spreadsheet_name (required), sheet_name (required), table_name (required), column_name (required), +1 more. Returns: result

update_table_title_toolB
Update a table title in Google Sheets.

This tool allows you to update the title of an existing table.
The table structure and data remain unchanged.

Args:
    spreadsheet_name: Name of the spreadsheet
    sheet_name: Name of the sheet containing the table
    old_table_name: Current name of the table to update
    new_table_name: New title for the table

Returns:
    JSON string with success status and update details

Inputs: spreadsheet_name (required), sheet_name (required), old_table_name (required), new_table_name (required). Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 24 tools

    Disambiguation4/5

    Tools are mostly distinct with clear purposes, but there is some overlap between cell update tools (by notation vs by range) and between getting cell data (by notation vs by range). However, these are differentiated by input methods, so agents can select appropriately.

    Naming Consistency4/5

    Most tools follow a verb_noun pattern (create_, delete_, update_, get_, etc.) with 'tool' suffix consistently applied. Slight inconsistency: some tools omit 'tool' (e.g., discover_spreadsheets vs get_sheet_cells_by_notation_tool), but overall pattern is predictable.

    Tool Count4/5

    24 tools is on the high side for a single server but justified given the comprehensive coverage of sheet and table operations, cell manipulation, and metadata. Each tool serves a specific purpose with no redundancy.

    Completeness4/5

    The tool set covers most CRUD operations for sheets and tables, plus cell-level operations, metadata retrieval, and table configuration. Minor gaps like lack of a tool to merge cells or to copy sheets (though duplicate sheet exists). Core workflows are well supported.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers