nimpost blog

MCP Email Server: Let Your Agent Manage Its Own Mailbox

mcpai-agentsemailclaude

MCP Email Server: Let Your Agent Manage Its Own Mailbox

An MCP (Model Context Protocol) server is how you give an agent framework a named set of tools it can call, instead of wiring up HTTP requests by hand. A MCP email server takes that idea a step further: it gives the agent a whole mailbox — create it, wait on it, read from it, extract what matters from it, and burn it when it's done — through the same tool-calling interface your agent already speaks. No glue code, no polling loop, no scraping. The mailbox is just another set of tools, mounted once, and your agent can manage its own mail end to end.

One endpoint, twelve tools

The whole server is a single Streamable-HTTP endpoint at https://nimpost.com/mcp — one URL your MCP client points at, no session juggling, no separate auth surface. Behind it are twelve tools:

That's the spine. Everything an agent needs to run the full mailbox lifecycle — create, receive, read, wait, extract, send, clean up — is a named tool on that one endpoint. The server also publishes a crawlable contract at https://nimpost.com/mcp/manifest.json if you want to inspect the tool surface without connecting a client.

Connect any MCP client

Because it's a standard MCP endpoint, you can point any MCP client at it. Claude, Cursor, Codex, or a local MCP runner — the client handles the wire protocol and hands the tools to the model as named, typed capabilities. You don't write the tool wrappers yourself; the server already speaks MCP. This is what makes it a drop-in: add the endpoint to your client's config, and the twelve tools show up in the agent's tool list.

The verify_code composite

Most mail verification is a two-step problem: wait for the email, then extract the code. verify_code collapses that into one tool call — it waits on the inbox and extracts the code from the message that arrives, returning both together. No round-trip between a wait tool and an extract tool, no juggling an email id between calls.

A typical tools/call looks like this:


{
  "method": "tools/call",
  "params": {
    "name": "verify_code",
    "arguments": {
      "identity": "my-agent@nimpost.com",
      "wait_s": 60
    }
  }
}

{
  "content": [
    {
      "type": "text",
      "text": "{\"found\": true, \"code\": \"483920\", \"links\": [], \"actions\": []}"
    }
  ]
}

One call, one result: the code came in, here it is. If the expected email doesn't arrive within the window, found is false and the agent decides what to do next — retry, surface it, move on — without ever having parsed HTML or polled an inbox.

When to use MCP vs. REST

The mailbox is reachable two ways: as flat REST+JSON over HTTP, and as this MCP server. They expose the same capabilities; the difference is who's doing the calling.

Use REST when the mailbox is a step in your own code. You're orchestrating a flow — signup, reset, receipt check — and you want to call the inbox directly from your app or your agent's internal logic. Flat, keyless, no framework involved.

Use MCP when the agent itself is the one deciding what to do with the mailbox. Your agent framework already speaks MCP, so the mailbox appears as tools the model can pick between: wait, read, extract, send, burn. The agent manages its own mail instead of your code doing it on its behalf.

If you're building the agent, REST is usually the right default and you can add MCP on top. If you're shipping the agent to users and want it to be self-sufficient with its own inbox, MCP is the path of least friction.

Extraction without an LLM

The extract and verify tools run server-side regex and heuristics: 4/6/8-digit OTPs, spaced codes, confirmation links. No LLM in the loop, which keeps the calls fast and deterministic. LLM fallback is available as a paid add-on for the freeform content where a regex won't get you the value.

FAQ

What's an MCP email server, in one line?

It's a mailbox exposed as a set of named MCP tools over one Streamable-HTTP endpoint, so your agent framework can manage the agent's own email without you writing HTTP glue.

Which MCP clients work with it?

Any standard MCP client — Claude, Cursor, Codex, or a local runner. The endpoint is standard Streamable-HTTP; the client handles the protocol, and the twelve tools show up in the agent's tool list.

How is verify_code different from calling wait_inbox then extract_code?

verify_code does both in one call: it blocks up to the wait window for the expected message, extracts the code, and returns {found, code, links, actions} together. You skip the intermediate round-trip of an email id between two separate calls.

Do I still need the REST API?

No — MCP and REST cover the same mailbox. Use REST when your own code drives the flow, and MCP when the agent drives it. The mailbox underneath is identical.

Give your agent the mailbox

Point your MCP client at https://nimpost.com/mcp and the twelve tools are live. Start at nimpost.com, see the full tool contract in the MCP docs, or check the pricing to pick the tier that fits your agent's volume.

Try it on your agent

Receiving is free on every tier. Start with 1 alias and 50 sends per month — no card needed to receive mail.

Create an agent mailbox Read the API Connect via MCP