MCP.so
登录
服务器

MCP Google Sheets Server

@shionhonda

Model Context Protocol (MCP) server that allows interaction with Google Sheets

概览

What is MCP Google Sheets Server?

MCP Google Sheets Server is a Model Context Protocol (MCP) server that enables interaction with Google Sheets. It is intended for AI agents or tools that need to list sheets, read cell ranges, and write data to spreadsheets, but it does not manage Google Drive files.

How to use MCP Google Sheets Server?

Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the absolute path of your service account JSON key, clone the repository, create a Python 3.11+ virtual environment with uv, install dependencies, then run mcp dev server.py (development) or mcp run server.py (production). The server communicates over standard input/output (stdio).

Key features of MCP Google Sheets Server?

  • List all sheet names (tabs) in a spreadsheet.
  • Read data from a specific cell range.
  • Write a 2D list of values to a specific cell range.
  • No Google Drive file management capabilities.
  • Authenticates via service account key.
  • Runs over stdio – suitable for MCP clients like Claude Desktop.

Use cases of MCP Google Sheets Server?

  • Extract data from Google Sheets for analysis or reporting.
  • Auto-populate spreadsheet cells from AI agent responses.
  • List sheets/tabs to discover spreadsheet structure.
  • Update cell values based on user queries or external inputs.

FAQ from MCP Google Sheets Server

What tools does MCP Google Sheets Server provide?

It provides three tools: list_sheets(spreadsheet_id), read_cells(spreadsheet_id, range_name), and write_cells(spreadsheet_id, range_name, values).

Can I manage Google Drive files (create/delete folders) with this server?

No. The server explicitly does not provide tools for managing Google Drive files. Access is restricted to spreadsheet content only.

What are the runtime requirements?

Python 3.11+, a Google Cloud Project with the Google Sheets API enabled, and a downloaded service account key file (JSON). Dependencies are managed via uv.

How do I authenticate?

Set the environment variable GOOGLE_APPLICATION_CREDENTIALS to the absolute path of your service account JSON key file. The service account must have the "Editor" role on the target Google Sheets.

How do I run the server?

Use mcp dev server.py for development with MCP Inspector, or mcp run server.py for production. For Claude Desktop, add a JSON configuration block pointing to uv and the server path.

来自「其他」的更多内容