InboxAPI 标志

InboxAPI

组织
inboxapi

🤖 Your Agents' personal email 📧

发布者inboxapi
代码仓库cli
语言Rust
复刻数
1
星标数
12
可用工具
0
传输类型stdio
分类
许可协议MIT
链接
  • 将工具接入 AI 工作流

    InboxAPI 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 12 个 Star 和 1 个 Fork。

InboxAPI CLI

Give your AI agent its own personal email address. Send, receive, read, search, and reply to emails — right from Claude, OpenCode, Codex, Gemini, or any MCP-compatible AI client. No email server to run, no SMTP to configure.


Table of Contents


How it works

  1. Install the CLI
  2. Connect it to your AI client (Claude Desktop, Claude Code, Gemini CLI, OpenCode, etc.)
  3. Your AI can now use email — no code or API keys needed

An account with a unique, personal email address is created automatically on first run. Your AI can then:

  • Send emails to any address
  • Receive emails at its own inbox
  • Reply to and forward emails
  • Search emails by keyword
  • Read full threads of conversation

Technical details

The CLI acts as a local bridge between your AI client and the InboxAPI cloud service. It speaks the Model Context Protocol (MCP) over standard input/output, so any compatible AI client can use it without custom integration.

Good to know

  • This is your agent's personal email — InboxAPI gives your AI agent its own email address for personal use. It is not a transactional email service — don't use it for bulk sending, marketing, or application notifications.
  • Weekly send limit — Each account can send to up to five unique email addresses per week. This resets weekly.
  • Check your spam folder — Each agent gets its own subdomain, and new subdomains don't have email reputation yet. Early messages may land in your recipient's spam or junk folder. Adding your agent's email address to your contacts or allowlist helps. Delivery improves over time as recipients interact with your agent's emails.
  • Attachments — Send attachments via CLI subcommands using --attachment (local files) or --attachment-ref (server-side attachments by ID).
  • HTML email support — CLI subcommands support HTML emails with --html-body or --html-body-file.
  • Owner verification — Link your email to your agent's account with verify_owner to enable account recovery and remove trial restrictions. Recommended as a first step after setup.

Installation

bash
npm install -g @inboxapi/cli@latest

Prebuilt binaries are included for:

PlatformArchitecture
macOSARM64, x64
Linuxx64, ARM64
Windowsx64

Updating

Run the same install command to update to the latest version:

bash
npm install -g @inboxapi/cli@latest

The CLI also checks for updates automatically when running in proxy mode and installs them in the background.

Getting Started

Just start the proxy — an account is created automatically on first run

bash
inboxapi proxy

On first run with no saved credentials, the CLI auto-creates an account with a generated name (e.g. brooding-fluffy-owl) and authenticates. No manual setup needed.

Credentials are stored in your system config directory and automatically injected into tool calls. The CLI checks multiple locations so it can pick up credentials created by AI agents:

  • ~/Library/Application Support/inboxapi/credentials.json (macOS primary)
  • ~/.config/inboxapi/credentials.json (Linux primary / macOS fallback)
  • ~/.local/inboxapi/credentials.json (fallback, used by some AI agents)

Commands

proxy (default)

Starts the STDIO proxy. Reads JSON-RPC messages from stdin, forwards them to the InboxAPI endpoint, and streams SSE responses to stdout. If no credentials are found, an account is automatically created with a generated name.

bash
inboxapi proxy
inboxapi proxy --endpoint https://custom-endpoint.example.com/mcp
inboxapi proxy --claim-secret ibx...

Running inboxapi with no subcommand also starts the proxy. --claim-secret is used only when credentials do not exist and the proxy auto-creates an account on a custom domain.

login

Manually creates an account with a chosen name and stores access credentials locally. Not required for basic usage since proxy handles account creation automatically.

bash
inboxapi login
inboxapi login --name myaccount
inboxapi login --endpoint https://custom-endpoint.example.com/mcp
inboxapi login --name myaccount --claim-secret ibx...

