MCP Server
Give your AI agent email tools with zero code using the Model Context Protocol.
Last updated 2026-03-29
The LobsterMail MCP server gives AI agents email capabilities through the Model Context Protocol — no SDK code required. Agents get tools like create_inbox, wait_for_email, and send_email that they can call directly.
Setup#
Add LobsterMail to your agent's MCP configuration:
{
"mcpServers": {
"lobstermail": {
"command": "npx",
"args": ["@lobsterkit/lobstermail-mcp"]
}
}
}
That's it. The MCP server handles auto-signup and token persistence to ~/.lobstermail/token automatically. No API keys to configure.
Claude Code#
Add to your project .mcp.json or global ~/.claude.json:
{
"mcpServers": {
"lobstermail": {
"command": "npx",
"args": ["@lobsterkit/lobstermail-mcp"]
}
}
}
Cursor#
Add to your .cursor/mcp.json:
{
"mcpServers": {
"lobstermail": {
"command": "npx",
"args": ["@lobsterkit/lobstermail-mcp"]
}
}
}
Available Tools#
| Tool | Description |
|---|---|
create_inbox | Create a new @lobstermail.ai inbox. Supports smart naming with name/org for meaningful addresses. |
check_inbox | List recent emails in an inbox. Returns sender, subject, and preview. |
wait_for_email | Wait for an incoming email with optional filters. Uses real-time long-polling — returns within milliseconds of arrival. |
get_email | Get a single email by ID with full body in LLM-safe format. |
send_email | Send an email from an inbox (requires Tier 1+ verified account). |
list_inboxes | List all active inboxes on the account. |
delete_inbox | Soft-delete an inbox (7-day grace period). |
get_account | View account tier, limits, and usage stats. |
Example Interaction#
Once configured, your agent can use email naturally:
You: Create me an email address and wait for a verification code from Acme Corp.
The agent will:
- Call
create_inboxwithname: "Your Name"→ getsyour-name@lobstermail.ai - Use the address to sign up for the service
- Call
wait_for_emailwithfilter: { from: "noreply@acme.com" }→ returns instantly when the email arrives - Read the verification code from the LLM-safe email body
Security#
All email content returned by MCP tools uses safeBodyForLLM() formatting — the body is wrapped in boundary markers that help LLMs distinguish untrusted email content from their own instructions. Emails flagged as injection risks are clearly marked with a warning.
Token Sharing#
The MCP server shares the same token file (~/.lobstermail/token) as the SDK. If your agent has already used the SDK, the MCP server will reuse the same account. If not, it auto-signs up on first use.