Tokenmaildocs
Dashboard

DocsTokenmail

MCP server

Tokenmail is an MCP server, so agents get inbox tools: make an address, wait for a code, read and search mail. Every call obeys your API key's scope.

  • Local: tokenmail mcp on stdio, signed in like the CLI (tokenmail login or TOKENMAIL_API_KEY).
  • Hosted: https://api.tokenmail.dev/mcp (Streamable HTTP), with Authorization: Bearer tokenmail_…, or a sign-in in the browser for clients that can't send a header (claude.ai and Claude Desktop custom connectors, ChatGPT). The sign-in asks what the app may do: inbox (read, make and change inboxes and their mail, and send) or inbox-read (only read), and gives it a key with that preset for 30 days.
# Claude Code (add --scope user for every project)
$ claude mcp add tokenmail -- tokenmail mcp
$ claude mcp add --transport http tokenmail https://api.tokenmail.dev/mcp --header "Authorization: Bearer $TOKENMAIL_API_KEY"
# Codex
$ codex mcp add tokenmail -- tokenmail mcp

Cursor (~/.cursor/mcp.json or .cursor/mcp.json), one of:

{ "mcpServers": { "tokenmail": { "command": "tokenmail", "args": ["mcp"] } } }

{ "mcpServers": { "tokenmail": {
    "url": "https://api.tokenmail.dev/mcp",
    "headers": { "Authorization": "Bearer ${env:TOKENMAIL_API_KEY}" } } } }

Claude Desktop: Settings, Developer, Edit Config. Use the full path from which tokenmail; it doesn't see your PATH.

{ "mcpServers": { "tokenmail": {
    "command": "/Users/you/.local/bin/tokenmail",
    "args": ["mcp"],
    "env": { "TOKENMAIL_API_KEY": "tokenmail_…" } } } }

Tools

ToolDoes
list_inboxes, create_inboxInboxes (creating uses a paid seat)
wait_for_emailNext email (up to 120 s) with codes and links extracted
list_messages, get_message, search_messages, list_threads, get_threadRead and search mail
send_email, reply_to_email, forward_email, create_draft, send_draftSend mail (sent once on retry). Not on yet: mail_send_off
update_labels, list_mail_eventsLabels (remove unread); events since a cursor

More of the API comes as toolsets, listed on request: mail (inbox settings, drafts, domains, forwarding, allow and block lists, suppressions, metrics), webhooks, account, billing, keys and orgs. Add ?toolsets=all to the hosted URL, or run tokenmail mcp --toolsets all.

  • Each toolset tool is one API route, with the same arguments, answer and key scope.
  • Deletes and tools that spend money or can't be undone need confirm: true.
  • A browser sign-in gives the client a new API key labeled mcp: CLIENT NAME, valid 30 days; it shows in tokenmail api-key list and the audit log, and you revoke it there.
  • Errors come back as the API's {"error":{"code","message","request_id"}}.
  • The hosted endpoint is stateless (GET is 405), speaks MCP 2025-06-18, 2025-03-26 and 2024-11-05, and shares the API's per-IP rate limit.