Remote MCP server
Give Claude, Cursor or any MCP client an inbox
RESTAPI.email runs a remote MCP server at https://api.restapi.email/mcp (Streamable HTTP, stateless). Connect it with an API key and your agent can wait for an email and read the verification code as a tool call, without you writing any glue code.
- Same key as the REST API:
sk_live_(account) orsk_agent_(agent inbox). - Sent as
X-API-KeyorAuthorization: Bearer. - Reads exactly the inboxes that key can read; each tool call counts as one request.
1. Get a key
Create an account, subscribe to a plan, create an inbox and an API key in the dashboard. Limit the key to one inbox if the agent only needs that one. Keep it out of shared config files and commit history.
2. Connect your client
Claude Code
claude mcp add --transport http restapi-email https://api.restapi.email/mcp \
--header "X-API-Key: sk_live_..."Run /mcp inside Claude Code to check the server is connected.
Cursor
Add the server to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json in a project.
{
"mcpServers": {
"restapi-email": {
"url": "https://api.restapi.email/mcp",
"headers": { "X-API-Key": "sk_live_..." }
}
}
}Claude Desktop
Claude Desktop’s config file starts local servers, so a remote server that needs an API key header is connected through the open-source mcp-remote bridge (needs Node.js). Add this to claude_desktop_config.json (Settings, Developer, Edit Config) and restart Claude Desktop.
{
"mcpServers": {
"restapi-email": {
"command": "npx",
"args": [
"-y", "mcp-remote", "https://api.restapi.email/mcp",
"--header", "X-API-Key:${RESTAPI_EMAIL_KEY}"
],
"env": { "RESTAPI_EMAIL_KEY": "sk_live_..." }
}
}
}Other clients
Any client that supports remote Streamable HTTP servers with custom headers can use the generic mcpServers block. Field names vary slightly between clients; the URL and header do not.
{
"mcpServers": {
"restapi-email": {
"type": "http",
"url": "https://api.restapi.email/mcp",
"headers": { "X-API-Key": "sk_live_..." }
}
}
}3. Use it for a sign-up
The one thing to get right: take the newest message id before the email is triggered, and pass it as since. Otherwise a code already in the inbox matches immediately. If the tool returns timed_out, call it again with the same since.
# Then ask your agent to sign up somewhere. It calls:
list_messages { "address": "signup-bot@agent.restapi.email", "limit": 1 }
get_verification_code { "address": "signup-bot@agent.restapi.email",
"since": "<newest id from list_messages>" }
{ "code": "482913",
"link": "https://example.com/verify?token=...",
"message_id": "...", "subject": "Your code is 482913",
"from": "noreply@example.com" }Narrow the match with from_contains or subject_contains when several services mail the same inbox.
Tools
list_inboxes- The addresses this key can read.
list_messages- Messages in an inbox, newest first, as summaries. Optional full-text search with q.
wait_for_message- Long-poll (up to 25 seconds) for a new message; returns its text with extracted codes and links, or timed_out.
get_message- One message in full: headers, text, extracted codes and links; HTML on request.
get_verification_code- Wait for a verification email and return {code, link, message_id, subject, from}.
delete_message- Delete a message permanently.
Prefer plain HTTP? Everything here is also in the REST API: see the long-poll and extraction docs.
Connect your agent to an inbox
Create an account, make a key, and add one line to your MCP client.
Receive-only. Paid plans, by card, cancel any time.