gsheets-mcp is a lightweight, self-hosted server that enables Claude to perform read and write operations on Google Sheets. This solution operates entirely locally, ensuring no data is sent externally. By utilizing the official Google Sheets REST API, it maintains a secure connection to your Google Drive without any third-party interferences, all within a compact Python codebase.
Overview
gsheets-mcp is a compact, self-hosted MCP server designed to provide Claude, an AI assistant, with read/write access to Google Sheets. With this tool, users can quickly manage spreadsheet tasks directly through Claude without compromising on security or privacy.
This server operates locally, ensuring that all communications occur directly between your machine and Google, with no external third-party services involved. It utilizes the official Google Sheets REST API and requires no scraping or unofficial endpoints. Below are key features and highlights:
One command can create a new spreadsheet, format it, and populate it with real-time weather data. For example:
Hey Buddy! Spin up a new google sheet for me: call it "Lisbon Two Weeks". I want a row per day for the next 14 days starting today: date, day of the week, air temp in Lisbon, sea temp. Paint the day lines light grey, weekends blue, bold the header with green. Look up the actual forecast.
This showcases the server's capability to process complex requests, delivering results while adhering to specific formatting requirements.
The project offers several tools designed for spreadsheet manipulation, including:
| Tool | Writes | Description |
|---|---|---|
gsheets_list_sheets | no | Retrieves tabs of a spreadsheet, including title, sheet_id, index, and grid size. |
gsheets_read_sheet | no | Reads a specified tab as a 2D array of rows. |
gsheets_append_rows | yes | Appends rows to the end of the last non-empty row without overwriting data. |
gsheets_update_sheet | yes | Updates specific ranges of a tab, altering the content as needed. |
gsheets_format_cells | yes | Applies formatting options like colors and styles to specified cell ranges. |
gsheets_create_spreadsheet | yes | Generates a new spreadsheet and returns its ID and URL. |
Each tool is designed to handle specific tasks, allowing for comprehensive manipulation of spreadsheets in a secure manner.
The server is designed with security in mind, providing options such as:
gsheets-mcp serves as a robust tool for anyone looking to combine AI with Google Sheets, offering a local, secure, and efficient means of managing spreadsheet data. Ideal for developers and data engineers, this project promotes an enhanced workflow while maintaining data integrity and security.
No comments yet.
Sign in to be the first to comment.