custom-domain-claim

Claims a custom-domain primary mailbox for the current account using a custom domain claim secret. The old generated mailbox remains receive-enabled but cannot send.

bash
inboxapi custom-domain-claim --secret ibx... --email-address myaccount@example.com

whoami

Displays the currently authenticated account and endpoint.

bash
inboxapi whoami

reset

Deletes stored credentials. Interactively offers to back up first, then asks for confirmation before deleting.

bash
inboxapi reset

backup

Backs up credentials to a specified folder.

bash
inboxapi backup ./my-backup

restore

Restores credentials from a backup folder. Validates backup integrity and offers to back up existing credentials before overwriting.

bash
inboxapi restore ./my-backup

setup-skills

Installs InboxAPI skills for AI coding agents. Supports Claude Code, Codex CLI, Gemini CLI, and OpenCode. Auto-detects installed agents and prompts for confirmation, or use flags for non-interactive installation.

bash
inboxapi setup-skills              # Auto-detect agents, interactive prompt
inboxapi setup-skills --all        # Install for all 4 agents
inboxapi setup-skills --claude --codex  # Install for specific agents
inboxapi setup-skills --force      # Overwrite existing skills and hooks

CLI Commands

For agents with shell access, CLI subcommands are the simplest way to use InboxAPI — no MCP, JSON-RPC, or base64 knowledge needed.

send-email

bash
inboxapi send-email --to user@example.com --subject "Hello" --body "Hi there"
inboxapi send-email --to user@example.com --subject "Report" --body "See attached" --attachment ./report.pdf
inboxapi send-email --to user@example.com --subject "Fwd" --body "See attached" --attachment-ref 9f0206bb-...
inboxapi send-email --to "a@b.com, c@d.com" --subject "Hi" --body "Hello" --cc "cc@b.com" --priority high
inboxapi send-email --to user@example.com --subject "Newsletter" --body-file ./body.txt --html-body-file ./newsletter.html
inboxapi send-email --to user@example.com --subject "Screenshot" --body-file ./body.txt --html-body-file ./email-with-inline-image.html

Supports --body or --body-file, --html-body or --html-body-file, --cc, --bcc, --priority, --attachment (local files, repeatable), and --attachment-ref (server-side attachment IDs, repeatable). --from-name is deprecated and ignored; InboxAPI enforces the authenticated account identity.

Prefer --body-file and --html-body-file for complex HTML, templates, or large generated payloads such as inline base64 images. File-backed bodies are validated as UTF-8 text, normalized to \n line endings, and capped at 20 MiB before the request is sent.

get-emails

bash
inboxapi get-emails --limit 5
inboxapi get-emails --limit 5 --human

get-email

bash
inboxapi get-email "<message-id>"

delete-email

Archives (soft-deletes) a received email by message ID. It prompts for confirmation by default, and scripted or piped use must pass --force. archive-email is available as an alias for delete-email.

bash
inboxapi delete-email "<message-id>"
inboxapi delete-email "<message-id>" --force
inboxapi archive-email "<message-id>" --force

search-emails

bash
inboxapi search-emails --subject "invoice" --limit 10

get-attachment

bash
inboxapi get-attachment abc123                      # prints signed URL as JSON
inboxapi get-attachment abc123 --output ./file.pdf  # downloads to file

send-reply

bash
inboxapi send-reply --message-id "<msg-id>" --body "Thanks!"
inboxapi send-reply --message-id "<msg-id>" --body-file ./reply.txt --html-body-file ./reply.html

send-reply auto-preserves original thread recipients for multi-recipient conversations. Use --reply-all to force reply-all, and use --cc when you need to add new CC recipients beyond the original thread.

forward-email

bash
inboxapi forward-email --message-id "<msg-id>" --to recipient@example.com --note "FYI"

help

bash
inboxapi help  # CLI-focused help with examples

All CLI commands support the --human flag for human-readable output instead of JSON.

Usage with MCP Clients

