Model Context Protocol (MCP) is an open standard that lets AI assistants connect to external tools and data sources. Think of it as a universal adapter that lets AI agents interact with the real world — databases, APIs, file systems, and yes, email.
The Problem MCP Solves
Before MCP, giving an AI assistant access to external tools required:
- Custom integrations for each AI provider
- Complex authentication flows
- Inconsistent interfaces across tools
- Security concerns with direct API access
MCP standardizes this. One protocol, universal compatibility.
How MCP Works
MCP follows a client-server model:
- MCP Server — A service that exposes tools (like Docmailer)
- MCP Client — The AI assistant (Claude Code, Cursor, etc.)
- Protocol — JSON-RPC over stdio, HTTP, or SSE
Example Flow
User: "Check my test inbox for new emails"
Claude → MCP Client: tool_call("list_emails", {inbox_id: "abc"})
MCP Client → Docmailer Server: JSON-RPC request
Docmailer Server → Docmailer API: GET /inbox/abc/emails
Docmailer API → Docmailer Server: {emails: [...]}
Docmailer Server → MCP Client: {result: {emails: [...]}}
MCP Client → Claude: "You have 3 new emails..."
Claude: "You have 3 new emails. The most recent is
'Verify your account' from noreply@app.com"
MCP vs Direct API Access
Why not just give the AI your API key?
- Security: MCP servers can implement fine-grained permissions
- Consistency: Same interface across all tools
- Discovery: AI can ask "what tools do you have?"
- Streaming: Real-time updates via SSE
Docmailer's MCP Implementation
Docmailer provides an MCP server that exposes these tools:
{
"tools": [
{
"name": "list_inboxes",
"description": "List all email inboxes"
},
{
"name": "create_inbox",
"description": "Create a new test inbox"
},
{
"name": "list_emails",
"description": "List emails in an inbox"
},
{
"name": "read_email",
"description": "Read full email content"
},
{
"name": "send_email",
"description": "Send an email (Premium)"
}
]
}
Setting Up MCP
Claude Code
claude mcp add --transport sse docmailer "https://docmailer.org/mcp/sse?token=YOUR_TOKEN"
Cursor / Other Clients
Add to your MCP config file:
{
"servers": {
"docmailer": {
"url": "https://docmailer.org/mcp/sse",
"auth": {
"type": "bearer",
"token": "YOUR_TOKEN"
}
}
}
}
The Future of AI Tools
MCP is still early, but adoption is growing fast. Major players are building MCP servers:
- Databases (Postgres, SQLite)
- Browser automation (Playwright)
- File systems and Git
- Communication tools (Slack, Email)
As more services add MCP support, AI agents become genuinely capable of handling complex, multi-step tasks autonomously.
Give Your AI Email Powers
Connect Docmailer via MCP and let your AI handle email testing.
Get Started Free →