Benethos Mailbox Mcp

io.github.benethos-hub由 GitHub 账号 benethos-hub 发布v0.6.1更新于 Nov 7, 2026

MCP server that gives AI agents your mailboxes through mailbox-service, within its token's rights.

发布方自己的服务:Mailbox MCP

已验证STDIO仅桌面效率与工作流沟通与协作

概览

AI 生成的概览

本地 MCP 服务器,让 AI 助手通过自建的 mailbox-service 读取、整理、起草和发送多个邮箱的邮件,权限受其令牌限制。

可以做什么
  • 读取邮件:文件夹、列表、单账户或全部账户的搜索、会话、文本与 HTML 正文、附件和原始源码
  • 获取变更:自某一时间点起的新邮件,通过变更流或签名 webhook
  • 整理邮件:已读状态、星标、关键字、移动、删除和文件夹
  • 撰写与发送:草稿、回复、全部回复、转发,重试发送不会重复发出
  • 检查服务:server_status 显示服务版本以及是否与自身版本一致
适用场景
适合已经运行 mailbox-service 并接入多个邮箱、希望助手在受限授权下分拣、归档、总结或回复邮件的场景,例如只允许访问发票文件夹或只允许发给指定收件人。
运行要求
需要可访问的 mailbox-service(地址由 MAILBOX_SERVICE_URL 指定),以及在其界面中创建的 API 令牌,通过 MAILBOX_SERVICE_TOKEN 提供;令牌继承该用户的权限。MCP 服务器与服务版本必须一致。通过 uvx 本地运行或作为 Claude Desktop 扩展安装,仅支持桌面端。
安装前请注意
令牌以创建它的用户权限行事,应只授予所需的账户、文件夹、操作和收件人。服务器可以发送、移动和删除邮件。启用 MAILBOX_SERVICE_ALLOW_HTTP 会以明文在网络上传输令牌,除 localhost 或 https 外不要开启。邮件内容会作为外部文本传给模型。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Benethos Mailbox Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[图片] Mailbox

[CI] [Coverage] [License] [Python]

[PyPI benethos-mailbox-service] [Container benethos-mailbox-service]

[PyPI benethos-mailbox-mcp] [Container benethos-mailbox-mcp]

[PyPI benethos-mailbox-client]

[PyPI benethos-mailbox-common]

[Sponsor] [PayPal]

One REST API for all your mailboxes, whichever provider they are at, a Python client for it and an MCP server on top. Scripts, tools and AI agents work with your mail through one door you control.

Status: beta, version 0.6.1. Usable with real accounts. A breaking change of the API or the configuration is announced in the changelog. Stored data is carried forward by migrations.

Contents

What it is for

Most people and small companies have more than one mail account: a personal address at GMX or web.de, a company mailbox at Microsoft 365, an info@ address at some hoster, maybe a Gmail account. Each speaks its own dialect: IMAP here, Microsoft Graph there. Every tool that wants to work with mail has to learn all of them and has to be given the passwords.

Mailbox turns that around. It has four packages. mailbox-service runs on your own machine or server and holds the connections to all accounts. Everything else talks to that service only, through one REST API that looks the same for every provider. mailbox-client is the Python client of that API, for scripts and apps. mailbox-mcp, the MCP server, builds on the client and opens the service to AI agents. mailbox-common holds what the service and the MCP server share. The service decides who may do what. A script, an app or an AI agent gets a token of its own. That token opens exactly the accounts and operations it was given, nothing more.

[AI agents reach mailbox-mcp over MCP, scripts and apps use mailbox-client, and mailbox-mcp builds on mailbox-client. mailbox-client calls the REST API of mailbox-service, people use its configuration UI in the browser, and its signed webhooks report changes to your systems. mailbox-service, on your own server, connects to the mail accounts over IMAP and SMTP, Microsoft Graph, JMAP, POP3 and the Gmail API.]

