{"id":49418359,"url":"https://github.com/groupthink-dev/gmail-blade-mcp","last_synced_at":"2026-04-29T04:12:31.446Z","repository":{"id":347364530,"uuid":"1193177871","full_name":"Groupthink-dev/gmail-blade-mcp","owner":"Groupthink-dev","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-21T09:56:47.000Z","size":123,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-21T11:40:34.816Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Groupthink-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-27T00:31:36.000Z","updated_at":"2026-04-21T09:56:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Groupthink-dev/gmail-blade-mcp","commit_stats":null,"previous_names":["groupthink-dev/gmail-blade-mcp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Groupthink-dev/gmail-blade-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Groupthink-dev%2Fgmail-blade-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Groupthink-dev%2Fgmail-blade-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Groupthink-dev%2Fgmail-blade-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Groupthink-dev%2Fgmail-blade-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Groupthink-dev","download_url":"https://codeload.github.com/Groupthink-dev/gmail-blade-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Groupthink-dev%2Fgmail-blade-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32410084,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T03:46:11.172Z","status":"ssl_error","status_checked_at":"2026-04-29T03:37:55.317Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-29T04:12:26.126Z","updated_at":"2026-04-29T04:12:31.437Z","avatar_url":"https://github.com/Groupthink-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gmail Blade MCP\n\nProduction Gmail MCP server for AI agents. Token-efficient, write-safe, thread-intelligent.\n\n## Features\n\n| Category | Tools | Description |\n|----------|-------|-------------|\n| **Read** | `gmail_search`, `gmail_read`, `gmail_snippets`, `gmail_thread`, `gmail_mailboxes` | Search, read messages and threads, list labels |\n| **Meta** | `gmail_info`, `gmail_state`, `gmail_changes`, `gmail_identities`, `gmail_filters` | Account info, incremental sync, send-as aliases, filter rules |\n| **Write** | `gmail_send`, `gmail_reply`, `gmail_draft`, `gmail_flag`, `gmail_move`, `gmail_bulk`, `gmail_delete` | Send, reply, draft, label, move, batch ops, delete |\n| **Filter** | `gmail_filter_create`, `gmail_filter_delete` | Create and delete Gmail filters |\n| **AI** | `gmail_classify`, `gmail_summarise` | Gemini-powered classification and summarisation (requires `GOOGLE_API_KEY`) |\n\n### What makes this different\n\n- **Token-efficient by default** — HTML→plaintext stripping, body truncation, quoted-reply deduplication, concise list format\n- **Write-safe** — `GMAIL_WRITE_ENABLED=true` env gate + `confirm=true` on destructive operations\n- **Thread-intelligent** — `thread_mode=deduped` strips quoted replies; `latest` shows only newest message\n- **Incremental sync** — `gmail_state` + `gmail_changes` via Gmail `history.list` API\n- **Rate-limit aware** — automatic exponential backoff on 429 errors\n- **Gemini AI** — classify and summarise emails using Google Gemini (optional, requires `GOOGLE_API_KEY`)\n- **Credential-safe** — OAuth tokens scrubbed from error messages\n\n## Quick Start\n\n### 1. Install\n\n```bash\nuv sync\n```\n\n### 2. Set up Gmail API credentials\n\n1. Go to [Google Cloud Console](https://console.cloud.google.com/)\n2. Create a project (or select existing)\n3. Enable the Gmail API\n4. Create OAuth 2.0 credentials (Desktop application)\n5. Download the JSON file\n6. Save as `~/.gmail-blade/credentials.json`\n\n### 3. First run (authenticate)\n\n```bash\nuv run gmail-blade-mcp\n```\n\nA browser window opens for OAuth consent. After authorising, the refresh token is saved to `~/.gmail-blade/token.json`.\n\n### 4. Configure MCP client\n\n**Claude Desktop** (`claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"gmail-blade\": {\n      \"command\": \"uv\",\n      \"args\": [\"--directory\", \"/path/to/gmail-blade-mcp\", \"run\", \"gmail-blade-mcp\"],\n      \"env\": {\n        \"GMAIL_WRITE_ENABLED\": \"false\"\n      }\n    }\n  }\n}\n```\n\n## Environment Variables\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `GMAIL_WRITE_ENABLED` | `false` | Enable write operations (send, reply, delete, etc.) |\n| `GMAIL_MCP_TRANSPORT` | `stdio` | Transport: `stdio` or `http` |\n| `GMAIL_MCP_HOST` | `127.0.0.1` | HTTP host (when transport=http) |\n| `GMAIL_MCP_PORT` | `8768` | HTTP port (when transport=http) |\n| `GMAIL_MCP_API_TOKEN` | _(none)_ | Bearer token for HTTP transport auth |\n| `GOOGLE_API_KEY` | _(none)_ | Google AI Studio API key for Gemini classify/summarise tools |\n\n## Security\n\n- **Write operations disabled by default** — set `GMAIL_WRITE_ENABLED=true` to enable\n- **Permanent delete requires `confirm=true`** — use `gmail_move` to TRASH for soft delete\n- **OAuth tokens never appear in error messages** — regex scrubbing on all error paths\n- **Bearer auth uses constant-time comparison** — `secrets.compare_digest()`\n- **Credentials stored locally** — `~/.gmail-blade/`, never transmitted\n\n## Development\n\n```bash\nmake install-dev    # Install with dev + test deps\nmake test           # Unit tests (no Gmail needed)\nmake check          # Lint + format + type check\nmake test-cov       # Tests with coverage\n```\n\n## email-v1 Contract\n\nThis server implements the Sidereal `email-v1` domain contract — the same tool semantics as `fastmail-blade-mcp`. Skills targeting `email-v1` work with either provider.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgroupthink-dev%2Fgmail-blade-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgroupthink-dev%2Fgmail-blade-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgroupthink-dev%2Fgmail-blade-mcp/lists"}