agentmail-mcp
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAgentMail MCP Server
AgentMail MCP Server
Connect AgentMail to any MCP-compatible AI client. Three setup options available.
将AgentMail连接到任何兼容MCP的AI客户端。提供三种设置选项。
Prerequisites
前提条件
Get your API key from console.agentmail.to.
从console.agentmail.to获取您的API密钥。
Option 1: Remote MCP (Simplest)
选项1:远程MCP(最简单)
No installation required. Connect directly to the hosted MCP server.
URL:
https://mcp.agentmail.toAdd to your MCP client configuration:
json
{
"mcpServers": {
"AgentMail": {
"url": "https://mcp.agentmail.to",
"env": {
"AGENTMAIL_API_KEY": "YOUR_API_KEY"
}
}
}
}无需安装。直接连接到托管的MCP服务器。
URL:
https://mcp.agentmail.to将以下内容添加到您的MCP客户端配置中:
json
{
"mcpServers": {
"AgentMail": {
"url": "https://mcp.agentmail.to",
"env": {
"AGENTMAIL_API_KEY": "YOUR_API_KEY"
}
}
}
}Option 2: Local npm Package
选项2:本地npm包
Run the MCP server locally via npx.
json
{
"mcpServers": {
"AgentMail": {
"command": "npx",
"args": ["-y", "agentmail-mcp"],
"env": {
"AGENTMAIL_API_KEY": "YOUR_API_KEY"
}
}
}
}通过npx在本地运行MCP服务器。
json
{
"mcpServers": {
"AgentMail": {
"command": "npx",
"args": ["-y", "agentmail-mcp"],
"env": {
"AGENTMAIL_API_KEY": "YOUR_API_KEY"
}
}
}
}Tool Selection
工具选择
Load only specific tools with the argument:
--toolsjson
{
"mcpServers": {
"AgentMail": {
"command": "npx",
"args": [
"-y",
"agentmail-mcp",
"--tools",
"send_message,reply_to_message,list_inboxes"
],
"env": {
"AGENTMAIL_API_KEY": "YOUR_API_KEY"
}
}
}
}通过参数仅加载特定工具:
--toolsjson
{
"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
选项3:本地Python包
Install and run the Python MCP server.
bash
pip install agentmail-mcp安装并运行Python MCP服务器。
bash
pip install agentmail-mcpClaude Desktop
Claude Desktop
Config location:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json
json
{
"mcpServers": {
"AgentMail": {
"command": "/path/to/your/.venv/bin/agentmail-mcp",
"env": {
"AGENTMAIL_API_KEY": "YOUR_API_KEY"
}
}
}
}Find your path:
bash
undefined配置文件位置:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json
json
{
"mcpServers": {
"AgentMail": {
"command": "/path/to/your/.venv/bin/agentmail-mcp",
"env": {
"AGENTMAIL_API_KEY": "YOUR_API_KEY"
}
}
}
}查找路径:
bash
undefinedActivate your virtual environment, then:
激活您的虚拟环境,然后执行:
which agentmail-mcp
undefinedwhich agentmail-mcp
undefinedRun Standalone
独立运行
bash
export AGENTMAIL_API_KEY=your-api-key
agentmail-mcpbash
export AGENTMAIL_API_KEY=your-api-key
agentmail-mcpAvailable Tools
可用工具
| Tool | Description |
|---|---|
| Create a new email inbox |
| List all inboxes |
| Get inbox details by ID |
| Delete an inbox |
| Send an email from an inbox |
| Reply to an existing message |
| List email threads in an inbox |
| Get thread details and messages |
| Download an attachment |
| Update message labels |
| 工具名称 | 描述 |
|---|---|
| 创建新的邮件收件箱 |
| 列出所有收件箱 |
| 通过ID获取收件箱详情 |
| 删除收件箱 |
| 从收件箱发送邮件 |
| 回复现有邮件 |
| 列出收件箱中的邮件线程 |
| 获取线程详情及邮件内容 |
| 下载附件 |
| 更新邮件标签 |
Client Configuration
客户端配置
Cursor, VS Code, Windsurf
Cursor、VS Code、Windsurf
Add the same MCP server entry in your client config file:
Cursor:
VS Code:
Windsurf: MCP config file
.cursor/mcp.jsonVS Code:
.vscode/mcp.jsonWindsurf: MCP config file
json
{
"mcpServers": {
"AgentMail": {
"command": "npx",
"args": ["-y", "agentmail-mcp"],
"env": {
"AGENTMAIL_API_KEY": "YOUR_API_KEY"
}
}
}
}在您的客户端配置文件中添加相同的MCP服务器条目:
Cursor:
VS Code:
Windsurf: MCP配置文件
.cursor/mcp.jsonVS Code:
.vscode/mcp.jsonWindsurf: MCP配置文件
json
{
"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...
AgentMail MCP服务器可与任何兼容MCP的客户端配合使用:
- Claude Desktop
- Cursor
- VS Code
- Windsurf
- Cline
- Goose
- Raycast
- ChatGPT
- Amazon Q
- Codex
- Gemini CLI
- LibreChat
- Roo Code
- 以及更多...
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"
配置完成后,您可以向AI助手发出以下指令:
- "创建一个用于支持邮件的新收件箱"
- "发送一封主题为'Hello'的邮件给john@example.com"
- "检查我的收件箱是否有新邮件"
- "回复最新的邮件表示感谢"
- "列出我所有的邮件线程"
- "下载最后一封邮件中的附件"
Troubleshooting
故障排除
"Command not found"
"命令未找到"
Ensure npm/npx is in your PATH, or use the full path:
json
"command": "/usr/local/bin/npx"确保npm/npx已在您的PATH中,或使用完整路径:
json
"command": "/usr/local/bin/npx""Invalid API key"
"无效的API密钥"
Verify your API key is correct and has the necessary permissions.
验证您的API密钥是否正确,且具备必要的权限。
Python package not found
Python包未找到
Use the full path to the agentmail-mcp executable in your virtual environment:
bash
undefined使用虚拟环境中agentmail-mcp可执行文件的完整路径:
bash
undefinedFind the path
查找路径
source /path/to/venv/bin/activate
which agentmail-mcp
undefinedsource /path/to/venv/bin/activate
which agentmail-mcp
undefined