That makes a few things simple that are hard otherwise.

Working with an AI agent in your mail

Through the MCP server, Claude or another AI agent works with every account you gave it. A few requests it handles today:

  • "What came in since last night?"
  • "Move every invoice from Company XY to the folder Accounting."
  • "Forward today's invoices to our tax advisor."
  • "Show me all mail from Company XY between the 1st and the 15th of September."
  • "Which mails with attachments came this week? Read the invoice and tell me the amount and the due date."
  • "Sum up the mails about the offer and write a draft reply."
  • "Mark last week's newsletters as read and move them to the archive."

Its rights decide whether it may send on its own or only leave drafts for a person to send. A grant can also name the recipients it may write to, such as the tax advisor's address alone, and how many mails it may send a day. A mail to anyone else is refused. It can keep the agent to some folders, such as the invoices, and end after a week.

More uses

  • Controlled access. A bookkeeping tool reads the invoice folder of one account and nothing else. It may neither send nor delete, and it never sees a mail password, only its own token.
  • Automation across accounts. A script files invoices, archives newsletters and forwards order confirmations. It works the same way for GMX, Microsoft 365 and your own mail server.
  • Sending with guard rails. A newsletter job sends from info@, to a fixed list of recipients, at most a few times a day.
  • React instead of polling. Signed webhooks tell your own system about new mail, a ticket tool or an internal dashboard for example.
  • Traceable. Every send is recorded in the audit: by whom, when and under which grant. So is every sign-in and every change to users, tokens, roles, accounts and webhooks.
  • One inbox for your own tools. A dashboard or a small internal app lists, searches and answers mail from every account with one client.
  • Self-hosted. The service stores the credentials encrypted. Mail goes straight from the provider to you, never through a third party's cloud.

What it can do today

  • Accounts: IMAP with SMTP for sending, set up from the address alone (autodiscovery), JMAP servers such as Fastmail and Stalwart, POP3 for mailboxes without IMAP (the inbox only), Microsoft accounts (Outlook.com, Microsoft 365) over Microsoft Graph with OAuth sign-in, and Gmail over the Gmail API. Credentials are encrypted (AES-256-GCM) under a master key kept outside the database.
  • Reading: folders, lists and search, one account or all at once, conversations across folders, messages as text and HTML, attachments, the raw source. Message ids stay the same when a message moves, kept by a background sync. A link to an attachment lets another service fetch the file once, without a token.
  • Writing: read state, stars and keywords, moving, deleting, folders, drafts, and sending with reply, reply to all and forward. A retried send is not sent twice (Idempotency-Key).
  • Changes: a change feed names each message created, changed or deleted since a point you keep, in IMAP, JMAP, POP3, Microsoft and Gmail accounts, flags set in other mail clients included where the IMAP server offers CONDSTORE. Webhooks post the same events, signed, to a URL of your choice, a host in your local network included.
  • Users and rights: users, roles and grants per account and per operation, down to folders, grants that expire, API tokens, limits on sending (allowed recipients, sends per day), an audit of every send and an audit of administration.
  • MCP server: reads, sorts, writes drafts, sends and tells what is new, over stdio or streamable HTTP, offering only the mail tools its token may use, server_status always, and following its rights while it runs. Mail content reaches the model marked as foreign text.
  • Configuration UI in the browser under /ui: accounts, users, rights, tokens, reading and writing mail, the send audit, webhooks, the status of accounts and sync, the audit of administration, the service log.
  • Operation: encrypted backup and restore, container images, compose files for operation with HTTPS through Caddy and MCP server instances.

What comes next, and in which order, is in docs/ROADMAP.md.

Providers

