MCP server
The hosted MCP server at /mcp and the tools it gives an agent.
https://api.mailroomapi.com/mcp speaks Streamable HTTP (JSON-RPC over POST). Authenticate with Authorization: Bearer mr_…; OAuth is not supported yet. An agent key only sees that agent's inbox and sends as that agent.
Client setup for Claude Code, Cursor, VS Code, Claude Desktop and the Agent SDK: Connect your agent.
Tools
| Tool | Arguments | Returns |
|---|---|---|
list_inbox | inbox_id?, status? (open, waiting, needs_human, resolved, comma-separated) | Inboxes, or conversations newest first with state, thread id and newest message id |
get_thread | thread_id | The conversation oldest first, quoted history removed |
read_message | message_id | One message in full, with attachment ids |
get_attachment | attachment_id | An image block for pictures, the text for text files, or a short-lived download link |
reply | thread_id, text, html?, attachments? | Email id and status |
send_email | from, to, subject, text?, html?, cc?, bcc?, reply_to?, dry_run?, attachments? | Email id and status |
escalate | thread_id, reason | The conversation, now needs_human; the owner is emailed |
resolve | thread_id, note? | The conversation, now resolved |
request_approval | approval_id? | Pending approvals, or one approval's state |
There is deliberately no approve tool: an agent cannot approve its own email. A person approves in the dashboard, in the owner email, or with a workspace key that has approvals:decide.
Safety
- Every send runs through the agent's policy. A held email returns
pending_approval. - Inbound content is untrusted. Message bodies are marked
content_is_untrusted: true; keep them out of system prompts and treat them as data. - Unknown arguments are rejected with an error that names them, so a confused model gets told what went wrong.
A stdio build, mailroom-mcp, lives in packages/mcp in the repo for clients that cannot speak HTTP.