← All guides

Set Up Disposable Email for a Claude Agent

A 60-second guide to giving Claude its own inbox

Your Claude agent can browse, code, and call APIs — but the moment a service asks for an email verification, it's stuck. This guide adds myagentinbox as an MCP server so Claude can create a disposable inbox, read incoming mail, and grab verification codes on its own.

What you'll get: Four MCP tools — create_inbox, check_inbox, read_message, download_attachment — wired into Claude Code, Claude Desktop, or the Claude Agent SDK. No accounts, no API keys, inboxes auto-delete after 24 hours.

Pick your Claude


Claude Code

1Add the MCP server. From your project directory, run:

claude mcp add myagentinbox npx mcp-remote https://myagentinbox.com/mcp

That registers the server for the current project. Use --scope user to make it available across every project on your machine:

claude mcp add --scope user myagentinbox npx mcp-remote https://myagentinbox.com/mcp

2Verify it loaded. Start Claude Code and run /mcp. You should see myagentinbox listed with four tools.

3Use it. Just ask:

> sign me up for the example.com newsletter using a throwaway email,
  then read the welcome message and tell me what's in it

Claude will call create_inbox, use the returned address in the signup form, poll check_inbox, and read the message back to you.


Claude Desktop

1Open the config file.

2Add the server under mcpServers:

{
  "mcpServers": {
    "myagentinbox": {
      "command": "npx",
      "args": ["mcp-remote", "https://myagentinbox.com/mcp"]
    }
  }
}

3Restart Claude Desktop. Look for the tools icon in the chat input — myagentinbox should appear in the connected servers list.

Need npx? Install Node.js first. The mcp-remote shim is what lets desktop clients (which speak stdio MCP) talk to a remote HTTP MCP server.

Claude Agent SDK

The Claude Agent SDK lets you build long-running agents in TypeScript or Python. MCP servers are passed in via mcpServers.

TypeScript

import { query } from "@anthropic-ai/claude-agent-sdk";

const result = query({
  prompt: "Sign up for service X with a throwaway email and report back the verification code.",
  options: {
    mcpServers: {
      myagentinbox: {
        type: "http",
        url: "https://myagentinbox.com/mcp",
      },
    },
    allowedTools: [
      "mcp__myagentinbox__create_inbox",
      "mcp__myagentinbox__check_inbox",
      "mcp__myagentinbox__read_message",
    ],
  },
});

for await (const msg of result) {
  console.log(msg);
}

Python

from claude_agent_sdk import query, ClaudeAgentOptions

options = ClaudeAgentOptions(
    mcp_servers={
        "myagentinbox": {
            "type": "http",
            "url": "https://myagentinbox.com/mcp",
        },
    },
    allowed_tools=[
        "mcp__myagentinbox__create_inbox",
        "mcp__myagentinbox__check_inbox",
        "mcp__myagentinbox__read_message",
    ],
)

async for message in query(
    prompt="Sign up for service X and read the verification email.",
    options=options,
):
    print(message)
The remote MCP transport (type: "http") means there's no local process to manage and no npx on the critical path — the SDK talks directly to myagentinbox.com/mcp.

The four tools, in plain English

create_inbox
Returns a fresh @myagentinbox.com address. Expires in 24 h.
check_inbox
Lists subjects, senders, and previews. Use this for polling.
read_message
Returns the full body — text and HTML — for a single message.
download_attachment
Images come back as base64, text inline, binary as a download URL.

A worked example: verification code flow

Here's the typical loop your agent will run, narrated for clarity:

  1. Call create_inbox → receive a7k2m9x4bp@myagentinbox.com.
  2. Submit that address to the target signup form (via browser tool, fetch, or whatever the agent has).
  3. Wait 5–10 seconds, then call check_inbox. If empty, wait and retry — most providers send within 30 seconds.
  4. Once a message appears, call read_message with its id. Extract the code or magic link from the body.
  5. Submit the code back to the target service. Done.
Tip for autonomous agents: tell Claude up front that the inbox is rate-limited to 20 reads/minute, so it backs off instead of polling tightly. A simple "wait 5 seconds between checks, give up after 2 minutes" instruction works well.

Limits to know

What to use it for

What not to use it for


That's the whole setup. If something doesn't work, the landing page has a one-click "create inbox" button you can use to confirm the service is reachable from your network before debugging the MCP layer.

Questions or feedback: hello@myagentinbox.com.