{
  "markdown": "# EngageLab Agent Email MCP Server\n\n[![npm](https://img.shields.io/npm/v/@engagelabemail/mcp)](https://www.npmjs.com/package/@engagelabemail/mcp)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![Node](https://img.shields.io/badge/node-%3E%3D20-green)](https://nodejs.org)\n\n**English** | [简体中文](README.zh-CN.md)\n\n> Official EngageLab Email project.\n\n**Send, receive, and reply to email from AI agents** — through the [Model Context Protocol](https://modelcontextprotocol.io).\n\nEach agent gets its **own mailbox**: a real address that sends *and* receives, with conversations grouped into threads so your agent has context. Works with Claude Desktop, Claude Code, Cursor, Cowork, and any MCP-compatible client.\n\n```json\n{\n  \"mcpServers\": {\n    \"engagelab-email\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@engagelabemail/mcp\"],\n      \"env\": { \"ENGAGELAB_EMAIL_SECRET_KEY\": \"sk_sg_your_key\" }\n    }\n  }\n}\n```\n\n## Why\n\nMost email APIs are send-only. Agents that need to *have a conversation* over email — support, scheduling, approvals — need an inbox.\n\n- **Send & receive** — the agent owns a dedicated mailbox, not a bolted-on parse webhook\n- **Thread-aware** — replies group into conversations, so the agent sees full history\n- **Sandbox mode** — test agent flows without emailing real humans\n- **One env var** — no OAuth dance for local use; region inferred from the key\n\n## Tools\n\n| | Tool | What it does |\n|---|---|---|\n| **Discover** | `list_mailboxes` | List mailboxes; call this first to get IDs |\n| **Send** | `send_email` | New email (text/html, cc/bcc, attachments, sandbox) |\n| | `reply_email` | Reply to a message — recipients & thread inferred |\n| **Receive** | `list_inbound_messages` | Inbound mail, filter by mailbox/keyword |\n| | `get_message` | Full message details by UID |\n| | `check_new_messages` | One-shot poll for new mail |\n| **Threads** | `list_threads` / `get_thread` / `list_thread_messages` | Browse conversations |\n\n## Quickstart\n\n### Smithery / MCPB\n\nFor local stdio distribution, build an MCPB bundle:\n\n```bash\nnpm run build:mcpb\n```\n\nThe bundle is generated at `dist/engagelab-agent-email.mcpb` and can be uploaded through [Smithery publishing](https://smithery.ai/new).\n\n### Official MCP Registry\n\nEngageLab Agent Email is also listed in the [official MCP Registry](https://registry.modelcontextprotocol.io/?q=io.github.R1ghtHereWaiting%2Fengagelab-email). Clients that consume the Registry can find it by the server name `io.github.R1ghtHereWaiting/engagelab-email`; the underlying npm package remains [`@engagelabemail/mcp`](https://www.npmjs.com/package/@engagelabemail/mcp).\n\n**1. Get a Secret Key.** Create an EngageLab account and generate a key from the console (format `sk_sg_xxx` — the prefix selects the region). Or use the [CLI](https://github.com/Metaverse-Cloud/engagelab-email-cli): `engagelab-email-cli login` creates one via browser.\n\n**2. Create a mailbox.** In the console, create a mailbox for your agent (shared subdomain is instant; custom domains need DNS verification). Programmatic mailbox creation is on the roadmap — see [Troubleshooting](#troubleshooting) if `list_mailboxes` returns empty.\n\n**3. Register the server.**\n\nClaude Desktop — add the JSON block above to `claude_desktop_config.json`.\n\nClaude Code:\n\n```bash\nclaude mcp add engagelab-email \\\n  -e ENGAGELAB_EMAIL_SECRET_KEY=sk_sg_your_key \\\n  -- npx -y @engagelabemail/mcp\n```\n\nThen ask your agent:\n\n> List my mailboxes, then send an email from the first one to bob@example.com saying the invoice is approved.\n\nA typical agent loop for a support bot:\n\n```\ncheck_new_messages()            → [messageUids]\nget_message(uid)                → body, attachments\nlist_thread_messages(threadId)  → full conversation context\nreply_email(uid, { text: ... }) → response lands in the same thread\n```\n\n## Configuration\n\n| Environment variable | Required | Description |\n|---|---|---|\n| `ENGAGELAB_EMAIL_SECRET_KEY` | Yes | Secret Key starting with `sk_` |\n| `ENGAGELAB_EMAIL_BASE_URL` | No | Override the API base URL. Inferred from the key region: `sg` → Singapore, `tr` → Türkiye |\n\nLimits: up to 10 attachments / 10MB total per message (base64-encoded in the tool schema).\n\n## Troubleshooting\n\n- **`list_mailboxes` returns an empty list** — your account has no mailbox yet. Create one in the EngageLab console (see Quickstart step 2). Agents cannot self-provision mailboxes yet.\n- **401 / `code 100101`** — the Secret Key is wrong or revoked. Check `ENGAGELAB_EMAIL_SECRET_KEY` and that the key's region prefix (`sk_sg_` / `sk_tr_`) matches the endpoint you use.\n- **Could not determine API base URL** — the key's region prefix isn't recognized. Set `ENGAGELAB_EMAIL_BASE_URL` explicitly.\n- **Reply shows up as a new conversation** — use `reply_email` (not `send_email`) so In-Reply-To headers and threading stay intact.\n\n## Roadmap\n\n- [ ] Hosted MCP (OAuth) for zero-config remote use\n- [ ] Programmatic mailbox creation via Secret Key\n- [ ] Webhook push (no polling) for `check_new_messages`\n- [ ] URL-based attachment references (no base64 in context)\n\n## Run from source\n\n```bash\ngit clone https://github.com/Metaverse-Cloud/engagelab-email-mcp\ncd engagelab-email-mcp\nnpm install && npm run build\nENGAGELAB_EMAIL_SECRET_KEY=sk_sg_xxx node dist/index.cjs\n```\n\n## Related\n\n- [EngageLab Agent Email CLI](https://github.com/Metaverse-Cloud/engagelab-email-cli) — same mailboxes from the terminal, `--json` output for agents\n- [EngageLab Node SDK](https://github.com/Metaverse-Cloud/engagelab-email-node) / [Python SDK](https://github.com/Metaverse-Cloud/engagelab-email-python) — send email from code\n\n## License\n\n[MIT](LICENSE)\n",
  "bytes": 5676,
  "sha": "42566fe5cd5df9d8f5b8d3665d765ba3b1807569a897039fbb03fc1a6f7983f8",
  "repo_slug": "metaverse-cloud/engagelab-email-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_r1ghtherewaiting_engagelab_ema_a0f22719/readme"
}