mcp · openagentemail — Claude Code MCP server: what it does, how to install
Assigns email addresses to agents, catches incoming OTP messages, and manages structured task handoffs across runs.
claude mcp add --env OPENAGENTEMAIL_API_KEY=<OPENAGENTEMAIL_API_KEY> --env OPENAGENTEMAIL_API_URL=<OPENAGENTEMAIL_API_URL> --transport stdio openagentemail-mcp -- npx -y @openagentemail/mcpWhat mcp does
This package bridges AI clients to an OpenAgentEmail setup using the Model Context Protocol. It allows assistants to register logical email identities on your domain, inspect incoming messages, and extract one-time passcodes or verification links directly.
Beyond basic mail handling, the server records task handoffs between separate agents. A requester creates a task for a target recipient, tracks progress in a shared thread, and stores approval verdicts. The server only logs decisions and results; running the reviewed action remains the agent's responsibility.
Running this integration requires OPENAGENTEMAIL_API_KEY and OPENAGENTEMAIL_API_URL. Without an active OpenAgentEmail backend hosted via Docker Compose or tied to IMAP and SMTP endpoints, the tool calls will fail.
What it helps with
- extract verification codes and links from incoming emails
- provision dedicated mail addresses for automated agents
- relay task state and results across separate agent sessions
- record explicit reviewer approval or rejection on staged actions
Example prompts for the agent
- Check the agent mailbox and read the latest verification code.
- Create a code review task for the recipient agent with the latest diff.
- Send a build notification email to the team distribution list.
How to install mcp
Platform CLI
claude mcp add --env OPENAGENTEMAIL_API_KEY=<OPENAGENTEMAIL_API_KEY> --env OPENAGENTEMAIL_API_URL=<OPENAGENTEMAIL_API_URL> --transport stdio openagentemail-mcp -- npx -y @openagentemail/mcpReplace <…> with your own values
Platform CLI
codex mcp add openagentemail-mcp --env OPENAGENTEMAIL_API_KEY=<OPENAGENTEMAIL_API_KEY> --env OPENAGENTEMAIL_API_URL=<OPENAGENTEMAIL_API_URL> -- npx -y @openagentemail/mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"openagentemail-mcp": {
"command": "npx",
"args": [
"-y",
"@openagentemail/mcp"
],
"env": {
"OPENAGENTEMAIL_API_KEY": "<OPENAGENTEMAIL_API_KEY>",
"OPENAGENTEMAIL_API_URL": "<OPENAGENTEMAIL_API_URL>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"openagentemail-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@openagentemail/mcp"
],
"env": {
"OPENAGENTEMAIL_API_KEY": "<OPENAGENTEMAIL_API_KEY>",
"OPENAGENTEMAIL_API_URL": "<OPENAGENTEMAIL_API_URL>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e OPENAGENTEMAIL_API_KEY=<OPENAGENTEMAIL_API_KEY> -e OPENAGENTEMAIL_API_URL=<OPENAGENTEMAIL_API_URL> openagentemail-mcp npx -y @openagentemail/mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp
How to install mcp in Claude Code?
Run `claude mcp add --env OPENAGENTEMAIL_API_KEY=<OPENAGENTEMAIL_API_KEY> --env OPENAGENTEMAIL_API_URL=<OPENAGENTEMAIL_API_URL> --transport stdio openagentemail-mcp -- npx -y @openagentemail/mcp`. Provide your valid API key and backend URL.
What does mcp do?
It equips models with tools to create agent mailboxes, read incoming messages, parse verification codes, and track multi-agent task handoffs.
What infrastructure is required to run it?
You need an accessible OpenAgentEmail deployment, hosted via Docker Compose or configured with your existing IMAP and SMTP provider.
Similar MCP servers
All MCP servers for Agent setup: memory, context, orchestration →mcp by other authors comes first.