jonahveit2002/mcp-google-sheets-docker
3.1
If you are the rightful owner of mcp-google-sheets-docker and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This project provides a Docker-based implementation of the mcp-google-sheets server, enabling integration with Google Sheets for MCP-compatible clients.
MCP Google Sheets Docker Integration
A Docker-based implementation of the mcp-google-sheets server for Google Sheets integration with MCP-compatible clients.
🚀 Quick Start
-
Run the setup script:
chmod +x setup.sh ./setup.sh -
Configure Google Cloud credentials:
- Follow instructions in
credentials/README.md - Add your service account JSON or OAuth credentials to the
credentials/directory - Update
.envfile with your configuration
- Follow instructions in
-
Start the service:
docker-compose up -d
📁 Project Structure
.
├── Dockerfile # Container definition
├── docker-compose.yml # Service orchestration
├── requirements.txt # Python dependencies
├── nginx.conf # Reverse proxy config (optional)
├── .env.template # Environment variables template
├── setup.sh # Setup script
├── credentials/ # Google Cloud credentials
│ ├── README.md # Credential setup instructions
│ ├── service-account.json # Service account key (add this)
│ └── credentials.json # OAuth credentials (add this)
├── tokens/ # OAuth tokens (auto-generated)
└── data/ # Persistent data storage
└── logs/ # Application logs
🔧 Configuration Options
Service Account (Recommended)
environment:
- SERVICE_ACCOUNT_PATH=/app/credentials/service-account.json
- DRIVE_FOLDER_ID=your_folder_id
OAuth 2.0
environment:
- CREDENTIALS_PATH=/app/credentials/credentials.json
- TOKEN_PATH=/app/tokens/token.json
Base64 Encoded Credentials
environment:
- CREDENTIALS_CONFIG=base64_encoded_json
- DRIVE_FOLDER_ID=your_folder_id
🐳 Docker Commands
# Build and start services
docker-compose up -d
# View logs
docker-compose logs -f mcp-google-sheets
# Stop services
docker-compose down
# Rebuild after changes
docker-compose up -d --build
# Start with nginx proxy
docker-compose --profile proxy up -d
🔌 Integration with MCP Clients
Add to your MCP client configuration (e.g., Claude Desktop):
{
"mcpServers": {
"google-sheets": {
"command": "docker",
"args": ["exec", "-i", "mcp-google-sheets-server", "uvx", "mcp-google-sheets@latest"],
"env": {
"SERVICE_ACCOUNT_PATH": "/app/credentials/service-account.json",
"DRIVE_FOLDER_ID": "your_folder_id"
}
}
}
}
🛠️ Development
# Run in development mode
docker-compose -f docker-compose.dev.yml up
# Access container shell
docker-compose exec mcp-google-sheets bash
# View container logs
docker-compose logs mcp-google-sheets
📊 Usage Examples
Once running, you can use prompts like:
- "List all spreadsheets I have access to"
- "Create a new spreadsheet titled 'Project Tasks'"
- "Get data from Sheet1 range A1:E10 in spreadsheet 'Sales Data'"
- "Update cell B2 to 'In Progress' in the Tasks sheet"
🔒 Security
- Credentials are mounted as read-only volumes
- Never commit credential files to version control
- Use environment variables for sensitive data
- Regularly rotate service account keys
📝 License
MIT License - see the original mcp-google-sheets repository for details.