home / mcp / agentmail mcp server
Provides MCP access to the AgentMail API tools for managing messages via automated commands.
Configuration
View docs{
"mcpServers": {
"agentmail-to-agentmail-mcp": {
"command": "npx",
"args": [
"-y",
"agentmail-mcp"
],
"env": {
"AGENTMAIL_API_KEY": "YOUR_API_KEY"
}
}
}
}The AgentMail MCP Server exposes a ready-to-run interface that lets you use the AgentMail API through MCP clients. It provides a simple way to access message operations and other tools in an automated, scriptable fashion, enabling you to integrate AgentMail actions into your broader workflows.
To use this MCP server, connect your MCP client to the local or remote MCP endpoint and load the available tools. By default, all tools are loaded, but you can selectively enable specific tools by passing a comma-separated list via the --tools option when you start or configure the server. This lets you tailor the set of capabilities to your automation needs.
Prerequisites: Node.js and npm must be installed on your system. You can verify installation with these commands.
Install and run the MCP server using the provided configuration. Create or edit your MCP configuration JSON to enable the AgentMail MCP server with your API key.
{
"mcpServers": {
"AgentMail": {
"command": "npx",
"args": ["-y", "agentmail-mcp"],
"env": {
"AGENTMAIL_API_KEY": "YOUR_API_KEY"
}
}
}
}If you plan to enable specific tools, you can pass them as a comma-separated list through the --tools argument. The following example demonstrates enabling three tools explicitly.
{
"mcpServers": {
"AgentMail": {
"command": "npx",
"args": ["-y", "agentmail-mcp", "--tools", "get_message,send_message,reply_to_message"],
"env": {
"AGENTMAIL_API_KEY": "YOUR_API_KEY"
}
}
}
}- Ensure your AGENTMAIL_API_KEY is valid and has the necessary permissions for the actions you intend to perform. - Store the API key securely and avoid committing it to source control. - If you need to rotate credentials, update the environment variable and restart the MCP server.
Retrieve a message by its ID using the AgentMail MCP interface.
Send a new message via the AgentMail MCP interface.
Reply to an existing message through the AgentMail MCP interface.