Documentation

Everything you need to integrate Docmailer into your applications and AI agents.

Quick Start

Get started with Docmailer in 3 simple steps:

  1. Create an account at docmailer.org/dashboard
  2. Get your API token from the dashboard
  3. Start making requests to receive and send test emails
Example: Check your inbox
curl https://docmailer.org/mcp/inbox \
  -H "Authorization: Bearer YOUR_TOKEN"

Authentication

All API requests require authentication via Bearer token. Include your token in the Authorization header:

Authorization: Bearer YOUR_TOKEN

You can also pass the token as a query parameter:

https://docmailer.org/mcp/inbox?token=YOUR_TOKEN

Get Inbox

GET /mcp/inbox

Returns your test email address and a list of received emails.

Response
{
  "success": true,
  "inbox": {
    "id": "...",
    "email": "yourname@docmailer.org"
  },
  "emails": [...]
}

List Emails

GET /mcp/emails

Returns all emails in your inbox with previews.

Read Email

GET /mcp/email/:emailId

Returns the full content of a specific email, including text and HTML body.

ParameterDescription
emailIdThe unique ID of the email

Send Email

POST /mcp/send

Send an email from your test inbox. Pro plan required.

FieldRequiredDescription
toYesRecipient email address
subjectYesEmail subject line
textYesPlain text body
htmlNoHTML body (optional)
Example
curl -X POST https://docmailer.org/mcp/send \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "recipient@example.com",
    "subject": "Hello",
    "text": "This is a test email"
  }'

Delete Email

DELETE /mcp/email/:emailId

Delete a specific email from your inbox.

MCP Setup

Docmailer supports the Model Context Protocol (MCP) for seamless integration with AI agents. Here's how to set it up with popular tools.

Claude Code

Claude Code supports MCP servers natively. The easiest way to add Docmailer is using the CLI command:

Add via CLI (recommended)
# Add Docmailer as an SSE server
claude mcp add --transport sse docmailer \
  "https://docmailer.org/mcp/sse?token=YOUR_TOKEN"

# Verify it's added
claude mcp list

# Check status inside Claude Code
/mcp

Alternatively, edit your config file directly:

~/.claude.json or claude_desktop_config.json
{
  "mcpServers": {
    "docmailer": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://docmailer.org/mcp/sse?token=YOUR_TOKEN"]
    }
  }
}

Config file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

After adding, restart Claude Code. Then try: "Check my Docmailer inbox for new emails"

OpenAI Codex CLI

Codex CLI supports MCP servers through its config file. Add Docmailer to ~/.codex/config.toml:

~/.codex/config.toml
# Add Docmailer MCP server
[[mcp_servers]]
name = "docmailer"
transport = "sse"
url = "https://docmailer.org/mcp/sse?token=YOUR_TOKEN"

Or use the Codex CLI commands:

# Add the server
codex mcp add docmailer --url "https://docmailer.org/mcp/sse?token=YOUR_TOKEN"

# List configured servers
codex mcp list

Once configured, Codex will automatically load the Docmailer tools when starting a session.

Other AI Agents

Any MCP-compatible agent can connect to Docmailer using the SSE endpoint:

# SSE endpoint for MCP
https://docmailer.org/mcp/sse?token=YOUR_TOKEN

# Supports standard MCP methods:
# - initialize
# - tools/list
# - tools/call

MCP Tools

When connected via MCP, the following tools are available to your AI agent:

ToolDescription
get_inboxGet inbox info and recent emails
list_emailsList all emails with previews
read_emailRead full email content
send_emailSend email from your inbox (Pro)
delete_emailDelete an email