AgentBox
⚡ AgentBox
面向 AI 代理的自主邮箱与身份层
AgentBox 为自主 AI 编程代理(Claude Code、Cursor、Antigravity、OpenAI Swarm)提供持久化的机器原生邮箱身份、对象级授权和自主通信基础设施。接收电子邮件、以 <0.14ms 的速度捕获 2FA 验证码、在防钓鱼保护下验证激活魔法链接,并以零第三方云锁定发送出站回复。
快速开始 • 代理身份与安全 • 性能基准 • MCP 工具 • 链接安全 • 架构
💡 为什么选择 AgentBox?
当自主 AI 代理构建软件、在开发平台注册账号或运行自动化 QA 流水线时,它们总会卡在 邮箱验证、2FA 和身份门槛 上。
传统方法的痛点 | AgentBox 的自主解决方案 |
❌ 付费的 SaaS 邮件 API 按封计费并且需要信用卡 | ✅ 100% 自由且自托管,数据保存在本地 SQLite( |
❌ 邮件服务要求公网 URL / 隧道(Ngrok) | ✅ 内置 IMAP TLS 轮询器与原始入站 SMTP 服务器(Hostinger、Titan、Google、Stalwart) |
❌ 轮询 REST API 需要 5–30 秒,且受速率限制瓶颈 | ✅ 事件驱动异步唤醒(<0.001ms),基于 Tokio broadcast 通道 |
❌ 未认证工具导致跨 Agent 数据泄露 | ✅ 强制作用域能力与对象级资源所有权 |
❌ Agent 缺乏安全能力,容易被钓鱼 / 开放重定向链接欺骗 | ✅ 深度链接安全引擎(Punycode、原始 IP 与开放重定向防御) |
❌ 手动 MCP 配置需要在 IDE 配置中编辑复杂的 JSON | ✅ |
Related MCP server: Mailgent MCP Server
🧑🚀 一流的代理身份与对象级安全
AgentBox 超越了普通邮箱,通过引入 一流的 Agent 身份(First-Class Agent Identities) 和严格的对象级资源所有权:
# Provision a scoped identity for an autonomous browser QA agent
npx agentbox-mail agent create browser-qa --capabilities "inbox.read,otp.read,links.read"╔══════════════════════════════════════════════════════════════════╗
║ 🧑🚀 AGENT IDENTITY PROVISIONED ║
╠══════════════════════════════════════════════════════════════════╣
║ Agent ID : agent_browser-qa_7f92a1 ║
║ Name : browser-qa ║
║ Email : browser-qa-7f92a1@apocalypto.in ║
║ Auth Token : agb_92d7e8f1c3a04b12 ║
║ Capabilities : ["inbox.read", "otp.read", "links.read"] ║
║ Status : active ║
╚══════════════════════════════════════════════════════════════════╝
⚠️ NOTE: Store this auth_token securely. It is only displayed once upon creation and cannot be retrieved again.🔐 多层安全执行:
Incoming Tool / API Request
│
▼
┌───────────────────────────┐
│ 1. Validate Auth Token │ ➔ Reject if invalid or revoked
└─────────────┬─────────────┘
│
▼
┌───────────────────────────┐
│ 2. Check Capability Scope │ ➔ E.g. Require "otp.read"
└─────────────┬─────────────┘
│
▼
┌───────────────────────────┐
│ 3. Object-Level Ownership │ ➔ Agent A CANNOT read Agent B's mailbox
└─────────────┬─────────────┘
│
▼
┌───────────────────────────┐
│ 4. Execute Protected Tool │
└───────────────────────────┘凭据卫生:令牌仅在创建时 显示一次。读取端点(
get_agent_identity、list_agent_identities)使用安全的公共结构,绝不会泄露认证机密。跨代理隔离:拥有
otp.read的代理被严格限制只能访问其拥有的邮箱(owner_agent_id)。尝试跨邮箱访问将返回结构化的AccessDenied错误。
📊 可复现的性能基准测试
AgentBox 包含一套完整的基准测试套件(tests/benchmark.rs),衡量从原始字节到完整 JSON-RPC 输出的整个流水线:
cargo test --release --test benchmark -- --nocapture⚡ 已验证的完整端到端 MCP 流水线(1,000 个周期):
已测流水线:Raw MIME Ingestion ➔ mail-parser ➔ SafeLink Analysis ➔ Regex OTP ➔ SQLite INSERT ➔ Broadcast Dispatch ➔ Authenticated MCP Tool Call (tools/call) ➔ JSON-RPC Result Output
流水线指标 | 测量延迟 | 吞吐量 |
平均值(均值) |
| 每秒 1,468 个完整 MCP 周期 |
p50 中位数 |
| — |
p95 |
| — |
p99 |
| — |
⚡ 子组件微秒级延迟(10,000 次迭代):
事件总线通道分发:
0.216 µs(0.0002 ms)— 每秒 462 万事件链接安全与反重定向:
0.652 µs(0.0007 ms)— 每秒 153 万次检测OTP 正则提取:
138.2 µs(0.138 ms)— 每秒 7,230 次提取
注:外部邮件到达延迟受到上游邮件投递延迟影响;字节一旦进入 AgentX(SMTP/IMAP/HTTP),端到端解析、DB 持久化、能力授权和 JSON-RPC 响应将在 <0.7ms 内完成。
🛡️ 链接安全与防钓鱼引擎
为了保护自主代理免受凭据被窃取和恶意开放重定向的影响,AgentBox 会解析所有入站链接,并通过深度安全分析器:
🚫 开放重定向检测:检查参数,如
?redirect=、?url=、?next=、?dest=、?to=等。🚫 原始 IP 地址防御:阻止指向原始 IP 地址(而非可信主机名)的 URL。
🚫 Punycode 同形字防御:标记 Unicode/Punycode 域名伪装(
xn--)。🔒 协议校验:区分安全 HTTPS 端点与不安全的 HTTP。
{
"url": "https://signin.aws.amazon.com/verify?token=abc_123",
"domain": "signin.aws.amazon.com",
"is_safe": true,
"has_open_redirect": false,
"confidence": 0.98
}[I have no clue what GXP5 is. I'll keep it.]
🛠️ MCP 工具参考
AgentBox 基于 stdio 实现了 Model Context Protocol (MCP) 协议规范:
类别 | 工具 | 参数 | 描述 |
身份管理 |
|
| 创建持久化身份,并返回一次性认证令牌。 |
身份管理 |
|
| 获取公开的 Agent 能力、状态和元数据(令牌已脱敏)。 |
身份管理 |
| — | 列出所有已注册的公共 Agent 身份。 |
身份管理 |
|
| 撤销 Agent 身份,并立即将其认证令牌失效。 |
邮箱 |
|
| 创建一个调用方 Agent 身份关联的新虚拟邮箱。 |
邮箱 |
|
| 提取最新的 4–8 位验证码,并带有所有权校验。 |
邮箱 |
|
| 事件驱动 Hook:通过 Tokio 异步 |
邮箱 |
|
| 返回经过解析的激活链接,并附带链接安全与反重定向分析。 |
邮箱 |
|
| 获取最近消息、完整正文文本、HTML 和发件人元数据。 |
邮箱 |
|
| 通过带能力检查的 SMTP 中继发送出站邮件。 |
邮箱 |
|
| 删除临时邮箱并清除存储的消息。 |
🚀 快速开始
1. Headless NPM CLI(零配置)
在 1 秒内为你的 AI 工具完成自动配置:
# 1-Click Auto-Install MCP Server & AI Skill into Claude Code, Cursor, Antigravity
npx agentbox-mail init
# Start MCP stdio server
npx agentbox-mail mcp
# Create an Agent Identity with scoped capabilities
npx agentbox-mail agent create coder --capabilities "inbox.read,otp.read,links.read"
# Retrieve latest OTP code
npx agentbox-mail otp agent@yourdomain.com
# Launch Web Dashboard
npx agentbox-mail ui2. 原生 Electron 桌面端
一体化独立桌面体验,带系统托盘与系统通知:
# Clone the repository
git clone https://github.com/RABNEER/AgentBox.git
cd AgentBox
# Install dependencies and start Desktop App
npm install
npm run app3. 高性能 Rust 核心守护进程
# Build the optimized production binary
cargo build --release
# Start all-in-one daemon (HTTP Port 3000 + SMTP Port 2525)
./target/release/agentbox-mail server --port 3000🏗️ 架构
┌───────────────────────────┐
│ Incoming Mail Sources │
└─────────────┬─────────────┘
│
┌──────────────────────────────┼──────────────────────────────┐
│ │ │
▼ ▼ ▼
┌───────────────────────┐ ┌───────────────────────┐ ┌───────────────────────┐
│ Hostinger / Titan / │ │ Raw SMTP Listener │ │ Inbound HTTP Webhook │
│ Google IMAP TLS (993) │ │ (0.0.0.0:2525) │ │ (POST /v1/inbound) │
└───────────┬───────────┘ └───────────┬───────────┘ └───────────┬───────────┘
│ │ │
└──────────────────────────────┼──────────────────────────────┘
│
▼
┌─────────────────────────────┐
│ High-Speed Regex Parser │
│ • 4–8 Digit OTP Isolator │
│ • Link Safety Engine │
└──────────────┬──────────────┘
│
▼
┌─────────────────────────────┐
│ Embedded SQLite Storage │
│ (`agentbox.db`) │
│ • Accounts • Identities │
│ • Messages • Capabilities │
│ • Resource Ownership Graph │
└──────────────┬──────────────┘
│
┌──────────────────────────────┼──────────────────────────────┐
│ │ │
▼ ▼ ▼
┌───────────────────────┐ ┌───────────────────────┐ ┌───────────────────────┐
│ Realtime SSE Bus │ │ MCP Server (stdio) │ │ Native Desktop App / │
│ (`GET /v1/events`) │ │ Scoped Capabilities │ │ Web Dashboard (:3000) │
│ │ │ Object-Level Auth │ │ │
└───────────────────────┘ └───────────────────────┘ └───────────────────────┘📄 许可证
以 MIT License 分发。更多信息请参阅 LICENSE。
由 RABNEER 与 AgentBox 开源社区用 🖤 构建
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityCmaintenanceDisposable email MCP server for autonomous AI agents. Create labeled temporary inboxes, wait for verification emails, extract OTP codes and confirmation links — zero human intervention required.6MIT
- Alicense-qualityFmaintenanceProvides identity infrastructure for AI agents to manage email communications, including sending, replying, and organizing messages. It also includes a secure vault for managing credentials and generating TOTP codes.22MIT
- Alicense-qualityBmaintenanceAn MCP server that provides AI agents with a persistent, agent-native email mailbox for sending, receiving, and managing emails through bounded-context retrieval, idempotent operations, and explicit acknowledgement.MIT
- AlicenseAqualityAmaintenanceProvides disposable email inboxes for AI agents to automatically receive and extract OTPs and magic links, enabling seamless email verification during autonomous workflows.396MIT
Related MCP Connectors
Hosted email MCP for AI agents with inboxes, send/receive, memory, recovery, and credits.
Authenticated email gateway for AI agents — per-agent inboxes, HITL approval, SPF/DKIM verified.
Authenticated email gateway for AI agents — per-agent inboxes, HITL approval, SPF/DKIM verified.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/RABNEER/AgentBox'
If you have feedback or need assistance with the MCP directory API, please join our Discord server