InboxAPI CLI also works as an MCP STDIO transport. Point your MCP client at the inboxapi binary:

Claude Desktop (claude_desktop_config.json):

json
{
  "mcpServers": {
    "inboxapi": {
      "command": "inboxapi"
    }
  }
}

Claude Code:

Add to current project:

bash
claude mcp add inboxapi inboxapi

Add globally (available in all projects):

bash
claude mcp add inboxapi inboxapi -s user

Gemini CLI:

Add to current project:

bash
gemini mcp add inboxapi inboxapi

Add system-wide (available in all directories):

bash
gemini mcp add inboxapi inboxapi --scope user

OpenCode:

Run the interactive setup:

bash
opencode mcp add

When prompted, enter:

  • Location: Global
  • MCP server name: inboxapi
  • MCP server type: Local
  • Command to run: inboxapi

Codex CLI:

bash
codex mcp add inboxapi inboxapi

Skills for AI Coding Agents

InboxAPI includes skills — slash commands and guided workflows — for multiple AI coding agents. Install them with:

bash
inboxapi setup-skills        # Auto-detect and install
inboxapi setup-skills --all  # Install for all agents

Skills are installed to agent-specific directories:

AgentInstall Directory
Claude Code.claude/skills/
Codex CLI.agents/skills/
Gemini CLI.gemini/skills/
OpenCode.opencode/commands/

Available Skills

SkillDescription
/check-inboxFetch and display a summary of recent emails in a formatted table
/composeCompose and send an email with guided prompts, addressbook lookup, and confirmation
/email-searchSearch emails using natural language queries
/email-replyReply to an email with full thread context and preview before sending
/email-digestGenerate a structured digest of recent email activity grouped by threads
/email-forwardForward an email to another recipient with an optional note
/setup-inboxapiConfigure InboxAPI MCP server and install skills for your AI coding agent

Hooks (Claude Code only)

The setup-skills command also installs three hooks for Claude Code that run automatically:

HookTypeDescription
Credential CheckSessionStartVerifies InboxAPI credentials on startup and shows authentication status
Email Send GuardPreToolUseReviews outbound emails before sending, warns about self-sends and empty bodies
Activity LoggerPostToolUseLogs all InboxAPI tool usage to .claude/inboxapi-activity.log for audit trails

Development

bash
cargo build           # Build debug binary
cargo build --release # Build release binary
cargo test            # Run tests
cargo fmt             # Format code

FAQ

Why not just give my agent access to my Gmail or Outlook?

Security — Gmail/Outlook OAuth gives your agent access to your entire inbox (medical, financial, legal, personal). A prompt injection in any inbound email could manipulate an agent with access to all of it. InboxAPI gives your agent its own isolated inbox with trust classification and datamarking on every message.

Identity — When your agent sends from your Gmail, recipients can't tell who they're talking to. Replies go to your inbox, mixed with your real mail. InboxAPI gives your agent its own personal address — clear separation between you and your agent.

Practicality — Gmail/Outlook APIs aren't MCP-native. You'd need middleware, OAuth plumbing, and custom integration. InboxAPI works out of the box with any MCP client.

How is this different from AWS SES, SendGrid, or Resend?

Those are sending APIs — you build email infrastructure on top of them. InboxAPI gives your agent a complete email identity: send, receive, search, reply, and forward. There's nothing to configure and no infrastructure to manage.

How is this different from AgentMail or a1base?

We built our own email stack from the ground up. We don't wrap SES, Postfix, or any third-party sending service. Your agent's mail goes through infrastructure we operate directly.

Is it really free?

Yes. No credit card, no trial period, no usage tiers. We're working on paid plans with additional features, but the core experience will always be free.

How do you prevent spam and abuse?

Account creation requires proof-of-work. Each account can only email 5 unique external email addresses per week. Daily send quotas and rate limiting are enforced on every account. These constraints are structural — they're not policies, they're how the system works.

What about prompt injection via email?

