The AgentMail MCP server allows AI assistants to manage email inboxes and messages dynamically through the Model Context Protocol. You can:
Create new email inboxes with optional domain, username, and display name
List all active inboxes with optional pagination
Get details for specific inboxes by ID
List and view email threads within inboxes
Retrieve details for specific threads and messages
Get message attachments
Send emails with options for CC, BCC, HTML, and plain text
Reply to messages with optional quoted replies
References a Discord community for updates on the evolving MCP protocol and community engagement.
Provides configuration instructions specific to macOS for the Claude Desktop integration.
Provides distribution of the agentmail-mcp package through the Python Package Index, allowing users to easily install the MCP server.
Utilizes Python as the implementation language, requiring Python 3.10+ for server operation.
AgentMail MCP Integration
A simple Model Context Protocol (MCP) server that integrates with AgentMail to dynamically manage email inboxes, list messages, and send or reply to emails—all through an AI assistant such as Claude. This reference implementation demonstrates how to use AgentMail’s API within an MCP server to orchestrate email inboxes on the fly.
About AgentMail
AgentMail is an API-first email provider that allows AI Agents to create inboxes on the fly to send, recieve and take action on emails. We have layers of intelligence built on top of the email layer optimized for agentic workflows and make data digestable by LLMs. Request an API key here!
Important Note
This is a work in progress package as the MCP protocol is still evolving. Will update as soon as new features are added. Join our discord and join the community! Discord
Features
- Create new inboxes dynamically on the fly
- List and retrieve inboxes to see what’s active
- Send emails from any of your AgentMail inboxes
- Reply to messages within existing threads
- List threads and messages for a chosen inbox
- Retrieve attachments for messages
Prerequisites
- Python 3.10+
- AgentMail API key
- (Optional) Claude Desktop or any other front-end that supports MCP commands
Installation
There exists a PyPi package for this project. Once installed, you can reference it in your Claude Desktop configuration (or run it directly) to enable email management tools.
PIP (Local or PyPI)
If you maintain your own Python environment, simply install the package from your virtual enviornment (from PyPI or a local source):
Then run:
This will get the server running on your local machine.
Option 1: Using Claude Desktop
If you want to interact with the server from Claude Desktop, follow these exact steps.
- Activate your virtual environment.
- Run the line below to find out where the Agentmail MCP server package is located. It should be in some .venv/bin/ directory if you installed the agentmail-mcp package in the virtual environment. For Claude Desktop it is important you installed it in the virtual environment.
- Copy the path that is returned.
- Paste the path into the
command
field in theclaude_desktop_config.json
file. - Restart Claude Desktop.
Here is what the claude_desktop_config.json
file should look like:
If you don't have a claude_desktop_config.json
file, create one in the following directory:
On macOS, the config file is typically located at: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows, it’s usually located at: %APPDATA%/Claude/claude_desktop_config.json
After saving, restart Claude Desktop to load the new MCP server.
Usage
With your server running in Claude Desktop (or another MCP client), you can prompt Claude with natural language commands that map to AgentMail MCP tools. For example: • “Create a new inbox named demo.” • “List all my inboxes.” • “Send an email from inbox test@agentmail.to to test@example.com with subject ‘Hello’ and body explaining the weather in San Francisco for the past week. • “Reply to the most recent message in inbox abc123.”
Internally, Claude calls the exposed MCP tools (create_inbox, list_inboxes, send_message, etc.), which in turn call the AgentMail API.
License
License
MIT License - This project is distributed under the MIT license. Use at your own risk.
⸻
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
Gives on-the-fly inboxes to AI agents. Agents / LLM's can send, receive, and take action in isolated inboxes. Built for AI unlike Gmail. Check us out at agentmail.to
Related MCP Servers
- -securityFlicense-qualityEnables users to manage Gmail accounts using AI agent-assisted operations via an MCP protocol, supporting email search, reading, deletion, and sending with a voice-powered interface.Last updated -610
- AsecurityFlicenseAqualityProvides an interface to manage email marketing, contact lists, dynamic templates, and email analytics via SendGrid's API.Last updated -819
- AsecurityFlicenseAqualityAn MCP-based email tool that enables AI models to access email services through standardized interfaces, allowing AI assistants to perform various email operations like sending emails, reading inboxes, and handling attachments.Last updated -1735
- -securityFlicense-qualityEnables AI assistants to interact with Gmail accounts via IMAP, allowing them to list, search, read, and send emails, manage labels and folders, and access attachments through the Model Context Protocol.Last updated -