Gmail channel plugin for Claude Code. It follows the Claude channel contract from the official channels reference: the server connects over stdio, declares experimental["claude/channel"], emits notifications/claude/channel, and exposes basic Gmail MCP tools.
- subscribes to Gmail mailbox updates through
users.watch - receives events through Google Cloud Pub/Sub
- resolves mailbox changes through
users.history.list - emits
notifications/claude/channelevents into Claude - exposes Gmail tools for reading and modifying messages
This plugin emits notifications/claude/channel only for new mail:
message_added
gmail_list_recentgmail_get_messagegmail_mark_readgmail_archive_messagegmail_modify_labels
Install dependencies:
bun install
Type-check:
bun run check
Run the channel server:
bun run start
Run the console smoke test:
bun run smoke
Run setup and integration checks:
bun run doctor
Run Gmail OAuth bootstrap:
bun run auth
bun run auth starts a temporary local HTTP callback server on the configured oauthRedirectUri, captures the Google OAuth code automatically, and saves the refresh token into ./.state/oauth.json.
Primary project config:
./gmail-channel.config.json
Example template:
./gmail-channel.config.example.json
Repo-local secrets and state:
- service account key:
./.secrets/gcp-service-account.json - OAuth state:
./.state/oauth.json - runtime state:
./.state/state.json
Full setup instructions are in SETUP.md.