AssertInbox

MCP reference

AssertInbox runs a remote MCP server, so an AI agent can create an address, wait for a sign-up email and read the one-time code or link without writing any glue code. The endpoint speaks JSON-RPC over HTTP POST (streamable HTTP, one JSON response per request) at https://assertinbox.com/mcp. It is listed in the official MCP Registry as com.assertinbox/mail. For a walk-through, read the guide for AI agents; the REST equivalent is the API reference.

Setup

Get an API key at /start or with POST /v1/keys. In any MCP client that supports remote streamable HTTP servers, add the URL and an Authorization: Bearer <key> header. The exact file differs by client; the generic shape is:

{
  "mcpServers": {
    "assertinbox": {
      "url": "https://assertinbox.com/mcp",
      "headers": {
        "Authorization": "Bearer <your API key>"
      }
    }
  }
}

MCP calls count towards the same daily allowance as REST calls for the key; see the limits page.

Test it with curl

Initialize the session, then list the tools:

curl -s https://assertinbox.com/mcp \
  -H "Authorization: Bearer $ASSERTINBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"curl","version":"1"}}}'
curl -s https://assertinbox.com/mcp \
  -H "Authorization: Bearer $ASSERTINBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'

Tools

create_address

Returns a fresh email address that this service will receive mail for; use it as the email in a sign-up or login form.

ArgumentTypeRequiredDescription
tagstringnoOptional tag for the address; a random one is generated when omitted.

Input schema:

{
  "type": "object",
  "properties": {
    "tag": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$",
      "description": "Optional tag for the address; a random one is generated when omitted."
    }
  },
  "additionalProperties": false
}

wait_for_email

Waits up to 25 seconds for an email sent to the address with this tag and returns it with the one-time code (otp) and links already extracted; returns an error result on timeout, so call it again.

ArgumentTypeRequiredDescription
tagstringyesInbox tag: letters, digits, dot, dash, underscore, up to 64 characters.
timeoutintegernoSeconds to wait, at most 25.
sinceintegernoOnly consider messages received at or after this Unix time in seconds.
afterstringnoA message id: return only a message that arrived after that one. Use it to skip an earlier email.
fromstringnoOnly messages whose sender contains this text (case-insensitive).
subjectstringnoOnly messages whose subject contains this text (case-insensitive).

Input schema:

{
  "type": "object",
  "properties": {
    "tag": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$",
      "description": "Inbox tag: letters, digits, dot, dash, underscore, up to 64 characters."
    },
    "timeout": {
      "type": "integer",
      "minimum": 0,
      "maximum": 25,
      "default": 20,
      "description": "Seconds to wait, at most 25."
    },
    "since": {
      "type": "integer",
      "description": "Only consider messages received at or after this Unix time in seconds."
    },
    "after": {
      "type": "string",
      "description": "A message id: return only a message that arrived after that one. Use it to skip an earlier email."
    },
    "from": {
      "type": "string",
      "description": "Only messages whose sender contains this text (case-insensitive)."
    },
    "subject": {
      "type": "string",
      "description": "Only messages whose subject contains this text (case-insensitive)."
    }
  },
  "required": [
    "tag"
  ],
  "additionalProperties": false
}

list_messages

Lists up to 50 received emails, newest first, optionally only for one tag, each with otp and links.

ArgumentTypeRequiredDescription
tagstringnoInbox tag: letters, digits, dot, dash, underscore, up to 64 characters.
sinceintegernoUnix time in seconds.
afterstringnoA message id: only messages that arrived after that one.
fromstringnoOnly messages whose sender contains this text (case-insensitive).
subjectstringnoOnly messages whose subject contains this text (case-insensitive).

Input schema:

{
  "type": "object",
  "properties": {
    "tag": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$",
      "description": "Inbox tag: letters, digits, dot, dash, underscore, up to 64 characters."
    },
    "since": {
      "type": "integer",
      "description": "Unix time in seconds."
    },
    "after": {
      "type": "string",
      "description": "A message id: only messages that arrived after that one."
    },
    "from": {
      "type": "string",
      "description": "Only messages whose sender contains this text (case-insensitive)."
    },
    "subject": {
      "type": "string",
      "description": "Only messages whose subject contains this text (case-insensitive)."
    }
  },
  "additionalProperties": false
}

get_message

Returns one received email by its id (from wait_for_email or list_messages), with otp, links, attachments metadata and the full body; returns an error result when no such message exists.

ArgumentTypeRequiredDescription
idstringyesThe message id.

Input schema:

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-fA-F-]{36}$",
      "description": "The message id."
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}

delete_messages

Deletes received emails: only those for one tag, or all of this key's messages when no tag is given. Use it to clean up after a test.

ArgumentTypeRequiredDescription
tagstringnoOnly delete messages for this tag; omit to delete all messages.

Input schema:

{
  "type": "object",
  "properties": {
    "tag": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$",
      "description": "Only delete messages for this tag; omit to delete all messages."
    }
  },
  "additionalProperties": false
}