
Agentmail Mcp
- 626 installs
- 21 repo stars
- Updated July 21, 2026
- agentmail-to/agentmail-skills
agentmail-mcp is a Claude skill that connects AgentMail email tools to MCP-compatible AI clients via the hosted server at mcp.agentmail.to for inbox management, sending, receiving, and thread handling.
About
agentmail-mcp is a setup skill from agentmail-to/agentmail-skills that wires AgentMail into MCP-compatible clients including Claude Desktop, Cursor, VS Code, and Windsurf. The simplest path uses the remote hosted MCP server at https://mcp.agentmail.to with OAuth 2.0 authentication via Smithery, requiring an API key from console.agentmail.to. The skill documents three setup options and exposes tools for inbox management, sending and receiving email, and thread handling inside the assistant. Developers reach for agentmail-mcp when agents must triage support mail, draft replies, or automate email workflows directly from Claude or Cursor.
- Connects any MCP-compatible AI client to a live email inbox
- Three setup options: remote hosted, local npx, or self-hosted
- OAuth 2.0 via Smithery for remote server (no API key in env)
- Tools for inbox management, sending/receiving, and thread handling
- Works with Claude Desktop, Cursor, VS Code, and Windsurf
Agentmail Mcp by the numbers
- 626 all-time installs (skills.sh)
- Ranked #1,551 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/agentmail-to/agentmail-skills --skill agentmail-mcpAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 626 |
|---|---|
| repo stars | ★ 21 |
| Last updated | July 21, 2026 |
| Repository | agentmail-to/agentmail-skills ↗ |
How do you add email tools to MCP agents?
Give their AI coding agents the ability to read, send, and manage real email threads directly from within Claude, Cursor, or Windsurf.
Who is it for?
Developers wiring AI coding agents to real email inboxes through MCP without building a custom SMTP integration first.
Skip if: Bulk marketing email campaigns or teams needing deep Exchange or Gmail API customization beyond AgentMail MCP tools.
When should I use this skill?
An agent must read, send, or manage email threads from Claude Desktop, Cursor, VS Code, or Windsurf via MCP.
What you get
Configured MCP client connection, authenticated AgentMail access, and working inbox send/receive thread tools
- MCP client configuration
- authenticated email tool access
By the numbers
- Documents 3 setup options for MCP-compatible clients
- Remote MCP endpoint: https://mcp.agentmail.to
Files
AgentMail MCP Server
Connect AgentMail to any MCP-compatible AI client. Three setup options available.
Prerequisites
Get your API key from console.agentmail.to.
---
Option 1: Remote MCP (Simplest)
No installation required. Connect directly to the hosted MCP server.
URL: https://mcp.agentmail.to
Authentication: OAuth 2.0 via Smithery. The remote server does NOT accept an API key in env — it returns 401 Bearer error="invalid_token" and redirects your MCP client through the OAuth authorization server at https://auth.smithery.ai/agentmail. The MCP client handles the browser-based consent flow automatically on first connect.
Add to your MCP client configuration:
{
"mcpServers": {
"AgentMail": {
"url": "https://mcp.agentmail.to"
}
}
}On first use, your MCP client opens a browser window to complete the Smithery OAuth flow; after approval, tokens are cached by the client. If you need API-key auth (no OAuth flow), use Option 2 or Option 3 below instead.
---
Option 2: Local npm Package
Run the MCP server locally via npx.
{
"mcpServers": {
"AgentMail": {
"command": "npx",
"args": ["-y", "agentmail-mcp"],
"env": {
"AGENTMAIL_API_KEY": "YOUR_API_KEY"
}
}
}
}Tool Selection
Load only specific tools with the --tools argument:
{
"mcpServers": {
"AgentMail": {
"command": "npx",
"args": [
"-y",
"agentmail-mcp",
"--tools",
"send_message,reply_to_message,list_inboxes"
],
"env": {
"AGENTMAIL_API_KEY": "YOUR_API_KEY"
}
}
}
}---
Option 3: Local Python Package
Install and run the Python MCP server.
pip install agentmail-mcpClaude Desktop
Config location:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json
The server accepts the API key in two ways: via AGENTMAIL_API_KEY env var, or via the --api-key CLI flag. Use whichever works in your MCP client's launcher environment.
{
"mcpServers": {
"AgentMail": {
"command": "/path/to/your/.venv/bin/agentmail-mcp",
"env": {
"AGENTMAIL_API_KEY": "YOUR_API_KEY"
}
}
}
}If env vars don't propagate through your MCP launcher, pass the key as an argument instead:
{
"mcpServers": {
"AgentMail": {
"command": "/path/to/your/.venv/bin/agentmail-mcp",
"args": ["--api-key", "YOUR_API_KEY"]
}
}
}Find your path:
# Activate your virtual environment, then:
which agentmail-mcpRun Standalone
# Option A: env var
export AGENTMAIL_API_KEY=your-api-key
agentmail-mcp
# Option B: CLI flag (useful if env vars aren't available)
agentmail-mcp --api-key="your-api-key"---
Available Tools
The Node MCP server (npx agentmail-mcp, Option 1 and Option 2) exposes 17 tools:
| Tool | Description |
|---|---|
create_inbox | Create a new email inbox |
list_inboxes | List all inboxes |
get_inbox | Get inbox details by ID |
delete_inbox | Delete an inbox |
send_message | Send an email from an inbox |
reply_to_message | Reply to an existing message |
forward_message | Forward an existing message |
list_threads | List email threads in an inbox |
get_thread | Get thread details and messages |
get_attachment | Download an attachment |
update_message | Update message labels |
create_draft | Create a draft message |
list_drafts | List drafts in an inbox |
get_draft | Get a draft by ID |
update_draft | Update a draft |
send_draft | Send a previously-created draft |
delete_draft | Delete a draft without sending |
The legacy Python MCP server (pip install agentmail-mcp, Option 3) is a separate codebase with a smaller tool set — it omits the six *_draft tools above. For new projects, prefer the Node server (Option 1 or Option 2) for full parity with the toolkit.
---
Client Configuration
Cursor, VS Code, Windsurf
Add the same MCP server entry in your client config file:
Cursor: .cursor/mcp.json VS Code: .vscode/mcp.json Windsurf: MCP config file
{
"mcpServers": {
"AgentMail": {
"command": "npx",
"args": ["-y", "agentmail-mcp"],
"env": {
"AGENTMAIL_API_KEY": "YOUR_API_KEY"
}
}
}
}---
Compatible Clients
The AgentMail MCP server works with any MCP-compatible client:
- Claude Desktop
- Cursor
- VS Code
- Windsurf
- Cline
- Goose
- Raycast
- ChatGPT
- Amazon Q
- Codex
- Gemini CLI
- LibreChat
- Roo Code
- And more...
---
Example Usage
Once configured, you can ask your AI assistant:
- "Create a new inbox for support emails"
- "Send an email to john@example.com with subject 'Hello'"
- "Check my inbox for new messages"
- "Reply to the latest email thanking them"
- "List all my email threads"
- "Download the attachment from the last message"
---
Troubleshooting
"Command not found"
Ensure npm/npx is in your PATH, or use the full path:
"command": "/usr/local/bin/npx""Invalid API key"
Verify your API key is correct and has the necessary permissions.
Python package not found
Use the full path to the agentmail-mcp executable in your virtual environment:
# Find the path
source /path/to/venv/bin/activate
which agentmail-mcpRelated skills
How it compares
Pick agentmail-mcp for MCP-native agent inbox access rather than writing raw IMAP/SMTP client code in each project.
FAQ
What URL does agentmail-mcp use for remote MCP setup?
agentmail-mcp connects clients to the hosted MCP server at https://mcp.agentmail.to with OAuth 2.0 via Smithery, avoiding local server installation for Claude Desktop, Cursor, and Windsurf.
Where do developers get an AgentMail API key for agentmail-mcp?
agentmail-mcp prerequisites include an API key from console.agentmail.to before configuring the MCP client for inbox, send, receive, and thread tools.