Minimal, secure, self-hosted MCP server for Google Workspace. Zero third-party wrappers — only official Google libraries. ~500 lines of fully auditable code.
Works with Claude Code, Kiro, Cursor, Windsurf, Codex, GitHub Copilot, and any MCP-compatible AI coding agent.
Most Google Workspace MCP servers use third-party wrappers with thousands of lines of code and dozens of dependencies you can't audit. This server:
- ~300 lines total — you can read every line in 10 minutes
- Only official Google libraries —
google-api-python-client,google-auth-oauthlib - Zero external network calls — data flows only to
googleapis.com - Credentials stored locally with
chmod 600permissions - No telemetry, no analytics, no SaaS dependency
| Service | Tools | Description |
|---|---|---|
| Gmail | gmail_search, gmail_read, gmail_send, gmail_reply, gmail_list_labels, gmail_modify_labels, gmail_delete |
Full email management |
| Calendar | calendar_list_events, calendar_create_event, calendar_update_event, calendar_delete_event, calendar_get_event |
Events with invite emails |
| Drive | drive_search, drive_read_file, drive_create_file, drive_delete_file, drive_list_folder, drive_share_file |
Files, folders, sharing |
| Docs | docs_create, docs_read, docs_append |
Create and edit documents |
| Sheets | sheets_read, sheets_write, sheets_create |
Read, write spreadsheets |
| Slides | slides_create, slides_read |
Create and read presentations |
| Forms | forms_create, forms_get, forms_add_question, forms_get_responses |
Create forms, add questions, read responses |
| Tasks | tasks_list_tasklists, tasks_list, tasks_create, tasks_update, tasks_delete |
Manage task lists and tasks |
| Chat | chat_list_spaces, chat_send_message, chat_list_messages, chat_create_space |
Spaces, messages |
| Meet | meet_create_space, meet_get_space, meet_end_conference, meet_list_conferences |
Meeting links, conferences |
- Go to console.cloud.google.com
- Create a new project
- Go to APIs & Services → Credentials → Create OAuth Client ID
- Application type: Desktop Application
- Note your
Client IDandClient Secret
- Go to APIs & Services → Library and enable:
- Gmail API
- Google Calendar API
- Google Drive API
- Google Docs API
- Google Sheets API
- Google Slides API
- Google Forms API
- Google Tasks API
- Google Chat API
- Google Meet REST API
git clone https://github.com/rishapgandhi/google_mcp.git
cd google_mcp
cp .env.example .env
# Edit .env with your Client ID and Secret
pip install -e .python3 -m src.server
# Opens browser for Google OAuth consent
# Token saved to .credentials/token.json (chmod 600){
"mcpServers": {
"google_workspace": {
"command": "python3",
"args": ["-m", "src.server"],
"cwd": "/path/to/google_mcp",
"env": {
"GOOGLE_OAUTH_CLIENT_ID": "your-client-id",
"GOOGLE_OAUTH_CLIENT_SECRET": "your-secret"
}
}
}
}claude mcp add google_workspace -- python3 -m src.server --cwd /path/to/google_mcpAdd to .cursor/mcp.json or .windsurf/mcp.json:
{
"mcpServers": {
"google_workspace": {
"command": "python3",
"args": ["-m", "src.server"],
"cwd": "/path/to/google_mcp",
"env": {
"GOOGLE_OAUTH_CLIENT_ID": "your-client-id",
"GOOGLE_OAUTH_CLIENT_SECRET": "your-secret"
}
}
}
}| Aspect | Implementation |
|---|---|
| Dependencies | Only 4 official packages, all pinned |
| Network | Only connects to googleapis.com |
| Credentials | OAuth tokens stored with chmod 600 |
| Code | ~300 lines, fully auditable |
| Telemetry | None — zero external reporting |
| Data flow | Your machine → Google APIs (nothing else) |
| Package | Publisher | Purpose |
|---|---|---|
mcp |
Anthropic | MCP protocol SDK |
google-api-python-client |
Official API client | |
google-auth-oauthlib |
OAuth2 authentication | |
python-dotenv |
— | .env file loading |
google_mcp/
├── pyproject.toml
├── .env.example
├── .gitignore
├── LICENSE
├── README.md
└── src/
├── server.py # MCP server (stdio transport)
├── auth/
│ └── oauth.py # OAuth2 — only talks to accounts.google.com
└── tools/
├── gmail.py # Search, read, send
├── calendar.py # List events, create event
├── drive.py # Search, read, create files
├── docs.py # Create, read, append
├── sheets.py # Read, write, create
├── slides.py # Create, read
├── forms.py # Create forms, add questions, get responses
├── tasks.py # Task lists, create/update/delete tasks
├── chat.py # Spaces, send/list messages
└── meet.py # Create meetings, list conferences
PRs welcome. Keep it minimal — the goal is a small, auditable codebase.
MIT — use commercially, fork, modify, redistribute freely.