ProviderConnected viaCredentialState
GMX, web.de, T-Online, Yahoo, AOL, iCloud, Posteo, mailbox.org, IONOS, Strato, own mail serversIMAP + SMTPapp passwordavailable
Microsoft 365, Outlook.comMicrosoft GraphOAuth, through the project's app or your own (setup)available
Proton MailIMAP + SMTP through Proton Mail BridgeBridge passwordIMAP, not tested
Gmail / Google WorkspaceGmail API, or IMAP + SMTPOAuth, with your own Google Cloud client (setup), or an app passwordavailable
Fastmail, Stalwart, other JMAP serversJMAPAPI token or passwordavailable
legacy mailboxes without IMAPPOP3 + SMTP: the inbox only, no folders, no read state, no searchpasswordavailable

Not supportable: Tuta, which offers no IMAP and no API. Details per provider in docs/CONCEPT.md, section 5.3.

The four packages

PackageWhat it isRunsRead more
mailbox-servicethe service: REST API, configuration UI, users and rights, accounts, encrypted credentials, provider adapters, background syncpermanentlypackages/mailbox-service
mailbox-clientthe Python client of the REST API, async and syncinside your own codepackages/mailbox-client
mailbox-mcpthe MCP server, on top of mailbox-clientper client over stdio, or as a server over HTTPpackages/mailbox-mcp
mailbox-commonwhat the service and the MCP server shareinstalled with thempackages/mailbox-common

A release publishes all four to PyPI under the same version, as benethos-mailbox-service, benethos-mailbox-client, benethos-mailbox-mcp and benethos-mailbox-common, and the service and the MCP server as container images on ghcr.io. The MCP server is listed in the official MCP Registry as io.github.benethos-hub/benethos-mailbox-mcp, and every release carries it as a Claude Desktop extension, benethos-mailbox-mcp.mcpb. Each package has its own README. It explains how to install, start and configure it, for the service and the MCP server with the container image and the compose file.

The MCP server and the service must have the same version to work together. Update both at once. The MCP server's tool server_status shows the service's version and whether it matches its own.

Getting started

  1. Start the service and create the first user: packages/mailbox-service.
  2. Open http://127.0.0.1:8080/ui, sign in as admin with the one-time password, choose a password of your own and connect your accounts.
  3. Give your scripts or your AI agent a user with the rights they need and a token (step by step), and for an agent, add the MCP server to it. Claude Desktop installs it as an extension from the release, other clients start it with uvx: packages/mailbox-mcp.

Documentation

Development

One uv workspace, one lockfile, four distributions.

uv syncuv run pytest -quv run ruff check . && uv run ruff format --check .uv run mypy

The tests run offline. CI runs these checks too, most of them as the organisation's reusable workflows. It also installs the packages on the lowest versions their pyproject.toml allows and runs the tests there, checks those versions and every version in uv.lock against OSV for known vulnerabilities, and checks the brand assets in assets/brand/. Every one of these checks has to pass before a change reaches main.

CodeQL reads the code and the workflows on every change and once a week, hadolint the Dockerfiles on every change. Both file what they find under Security, Code scanning. A merge does not wait for them.

A separate workflow runs once a day and after each run of the publishing workflow, and passes or stops nothing. It keeps one issue with what the project pins and what is newer: packages, vulnerabilities, images, actions and the JavaScript the UI ships. A second issue opens when the newest versions the ranges in pyproject.toml allow break the tests or tests/installed_check.py, or when a published package no longer installs or starts from PyPI. An install without the lockfile, such as uvx or pip install, gets those versions, so this can change on any day without a release here. That check sees neither a real mailbox nor the MCP server in front of the real service.

Manual checks against real test accounts live in live/ and are described in CLAUDE.md, which also holds the working rules for this repository.

Licence

MIT, see LICENSE.

来源:README.md,提交 bd5ffd9

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

6
  1. v0.6.1最新Nov 7, 2026
  2. v0.6.0Oct 29, 2026
  3. v0.5.2Oct 22, 2026
  4. v0.5.1Oct 19, 2026
  5. v0.5.0Oct 17, 2026
  6. v0.4.1Oct 10, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Mailbox-Mcp 集成