About Google Sheets MCP Server
Google Sheets MCP Server lets Claude Desktop work with Google Sheets. It is for users managing spreadsheets through Claude Desktop, with operations for creating, reading, writing, formatting, adding formulas, and managing sheets.
Key features
- 01Create Google Sheets
- 02Read and write spreadsheet data
- 03Format cells and ranges
- 04Write formulas
- 05Add and delete sheets
- 06Search and list spreadsheets
Use cases
- 01Create a spreadsheet from Claude Desktop
- 02Update data in an existing spreadsheet
- 03Apply formatting or formulas to cell ranges
- 04Find spreadsheets and manage their sheets
MCP support
The MCP server provides Claude Desktop with tools for Google Sheets, including creation, reading and writing, formatting, formulas, sheet management, and search. Authorization uses OAuth 2.0 credentials.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEGoogle Sheets MCP Server
A Model Context Protocol (MCP) server for Google Sheets that enables Claude Desktop to interact with Google Sheets directly. This server provides tools for creating, reading, writing, and managing Google Sheets through Claude Desktop.
Features
- Create new Google Sheets
- Read and write data to existing sheets
- Format cells and ranges
- Add and delete sheets
- Write formulas
- Search for sheets
- List available sheets
Prerequisites
- Python 3.10 or higher
- Google Cloud Project with Google Sheets API enabled
- OAuth 2.0 credentials from Google Cloud Console
- Claude Desktop application
uvpackage manager (recommended)
Installation
- Clone the repository:
git clone https://github.com/yourusername/google-sheets-mcp-server.git
cd google-sheets-mcp-server
- Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
- Install dependencies using
uv:
uv pip install -e .
- Set up Google Cloud credentials:
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the Google Sheets API and Google Drive API
- Create OAuth 2.0 credentials (Desktop app)
- Download the credentials and save as
~/.config/google_sheets_mcp/google-sheets-mcp.json
Configuration
- Configure Claude Desktop:
- Open Claude Desktop settings
- Add the following to your
claude_desktop_config.json:
{
"mcpServers": {
"google_sheets": {
"command": "/path/to/your/.venv/bin/python",
"args": [
"/path/to/your/google_sheets.py",
"--credentials-path",
"/Users/yourusername/.config/google_sheets_mcp/google-sheets-mcp.json",
"--log-level",
"DEBUG"
]
}
}
}
- First-time setup:
- Run the server manually to complete OAuth authentication:
python google_sheets.py --credentials-path ~/.config/google_sheets_mcp/google-sheets-mcp.json
- Follow the browser prompts to authorize the application
- The token will be saved automatically for future use
Usage
After setup, you can use the following commands in Claude Desktop:
- Create a new sheet:
create_sheet(title: str) - Format cells:
format_range(file_id: str, range: str, format: dict) - Write formulas:
write_formula(file_id: str, range: str, formula: str) - Add sheets:
add_sheet(file_id: str, title: str) - Delete sheets:
delete_sheet(file_id: str, sheet_id: int) - Get sheet properties:
get_sheet_properties(file_id: str)
Development
Project Structure
google-sheets-mcp-server/
├── .venv/ # Virtual environment
├── google_sheets.py # Main server implementation
├── pyproject.toml # Project configuration and dependencies
├── tests/ # Test files
└── README.md # This file
Adding New Features
- Add new tool methods to the
GoogleSheetsMCPclass - Decorate them with
@mcp.tool() - Update the README with new feature documentation
Running Tests
pytest
Troubleshooting
-
Server Connection Issues
- Check if the server is running
- Verify credentials path in config
- Check logs in Claude Desktop
-
Authentication Issues
- Ensure OAuth credentials are valid
- Check if your email is added as a test user
- Try deleting token.json and re-authenticating
-
API Errors
- Verify Google Sheets API is enabled
- Check API quotas and limits
- Review error logs for specific issues
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.