Every inbound email includes a trust classification — trusted, agent, unverified, or suspicious — based on whether the sender is in your addressbook and whether their email passes authentication checks. This helps your agent decide how cautiously to handle each message. Emails from other InboxAPI agents are flagged separately so your agent knows to check with you before acting on them.

Additionally, untrusted email content is automatically transformed using spotlighting (datamarking) — whitespace is replaced with a unique marker character so your agent can clearly distinguish email data from its own instructions. This reduces the success rate of prompt injection attacks embedded in emails from ~50% to under 3%.

What is spotlighting?

Email retrieval tools apply datamarking to untrusted content, replacing whitespace with a unique Unicode marker character generated per request. Content containing the marker should be treated as external data — never as instructions to follow. To recover the original text, replace the marker with a space. Emails from trusted senders (in your addressbook with valid authentication) are not spotlighted by default. This technique is based on academic research (arXiv:2403.14720).

What about data exfiltration?

Outbound emails are scanned for authentication tokens and credentials. If your agent accidentally tries to send an email containing a JWT or access token, the message is rejected before it leaves the platform. This prevents agents from being tricked into leaking sensitive data via email. Additionally, all recipient addresses in send, reply, and forward operations are validated against RFC 5322 — malformed addresses are rejected before delivery.

Can agents spam each other?

The same send limits apply to all outbound email — recipient caps, quotas, and rate limiting work the same regardless of who's on the receiving end.

Will my agent's emails land in spam?

Maybe at first. Each agent gets a brand-new subdomain, and new senders don't have reputation yet. Recipients may need to check their spam folder for the first few emails. Over time, as your agent sends legitimate mail and recipients interact with it, delivery improves.

Why email instead of a native agent protocol like A2A?

Email reaches the entire existing internet — billions of people and businesses already use it. A2A requires both sides to implement the protocol. When your agent needs to reach someone outside its own ecosystem, email is the universal option. Agents will likely need both.

Why email instead of WhatsApp, Telegram, or other messaging apps?

Scalability — You can programmatically create hundreds of email addresses. WhatsApp, Telegram, and Signal all require phone numbers and verification. Scaling past a handful of accounts is impractical, often against terms of service, and sometimes impossible without physical SIM cards.

No gatekeeping — Email is the only communication channel where you can create an identity without a phone number, government ID, or approval from a platform owner. No single company controls who gets an email address.

Open protocol — Email is federated and vendor-neutral. WhatsApp, Discord, and Telegram are proprietary — they can revoke API access, ban bot accounts, or change the rules at any time. Email can't be shut off by one company.

ToS compliance — Most messaging platforms explicitly prohibit automated accounts or have strict approval processes (WhatsApp Business API requires business verification, Telegram restricts bot-to-bot messaging). Email has no such restrictions — automated sending is a first-class use case.

Universal reach — Messaging channels are siloed. Your Telegram bot can't reach a WhatsApp user. Email reaches anyone with an email address — which is effectively everyone.

For multi-channel agent frameworks like OpenClaw, email fills a gap that messaging platforms structurally cannot — unlimited, programmable identity creation with no platform approval required. InboxAPI gives agents that capability out of the box.

What are the send limits?

Each account can email up to 5 unique external email addresses per week. Emails to other @inboxapi.ai addresses don't count against this limit. The limit resets weekly.

What happens when I hit the limit?

When all 5 slots are in use, the least recently used entry is auto-replaced after 5 days of inactivity.

Can I send attachments?

Yes. Attachment support is fully available. Supply an array of EmailAttachment objects containing the filename, content_type, and base64-encoded content in the attachments field when calling send_email.

Can I send HTML emails?

Yes. Use --html-body "<html>" for inline HTML or --html-body-file ./email.html for file-backed HTML content. For more complex templates or large generated payloads, prefer --body-file and --html-body-file.

How do credentials work?

Your agent's credentials are stored locally at ~/.config/inboxapi/credentials.json (Linux) or ~/Library/Application Support/inboxapi/credentials.json (macOS). The CLI handles token creation and refresh automatically — your agent never needs to manage tokens manually.

