|
β‘ Start Quick Start Β· Prerequisites Google Cloud Β· Credentials |
π§° Tools All Tools Β· Tool Tiers CLI Β· Start Server |
π Connect 1-Click Install Β· Claude Desktop Claude Code Β· VS Code Β· LM Studio |
π Deploy OAuth 2.1 Β· Stateless External OAuth Β· Reverse Proxy |
π Develop Architecture Β· Dev Setup Security Β· License |
|
**π§ Gmail** β Complete email management, end-to-end coverage **π Drive** β File operations with sharing, permissions & Office formats **π Calendar** β Full event management with advanced features **π Docs** β Deep, fine-grained editing, formatting & comments **π Sheets** β Flexible cell management, formatting & conditional rules **πΌοΈ Slides** β Presentation creation, updates & content manipulation **π Forms** β Creation, publish settings & response management **π¬ Chat** β Space management, messaging & reactions |
**β‘ Apps Script** β Cross-application workflow automation Projects Β· deployments Β· versions Β· execution Β· debugging **β Tasks** β Task & list management with hierarchy **π€ Contacts** β People API with groups & batch operations **π Custom Search** β Programmable Search Engine integration --- **π Authentication & Security** OAuth 2.0 & 2.1 Β· auto token refresh Β· multi-user bearer tokens Β· transport-aware callbacks Β· CORS proxy |
| **For Security Teams** This server sends no data anywhere except Google's APIs, on behalf of the authenticated user, using your own OAuth client credentials. There is no telemetry, no usage reporting, no analytics, no license server, and no SaaS dependency. The entire data path is: your infrastructure β Google APIs. - **Fully open source** β every line is auditable in this repo - **Your OAuth client, your GCP project** β credentials never leave your environment - **You control the scopes** β read-only, granular per-service permissions, or full access - **You control the network** β deploy behind your reverse proxy, in your VPC, on your own terms - **No third-party services** β no intermediary servers, no token relays, no hosted backends - **Stateless mode** β zero disk writes for locked-down container environments - **Sensitive path blocking** β `.env`, `.ssh/`, `.aws/`, and credential files are blocked regardless of configuration Full dependency tree in `pyproject.toml`, pinned in `uv.lock`. | **For Legal & Procurement** This project is [MIT licensed](LICENSE) β not "open core," not "source available," not "free with a CLA." There is no dual licensing, no commercial tier gating features, and no contributor license agreement. - **Use commercially without restriction** β build products, sell services, deploy internally - **Fork, embed, redistribute** β MIT requires only attribution - **No CLA** β contributions remain under MIT - **No telemetry to disclose** β nothing to flag in a privacy review - **No network effects** β the server never contacts any endpoint you didn't configure - **Standard dependency licenses** β MIT, Apache 2.0, and BSD throughout the dependency chain; no copyleft, no AGPL The license is 21 lines and says what it means. |
| **1. Create Search Engine** ```text programmablesearchengine.google.com /controlpanel/create β Configure sites or entire web β Note your Engine ID (cx) ``` [Open Control Panel β](https://programmablesearchengine.google.com/controlpanel/create) | **2. Get API Key** ```text developers.google.com /custom-search/v1/overview β Create/select project β Enable Custom Search API β Create credentials (API Key) ``` [Get API Key β](https://developers.google.com/custom-search/v1/overview) | **3. Set Variables** ```bash export GOOGLE_PSE_API_KEY=\ "your-api-key" export GOOGLE_PSE_ENGINE_ID=\ "your-engine-id" ``` Configure in environment |
β‘ Quick Setup Guide β Step-by-step instructions**Complete Setup Process:** 1. **Create Search Engine** - Visit the [Control Panel](https://programmablesearchengine.google.com/controlpanel/create) - Choose "Search the entire web" or specify sites - Copy the Search Engine ID (looks like: `017643444788157684527:6ivsjbpxpqw`) 2. **Enable API & Get Key** - Visit [Google Developers Console](https://console.cloud.google.com/) - Enable "Custom Search API" in your project - Create credentials β API Key - Restrict key to Custom Search API (recommended) 3. **Configure Environment** - Add to your shell or `.env`: ```bash export GOOGLE_PSE_API_KEY="AIzaSy..." export GOOGLE_PSE_ENGINE_ID="01764344478..." ``` β‘ [Full Documentation β](https://developers.google.com/custom-search/v1/overview) |
||
| **βΆ Legacy Mode** ```bash uv run main.py ``` β οΈ Stdio mode (incomplete MCP clients only) | **β HTTP Mode (Recommended)** ```bash uv run main.py \ --transport streamable-http ``` β Full MCP spec compliance & OAuth 2.1 | **@ Single User** ```bash uv run main.py \ --single-user ``` Simplified authentication β οΈ Cannot be used with OAuth 2.1 mode |
β Advanced Options β Tool selection, tiers & Docker**βΆ Selective Tool Loading** ```bash # Load specific services only uv run main.py --tools gmail drive calendar uv run main.py --tools sheets docs # Combine with other flags uv run main.py --single-user --tools gmail ``` **π Read-Only Mode** ```bash # Requests only read-only scopes & disables write tools uv run main.py --read-only # Combine with specific tools or tiers uv run main.py --tools gmail drive --read-only uv run main.py --tool-tier core --read-only ``` Read-only mode provides secure, restricted access by: - Requesting only `*.readonly` OAuth scopes (e.g., `gmail.readonly`, `drive.readonly`) - Automatically filtering out tools that require write permissions at startup - Allowing read operations: list, get, search, and export across all services **π Granular Permissions** ```bash # Per-service permission levels uv run main.py --permissions gmail:organize drive:readonly # Combine permissions with tier filtering uv run main.py --permissions gmail:send drive:full --tool-tier core ``` Granular permissions mode provides service-by-service scope control: - Format: `service:level` (one entry per service) - Gmail levels: `readonly`, `organize`, `drafts`, `send`, `full` (cumulative) - Tasks levels: `readonly`, `manage`, `full` (cumulative; `manage` allows create/update/move but denies `delete` and `clear_completed`) - Other services currently support: `readonly`, `full` - `--permissions` and `--read-only` are mutually exclusive - `--permissions` cannot be combined with `--tools`; enabled services are determined by the `--permissions` entries (optionally filtered by `--tool-tier`) - With `--tool-tier`, only tier-matched tools are enabled and only services that have tools in the selected tier are imported **β Tool Tiers** ```bash uv run main.py --tool-tier core # β Essential tools only uv run main.py --tool-tier extended # β Core + additional uv run main.py --tool-tier complete # β All available tools ``` **β Docker Deployment** ```bash docker build -t workspace-mcp . docker run -p 8000:8000 -v $(pwd):/app \ workspace-mcp --transport streamable-http # With tool selection via environment variables docker run -e TOOL_TIER=core workspace-mcp docker run -e TOOLS="gmail drive calendar" workspace-mcp ``` **Available Services**: `gmail` β’ `drive` β’ `calendar` β’ `docs` β’ `sheets` β’ `forms` β’ `tasks` β’ `contacts` β’ `chat` β’ `search` |
||
| **βΆ List Tools** ```bash uv run workspace-cli list uv run workspace-cli --url https://custom.server/mcp list # Or, if installed globally: workspace-cli list workspace-cli --url https://custom.server/mcp list ``` View all available tools | **β Call a Tool** ```bash uv run workspace-cli call search_gmail_messages \ query="is:unread" max_results=5 ``` Execute a tool with key=value arguments |
| #### Available Tiers **β Core** (`--tool-tier core`) Essential tools for everyday tasks. Perfect for light usage with minimal API quotas. Includes search, read, create, and basic modify operations across all services. **β Extended** (`--tool-tier extended`) Core functionality plus management tools. Adds labels, folders, batch operations, and advanced search. Ideal for regular usage with moderate API needs. **β Complete** (`--tool-tier complete`) Full API access including comments, headers/footers, publishing settings, and administrative functions. For power users needing maximum functionality. | #### Important Notes βΆ **Start with `core`** and upgrade as needed βΆ **Tiers are cumulative** β each includes all previous βΆ **Mix and match** with `--tools` for specific services βΆ **Configuration** in `core/tool_tiers.yaml` βΆ **Authentication** included in all tiers |
| **π Environment Variables** ```bash export GOOGLE_OAUTH_CLIENT_ID=\ "your-client-id" export GOOGLE_OAUTH_CLIENT_SECRET=\ "your-secret" ``` Best for production | **π File-based** ```bash # Download & place in project root client_secret.json # Or specify custom path export GOOGLE_CLIENT_SECRET_PATH=\ /path/to/secret.json ``` Traditional method | **β‘ .env File** ```bash cp .env.oauth21 .env # Edit .env with credentials ``` Best for development |
π Credential Loading Details β Understanding priority & best practices**Loading Priority** 1. Environment variables (`export VAR=value`) 2. `.env` file in project root (warning - if you run via `uvx` rather than `uv run` from the repo directory, you are spawning a standalone process not associated with your clone of the repo and it will not find your .env file without specifying it directly) 3. `client_secret.json` via `GOOGLE_CLIENT_SECRET_PATH` 4. Default `client_secret.json` in project root **Why Environment Variables?** - β **Docker/K8s ready** - Native container support - β **Cloud platforms** - Heroku, Railway, Vercel - β **CI/CD pipelines** - GitHub Actions, Jenkins - β **No secrets in git** - Keep credentials secure - β **Easy rotation** - Update without code changes |
||