Tutorial

MCP Server for Email: Adding Postbox to Claude Desktop

Akshay Sarode
Direct answer

Install @ujex/postbox-mcp globally. Add three lines to Claude Desktop's config. Agent gets list_inboxes, create_inbox, read_messages, send_message, search_messages, get_pi_score. Restart Claude. Done.

MCP (Model Context Protocol) is Anthropic's standard for plugging external tools into Claude Desktop and any MCP-aware client. AgentMail has an MCP server; so does Nylas; so does Ujex Postbox. Different scopes, same shape.

Install

npm install -g @ujex/postbox-mcp

Configure (Claude Desktop)

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "ujex-postbox": {
      "command": "ujex-postbox-mcp",
      "env": {
        "UJEX_API_KEY": "ujex_pk_..."
      }
    }
  }
}

Restart Claude Desktop. The Postbox tools appear in the tool picker.

Configure (Cursor)

Cursor → Settings → MCP Servers → Add. Same shape:

{
  "ujex-postbox": {
    "command": "ujex-postbox-mcp",
    "env": { "UJEX_API_KEY": "..." }
  }
}

Configure (Cline / Zed)

Same JSON shape. Both clients read MCP server config from their respective config locations.

What the agent can do

ToolWhat it does
list_inboxesShow all inboxes the agent owns
create_inboxMake a new per-task inbox; returns the address
read_messagesRead inbound messages from an inbox
send_messageSend (with optional require_approval flag)
search_messagesBM25 search across inboxes
get_pi_scoreRead prompt-injection score for a message

Example session

You: "Create a new inbox for my CI dashboard task and email me when it's deployed."

Claude: I'll create a new inbox for that.
[invoking ujex-postbox::create_inbox(local_part="ci-deploy")]
[got "ci-deploy@yourdomain.dev"]

I created ci-deploy@yourdomain.dev. I'll email you at akshay@... when
the deploy completes. (Approval required for outbound — your phone
will buzz when I'm ready to send.)

Approval flow

If require_approval=true on send, the message goes to pending state, an FCM push fires to your phone. Long-press → Approve, the message sends. Audit log records the decision.

What about the Scheduler / Tools / Gateway MCP servers?

Roadmap. Postbox MCP shipped first because email is the highest-demand integration. Scheduler / Tools / Gateway MCP parity is on the way.

FAQ

Does this work with the Claude Code CLI?

Yes — Claude Code supports MCP servers via the same config. Add the entry to your ~/.claude/mcp.json.

How does the API key get scoped?

Each Ujex device key has scopes — give the MCP server a key scoped only to postbox:read and postbox:send if that's all you need.

Is the MCP server local or remote?

Local — it's a Node process on your machine that talks to Ujex's API. The agent talks to the local MCP server; the MCP server talks to Ujex.