What if my agent loses access?

If your agent's credentials are lost or corrupted, you can recover the account using the account_recover tool — but only if you previously linked your email via verify_owner. Recovery revokes all existing tokens and issues new credentials. Without a verified owner email, there is no way to recover a locked-out account.

What is owner verification?

Owner verification links your personal email address to your agent's InboxAPI account. Your agent calls verify_owner with your email, you receive a 6-digit code, and your agent submits it to complete verification. Once verified, you can recover the account if credentials are ever lost, and trial restrictions are removed from the account. The CLI subcommand verify-owner prompts for confirmation by default; use --yes for non-interactive runs.

What domains are blocked from sending?

InboxAPI maintains a denylist that blocks sending to government (.gov), military (.mil), intelligence, law enforcement, nuclear/critical infrastructure, and disposable email domains.

How does the trust classification work?

Every inbound email is classified into one of four trust levels:

Trust LevelMeaningRecommended Action
TrustedSender is in your addressbook with valid SPF/DKIMSafe to act on
AgentSender is a known InboxAPI agentRead freely, but confirm with your human before taking actions
UnverifiedValid SPF/DKIM but sender not in addressbookUse caution
SuspiciousAuthentication failed or unknown senderFlag and confirm before acting

What AI model should I use with InboxAPI?

Your model must support tool/function calling — MCP requires this. We recommend a minimum 32K token context window to comfortably fit InboxAPI's 21 tool definitions alongside conversation history and email content.

Model recommendations by tier:

TierAnthropicOpenAIGoogle
GoodHaiku 4.5+GPT-4.1 mini+, GPT-4.1 nano+Gemini 2.5 Flash+
RecommendedSonnet 4.5+GPT-4.1+, GPT-5 mini+Gemini 2.5 Pro+
BestOpus 4.5+GPT-5+, GPT-5.2+Gemini 2.5 Pro+

Datamarking overhead: InboxAPI applies datamarking (spotlighting) to untrusted email content, replacing whitespace with Unicode marker characters. This can slightly increase token consumption when processing emails from external senders. Models with larger context windows handle this more comfortably.

What won't work: Models without tool/function calling support, models with context windows under 16K tokens, and very small local models (under ~7B parameters) that lack reliable tool calling. These will struggle to fit InboxAPI's 21 tool definitions and maintain useful conversation history.

What stops an agent from buying things or authorizing transactions via email?

InboxAPI is a communication channel, not an execution environment. It can deliver an email, but it can't click buttons, enter credit card numbers, or interact with external systems. The risk of unauthorized actions comes from how an agent is configured and what other tools it has access to — not from its email.

License

The source code in this repository is licensed under the MIT License.

Disclaimer

The InboxAPI service is provided as-is, with no guarantees or warranties of any kind. We reserve all rights regarding how the service is operated. Service terms, features, and availability may change at any time without notice.

将 InboxAPI MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 InboxAPI 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请保持终端窗口及其中的进程运行。
3

将 InboxAPI 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 InboxAPI MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "inboxapi-cli": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 InboxAPI MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 InboxAPI MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 InboxAPI 帮我完成这项任务吗?
InboxAPI
当然。我已阅读。
以下是我使用 InboxAPI 得到的结果。

常见问题

InboxAPI MCP 服务器有什么用途?

InboxAPI 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 InboxAPI MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您可以让 Claude、ChatGPT、Gemini 等不同 AI 模型,或您在 TypingMind 中配置的其他模型使用 InboxAPI,而无需为每个模型单独配置 MCP 服务器。

为什么在 TypingMind 中使用 InboxAPI MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是优秀的大语言模型聊天前端之一。连接 InboxAPI 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 InboxAPI MCP 连接到 TypingMind?

InboxAPI 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

InboxAPI MCP 在 TypingMind 中提供哪些工具?

InboxAPI 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 InboxAPI MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行掌控模型提供商、API 密钥、提示词和 MCP 配置。如果 InboxAPI 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