- Home
- MCP servers
- Google Sheets
Google Sheets
- python
0
GitHub Stars
python
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"santiagopereda-mcp_googlesheets": {
"command": "python",
"args": [
"googlesheets_server.py"
],
"env": {
"DRIVE_FOLDER_ID": "DEFAULT_FOLDER_ID",
"SERVICE_ACCOUNT_EMAIL": "YOUR_SERVICE_ACCOUNT_EMAIL",
"GOOGLE_APPLICATION_CREDENTIALS": "YOUR_PATH_TO_SERVICE_ACCOUNT_JSON"
}
}
}
}This Google Sheets MCP Server provides a secure bridge between MCP-compatible clients and the Google Sheets API, enabling automation and data manipulation workflows through a containerized, non-root deployment. It supports both service account and OAuth 2.0 authentication and exposes a versatile set of tools to manage spreadsheets, sheets, data, and tables from a single MCP endpoint.
How to use
You connect your MCP client to the Google Sheets MCP Server to perform spreadsheet operations through a unified toolset. Start the server locally or in your container environment, then configure your MCP client to target the server as an MCP endpoint. Use the available tools to list, read, modify, and export data across spreadsheets, sheets, and named tables. Common workflows include creating spreadsheets, adding sheets, reading data ranges, updating cells, and exporting table data to CSV. Ensure your Google Sheets API credentials are properly provided via the configured secrets, and that your client forwards requests through the MCP gateway to reach the server.
How to install
Prerequisites: you need Docker Desktop with MCP Toolkit enabled and the Docker MCP CLI plugin installed. You also require a Google Cloud project with the Google Sheets API and Google Drive API enabled, plus a credentials file or OAuth 2.0 credentials for access.
Step by step commands to get up and running exactly as shown here are:
Clone the project repository (adjust the URL to your actual source if needed) and navigate to the Google Sheets MCP server directory. Build the Docker image for the server. Then configure credentials and start the container with your MCP gateway.
Configuration and usage notes
Credentials are stored as Docker Desktop secrets to keep sensitive data secure. The server runs as a non‑root user for safety. You can optionally specify a default Google Drive folder to scope operations. When you run the server, you’ll use Docker commands to set secrets like GOOGLE_APPLICATION_CREDENTIALS and SERVICE_ACCOUNT_EMAIL, and you can expose DRIVE_FOLDER_ID to limit where spreadsheets are created or accessed.
To verify and manage the server during development, you can test the MCP protocol locally by sending a request to the server script. Check container logs to diagnose issues, verify that the server appears in your MCP gateway, and ensure the Google Sheets APIs are enabled in your Google Cloud project.
Example configuration snippet
{
"mcpServers": {
"googlesheets": {
"command": "python",
"args": ["googlesheets_server.py"]
}
}
}
Troubleshooting and tips
If tools don’t appear in your MCP client, verify the Docker image exists, confirm the server is registered with your MCP gateway, and review container logs for errors. Ensure secrets are set correctly and that Google Sheets and Drive APIs are enabled in your Google Cloud project. For authentication errors, recheck the credentials file path and environment variable values you provided to the container.
Notes
All tools described in this server are available through the MCP interface. If you modify or extend tooling, keep tool docstrings short and ensure the return values are strings as required. Security considerations include limiting access to authorized spreadsheets and keeping credentials confidential.
Available tools
list_spreadsheets
List spreadsheets accessible to the authenticated user or within the configured Drive folder.
create_spreadsheet
Create a new Google Spreadsheet with a given title.
share_spreadsheet
Share a spreadsheet with specific users or emails with a chosen access role.
list_sheets
List all sheet/tab names in a given spreadsheet.
create_sheet
Add a new sheet/tab to a spreadsheet.
rename_sheet
Rename an existing sheet/tab.
copy_sheet
Copy a sheet within or across spreadsheets.
add_columns
Add one or more columns to a sheet.
add_conditional_formatting
Apply conditional formatting rules to a range.
update_conditional_formatting
Update or relocate existing conditional formatting rules.
get_sheet_data
Read data from a specified range with optional grid metadata.
get_sheet_formulas
Read formulas from a specified range.
get_multiple_sheet_data
Fetch data from multiple ranges in one call.
get_multiple_spreadsheet_summary
Get titles, headers, and previews for multiple spreadsheets.
update_cells
Write data to a specific range (overwrite existing values).
batch_update_cells
Update multiple ranges in a single call.
add_rows
Append rows to the end of a sheet.
list_tables
List defined tables or named ranges in a spreadsheet.
create_table
Create a table with headers and optional rows.
get_table_data
Read data from a table with filters, limit, and offset.
insert_table_rows
Insert rows into a table.
update_table_rows
Update rows in a table matching criteria.
delete_table_rows
Delete rows from a table based on criteria.
add_table_columns
Add columns to a table.
rename_table_column
Rename a table header column.
export_table_as_csv
Export table data to CSV format.
import_csv_to_table
Import CSV content into a table.