# Mails.ai — 代理电子邮件 MCP 服务器 (`mailsai-mcp-server`)

> 人工智能代理的真正收件箱：在提示注入防火墙后面发送、接收和线程化电子邮件。

- **Canonical URL:** https://syndipath.com/zh/mcp/mailsai-mcp-server
- **Runtime:** `npm` | **Transport:** STDIO | **License:** MIT | **Package:** `@mailsai/mcp-server`
- **Upvotes:** 330 | **GitHub Stars:** 2393 | **Weekly Installs:** 23930
- **Security Note:** HTTP-200 在 NPM 注册中心（@mailsai/mcp-server）上验证；在工作区范围的 STDIO 子进程中使用 npx 执行。

## Quick CLI Setup
```bash
# Run directly via Node npx
npx -y @mailsai/mcp-server

# Add to Claude Code CLI
claude mcp add -e MAILS_API_KEY=${MAILS_API_KEY} mailsai-mcp-server -- npx -y @mailsai/mcp-server
```

## MCP Manifest (`mcp.json`)
```json
{
  "mcpServers": {
    "mailsai-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@mailsai/mcp-server"
      ],
      "env": {
        "MAILS_API_KEY": "${MAILS_API_KEY}"
      }
    }
  }
}
```

## Exposed MCP Tools
- `mailsai_mcp_server_execute(query: string, options?: object)`: A real inbox for AI agents: send, receive and thread email, behind a prompt-injection firewall.
- `mailsai_mcp_server_list_items(filter?: string, limit?: number)`: Lists structured workspace artifacts and capability metadata over JSON-RPC 2.0.
