Documentation
Everything you need to integrate Docmailer into your applications and AI agents.
Quick Start
Get started with Docmailer in 3 simple steps:
- Create an account at docmailer.org/dashboard
- Get your API token from the dashboard
- Start making requests to receive and send test emails
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
Returns your test email address and a list of received emails.
{
"success": true,
"inbox": {
"id": "...",
"email": "yourname@docmailer.org"
},
"emails": [...]
}
List Emails
Returns all emails in your inbox with previews.
Read Email
Returns the full content of a specific email, including text and HTML body.
| Parameter | Description |
|---|---|
emailId | The unique ID of the email |
Send Email
Send an email from your test inbox. Pro plan required.
| Field | Required | Description |
|---|---|---|
to | Yes | Recipient email address |
subject | Yes | Email subject line |
text | Yes | Plain text body |
html | No | HTML body (optional) |
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 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 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:
{
"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:
# 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:
| Tool | Description |
|---|---|
get_inbox | Get inbox info and recent emails |
list_emails | List all emails with previews |
read_email | Read full email content |
send_email | Send email from your inbox (Pro) |
delete_email | Delete an email |