Skip to content

Commit e9f13f3

Browse files
ziggyclaude
andcommitted
Clarify email is optional, add provider options, FAQ update
- Rewrite add-gmail-agent skill: Gmail, Outlook, IMAP options documented - Make clear email is not core — fun to have, not required - Add NANOCLAW env var FAQ entry explaining NanoClaw compatibility - Add email integration section to README Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 757c9f3 commit e9f13f3

2 files changed

Lines changed: 48 additions & 21 deletions

File tree

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,59 @@
11
---
22
name: add-gmail-agent
3-
description: Wire Gmail MCP server into the agent so it can read, search, and send emails. Requires existing Gmail OAuth setup.
3+
description: Wire Gmail MCP server into the agent so it can read, search, and send emails. Optional — not core functionality.
44
---
55

6-
# Add Gmail to Agent
6+
# Add Email to Agent (Gmail)
77

8-
Gives the agent access to Gmail via MCP tools. The agent can then read, search, send, and manage emails.
8+
Gives the agent access to email via MCP tools. Read, search, send, and manage emails from the bot.
99

10-
## Prerequisites
10+
**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.
1111

12-
Gmail MCP server must be set up with OAuth credentials. If not done:
12+
## Email providers
13+
14+
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:
15+
16+
| Provider | Approach | Difficulty |
17+
|----------|----------|------------|
18+
| **Gmail** | MCP server with OAuth (documented below) | Medium — Google Cloud setup required |
19+
| **Outlook/365** | Microsoft Graph MCP server | Medium — Azure app registration |
20+
| **Any IMAP** | Generic IMAP MCP server | Easy — just server/user/password |
21+
| **Proton Mail** | Proton Bridge + IMAP MCP | Medium — needs Bridge running |
22+
23+
The Gmail route is documented here. For other providers, the wiring is identical — just swap the MCP server command in the agent runner config.
24+
25+
## Gmail setup
26+
27+
### 1. Google Cloud OAuth (one-time)
28+
29+
This is the fiddly part. You need a Google Cloud project with Gmail API enabled:
30+
31+
1. Go to [Google Cloud Console](https://console.cloud.google.com)
32+
2. Create a project (or use existing)
33+
3. Enable the Gmail API
34+
4. Create OAuth 2.0 credentials (Desktop app type)
35+
5. Download the credentials JSON
36+
37+
Then authenticate the MCP server:
1338

1439
```bash
15-
# Install and auth the Gmail MCP server
1640
npx @gongrzhe/server-gmail-autoauth-mcp
1741
```
1842

19-
This creates OAuth credentials in `~/.gmail-mcp/`. Follow the browser OAuth flow to authorise.
43+
Follow the browser OAuth flow. This creates credentials in `~/.gmail-mcp/`.
2044

21-
## Setup
22-
23-
### 1. Add environment variable
45+
### 2. Enable in GhostClaw
2446

2547
Add to `.env`:
2648

2749
```bash
2850
GMAIL_MCP_ENABLED=1
2951
```
3052

31-
### 2. Rebuild the agent runner
53+
### 3. Rebuild and restart
3254

3355
```bash
3456
cd container/agent-runner && npx tsc
35-
```
36-
37-
### 3. Restart
38-
39-
```bash
4057
launchctl kickstart -k gui/$(id -u)/com.ghostclaw # macOS
4158
# systemctl --user restart ghostclaw # Linux
4259
```
@@ -45,11 +62,9 @@ launchctl kickstart -k gui/$(id -u)/com.ghostclaw # macOS
4562

4663
Send a message to the bot: "Check my recent emails"
4764

48-
The agent should use `mcp__gmail__search_emails` and `mcp__gmail__read_email` tools to fetch and summarise emails.
49-
5065
## What the agent can do
5166

52-
With Gmail enabled, the agent has these MCP tools:
67+
With email enabled, the agent has these MCP tools:
5368

5469
| Tool | What it does |
5570
|------|-------------|
@@ -68,4 +83,8 @@ The agent runner at `container/agent-runner/src/index.ts` conditionally adds the
6883

6984
## Disabling
7085

71-
Remove `GMAIL_MCP_ENABLED=1` from `.env` and restart. The agent won't have Gmail tools on next invocation.
86+
Remove `GMAIL_MCP_ENABLED=1` from `.env` and restart. The agent won't have email tools on next invocation.
87+
88+
## Using other email providers
89+
90+
To swap Gmail for another provider, edit `container/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.

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,16 @@ GhostClaw uses NanoClaw's skill system. Skills are scanned for security issues b
100100
|-------|-------------|
101101
| `/add-heartbeat` | Periodic health checks (disk, logs, email) |
102102
| `/add-morning-briefing` | Scheduled daily/weekly briefings |
103-
| `/add-gmail-agent` | Gmail read/send via MCP |
103+
| `/add-gmail-agent` | Email read/send via MCP (Gmail, Outlook, or any IMAP) |
104104
| `/add-update-check` | Weekly check for GhostClaw updates |
105105
| `/add-slack` | Slack as additional channel |
106106
| `/add-discord` | Discord as additional channel |
107107
| `/add-telegram-swarm` | Multi-bot agent teams in Telegram |
108108

109+
### Email integration
110+
111+
Email is optional — not core functionality. But it's fun to have the bot read verification codes, check for urgent messages, or send summaries. Gmail is the easiest setup (OAuth MCP server), but any email provider with IMAP or an MCP server works. See `/add-gmail-agent` for details.
112+
109113
### Security scanning
110114

111115
Skills are automatically scanned before installation. The scanner checks for:
@@ -214,6 +218,10 @@ Yes. Agents have full host access. That's the point — don't run this on a mach
214218

215219
Set `ANTHROPIC_BASE_URL` and `ANTHROPIC_AUTH_TOKEN` in `.env` for any Anthropic-compatible endpoint.
216220

221+
**Why do I see `NANOCLAW_*` in the code?**
222+
223+
GhostClaw keeps NanoClaw's internal variable names (`NANOCLAW_GROUP_DIR`, `.nanoclaw/` state directory) so that skills from the NanoClaw ecosystem work without modification. User-facing names are all GhostClaw.
224+
217225
**How do I build my own skills?**
218226

219227
See the [NanoClaw skills architecture docs](docs/nanoclaw-architecture-final.md). GhostClaw skills follow the same format — `manifest.yaml` + `add/` + `modify/` directories.

0 commit comments

Comments
 (0)