一键导入
add-gmail-agent
Wire Gmail MCP server into the agent so it can read, search, and send emails. Optional — not core functionality.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Wire Gmail MCP server into the agent so it can read, search, and send emails. Optional — not core functionality.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Add Slack as a channel. Can replace WhatsApp entirely or run alongside it. Uses Socket Mode (no public URL needed).
Add Telegram as a channel. Can replace WhatsApp entirely or run alongside it. Also configurable as a control-only channel (triggers actions) or passive channel (receives notifications only).
Add Agent Swarm (Teams) support to Telegram. Each subagent gets its own bot identity in the group. Requires Telegram channel to be set up first (use /add-telegram). Triggers on "agent swarm", "agent teams telegram", "telegram swarm", "bot pool".
Add new capabilities or modify GhostClaw behavior. Use when user wants to add channels (Telegram, Slack, email input), change triggers, add integrations, modify the router, or make any other customizations. This is an interactive skill that asks questions to understand what the user wants.
Debug agent issues. Use when things aren't working, agent fails, authentication problems, or to understand how the system works. Covers logs, environment variables, sessions, and common issues.
Run initial GhostClaw setup. Use when user wants to install dependencies, authenticate WhatsApp, register their main channel, or start the background services. Triggers on "setup", "install", "configure ghostclaw", or first-time setup requests.
| name | add-gmail-agent |
| description | Wire Gmail MCP server into the agent so it can read, search, and send emails. Optional — not core functionality. |
Gives the agent access to email via MCP tools. Read, search, send, and manage emails from the bot.
This is optional. Email is not core to GhostClaw. But it's useful — your bot can read verification codes, check for urgent emails, send summaries, or flag things that need attention. One practical use: the bot reads its own auth codes automatically during setup.
Gmail is the easiest path because there's a well-maintained MCP server for it. But this isn't Gmail-specific — any email provider with an MCP server or IMAP access works. Options:
| Provider | Approach | Difficulty |
|---|---|---|
| Gmail | MCP server with OAuth (documented below) | Medium — Google Cloud setup required |
| Outlook/365 | Microsoft Graph MCP server | Medium — Azure app registration |
| Any IMAP | Generic IMAP MCP server | Easy — just server/user/password |
| Proton Mail | Proton Bridge + IMAP MCP | Medium — needs Bridge running |
The Gmail route is documented here. For other providers, the wiring is identical — just swap the MCP server command in the agent runner config.
This is the fiddly part. You need a Google Cloud project with Gmail API enabled:
Then authenticate the MCP server:
npx @gongrzhe/server-gmail-autoauth-mcp
Follow the browser OAuth flow. This creates credentials in ~/.gmail-mcp/.
Add to .env:
GMAIL_MCP_ENABLED=1
cd agent-runner && npx tsc
launchctl kickstart -k gui/$(id -u)/com.ghostclaw # macOS
# systemctl --user restart ghostclaw # Linux
Send a message to the bot: "Check my recent emails"
With email enabled, the agent has these MCP tools:
| Tool | What it does |
|---|---|
search_emails | Search with Gmail query syntax |
read_email | Read a specific email by ID |
send_email | Send an email |
draft_email | Create a draft |
modify_email | Move/label emails |
list_email_labels | List all labels |
create_filter | Create inbox filters |
download_attachment | Download attachments |
The agent runner at agent-runner/src/index.ts conditionally adds the Gmail MCP server when GMAIL_MCP_ENABLED=1 is set. The server runs as a child process of the agent, inheriting HOME for OAuth credential discovery.
Remove GMAIL_MCP_ENABLED=1 from .env and restart. The agent won't have email tools on next invocation.
To swap Gmail for another provider, edit agent-runner/src/index.ts and change the MCP server command in the gmail config block. The rest of the wiring (conditional enable via env var, tool permissions) stays the same.