Skip to Content
MailroomMailroom home

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

ToolArgumentsReturns
list_inboxinbox_id?, status? (open, waiting, needs_human, resolved, comma-separated)Inboxes, or conversations newest first with state, thread id and newest message id
get_threadthread_idThe conversation oldest first, quoted history removed
read_messagemessage_idOne message in full, with attachment ids
get_attachmentattachment_idAn image block for pictures, the text for text files, or a short-lived download link
replythread_id, text, html?, attachments?Email id and status
send_emailfrom, to, subject, text?, html?, cc?, bcc?, reply_to?, dry_run?, attachments?Email id and status
escalatethread_id, reasonThe conversation, now needs_human; the owner is emailed
resolvethread_id, note?The conversation, now resolved
request_approvalapproval_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.

On this page