About OpenMail
OpenMail is a hosted email MCP service for AI agents, with OAuth sign-in and API-key access for headless clients. It supports inbox creation and email handling, including reading messages that need replies and responding in-thread.
Key features
- 01Create agent email inboxes
- 02Read mail that needs a reply
- 03Reply within existing threads
- 04Send email and manage domains
- 05Connect through OAuth or API keys
Use cases
- 01Give an agent a dedicated inbox
- 02Review incoming messages requiring a response
- 03Reply while preserving the email thread
- 04Connect a headless agent with an inbox-scoped key
MCP support
OpenMail exposes its hosted Streamable HTTP MCP endpoint for email operations. OAuth and API-key authentication are supported, with read-only and inbox-scoped endpoint options.
Configuration
Remote servers need no local install. Pick your client, then copy the config or install in one click.
https://mcp.openmail.sh/mcpclaude mcp add --transport http sh-openmail-openmail https://mcp.openmail.sh/mcp{"mcpServers":{"sh-openmail-openmail":{"type":"http","url":"https://mcp.openmail.sh/mcp"}}}Open in Cursor{"servers":{"sh-openmail-openmail":{"type":"http","url":"https://mcp.openmail.sh/mcp"}}}Open in VS Code{"mcpServers":{"sh-openmail-openmail":{"type":"http","url":"https://mcp.openmail.sh/mcp"}}}{"mcpServers":{"sh-openmail-openmail":{"serverUrl":"https://mcp.openmail.sh/mcp"}}}Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.
Tools
Details
From the project READMEOpenMail MCP
Hosted Streamable HTTP MCP at https://mcp.openmail.sh/mcp. Email inbox for AI agents: one inbox, read mail that wants a reply, reply in-thread.
There is no local stdio catalog — stdio-only clients should use mcp-remote.
Connect
Claude (OAuth): paste https://mcp.openmail.sh/mcp
Cursor (OAuth): Add to Cursor, or add the URL below without headers. Also on cursor.directory as a plugin (.cursor-plugin/plugin.json + mcp.json).
Claude Code: claude mcp add --transport http openmail https://mcp.openmail.sh/mcp, or install as a plugin (claude plugin marketplace add openmailsh/mcp, then claude plugin install openmail@openmailsh-mcp): the plugin bundles the server with the openmail skill in skills/, which teaches the agent when to reach for email and how to handle a thread.
VS Code / any registry client: listed in the MCP Registry as sh.openmail/openmail.
Cursor or headless agents (API key):
{
"mcpServers": {
"openmail": {
"url": "https://mcp.openmail.sh/mcp",
"headers": { "Authorization": "Bearer om_YOUR_KEY" }
}
}
}
Prefer an inbox-scoped key. Read-only: /mcp/readonly. One inbox: /mcp/inbox/{id}.
Keys and transcripts: over OAuth (Claude, Cursor sign-in) setup_agent_email and mint_inbox_key never return a token — the session is already authenticated, and anything returned lands in the chat. They point to the console, which shows a new key once in the browser. Over an API key (headless agent) the token is returned in the tool result; move it to the agent's env.
stdio-only clients: npx -y mcp-remote https://mcp.openmail.sh/mcp
Env
| Name | Purpose |
|---|---|
OPENMAIL_API_URL | API origin (https://api.openmail.sh) |
MCP_RESOURCE_URL | OAuth resource (https://mcp.openmail.sh) |
MCP_JWT_SECRET | Same secret as the API. Required in production; outside production falls back to NEXTAUTH_SECRET |
CONSOLE_ORIGIN | Consent page host |
PORT | Listen port |
POSTHOG_API_KEY | Turns on PostHog MCP Analytics ($mcp_tool_call per call). Unset = off |
MCP_ANALYTICS_DEBUG | Set to log every captured analytics event |
See .env.example.
Local
pnpm install
pnpm test
pnpm dev
Contributing
Open an issue or PR. Run pnpm typecheck && pnpm test before pushing.
MIT © OpenMail
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.