mcp-gsheets
Installation
How to install and set up mcp-gsheets
Installation
Prerequisites
- Node.js v18 or higher
- Google Cloud Project with Sheets API enabled
- Service Account with JSON key file
Quick Install
Add to your MCP client config:
{
"mcpServers": {
"mcp-gsheets": {
"command": "npx",
"args": ["-y", "mcp-gsheets@latest"],
"env": {
"GOOGLE_PROJECT_ID": "your-project-id",
"GOOGLE_APPLICATION_CREDENTIALS": "/absolute/path/to/service-account-key.json"
}
}
}
}Claude Code
Use the Claude Code CLI:
claude mcp add mcp-gsheets npx mcp-gsheets@latestThen edit your config to add environment variables.
Claude Desktop
Add to your Claude Desktop config:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/claude/claude_desktop_config.json
Google Cloud Setup
- Go to Google Cloud Console
- Create a new project or select existing
- Enable Google Sheets API:
- Navigate to "APIs & Services" -> "Library"
- Search for "Google Sheets API" and click "Enable"
- Create Service Account:
- Go to "APIs & Services" -> "Credentials"
- Click "Create Credentials" -> "Service Account"
- Download the JSON key file
- Share your spreadsheets:
- Open your Google Sheet
- Click Share and add the service account email (from JSON file)
- Grant "Editor" permissions
Development Setup
# Clone the repository
git clone https://github.com/freema/mcp-gsheets.git
cd mcp-gsheets
# Install dependencies
npm install
# Build the project
npm run build
# Run interactive setup
npm run setup