- Home
- MCP servers
- Google Sheets
Google Sheets
- python
12
GitHub Stars
python
Language
6 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": {
"henilcalagiya-google-sheets-mcp": {
"command": "uvx",
"args": [
"google-sheets-mcp@latest"
],
"env": {
"client_id": "your-client-id",
"project_id": "your-project-id",
"private_key": "-----BEGIN PRIVATE KEY-----\\n...\\n-----END PRIVATE KEY-----\\n",
"client_email": "your-service@your-project.iam.gserviceaccount.com",
"private_key_id": "your-private-key-id",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/your-service%40your-project.iam.gserviceaccount.com"
}
}
}
}Google Sheets MCP Server lets you automate Google Sheets from any MCP-compatible client. It provides full CRUD access to sheets and tables through a secure, MCP-driven API layer, enabling you to create, read, update, and delete data in spreadsheets with ease.
How to use
You connect your MCP client to the Google Sheets MCP Server using a stdio-based runtime configuration. The server runs locally or alongside your tooling via the uvx command, and it uses a Google service account to authenticate with Google APIs. Once connected, you can perform spreadsheet operations from your MCP client: create sheets and tables, read existing data, update values, and delete sheets when needed.
To start, obtain a Google service account JSON that includes project_id, private_key_id, private_key, client_email, client_id, and client_x509_cert_url. You then configure your MCP client with the provided runtime command and environment values. The server expects these environment variables to be present so it can authenticate requests to Google Sheets.
How to install
Prerequisites you need before installation:
- Python 3.10 or newer
- uv package manager (for uvx)
Install the uv runtime on your system to enable uvx-based MCP server execution. Use the appropriate script for your platform.
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows PowerShell
irm https://astral.sh/uv/install.ps1 | iex
Configuration and usage details
Set up your Google service account and export the required values into your MCP client configuration. You will provide the following environment variables to the server: project_id, private_key_id, private_key, client_email, client_id, and client_x509_cert_url. These values come from your Google service account JSON file.
{
"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"
}
}
}
}
Sharing and permissions
Share the Google Sheet with the service account email shown in client_email (for example, your-service@your-project.iam.gserviceaccount.com) and grant Editor access. This allows the MCP server to read and write to the sheet as needed.
Security and compatibility notes
The server supports legacy environment variable naming conventions by prefixing with GOOGLE_ (for example, GOOGLE_PROJECT_ID) to accommodate existing configurations. Always protect your service account JSON and avoid exposing private_key or other sensitive fields in logs or publicly accessible configurations.
Troubleshooting
If you encounter authentication errors, double-check that the service account email has Editor access to the target spreadsheet and that all fields from the service account JSON are correctly provided to the MCP client configuration. Ensure the Google Sheets API and Google Drive API are enabled in your Google Cloud project.