ox-mcp

io.github.Rheopyrin由 GitHub 账号 Rheopyrin 发布v0.1.4更新于 Oct 24, 2026

MCP server for Open-Xchange: email (IMAP/SMTP), Sieve filters, CalDAV calendar, CardDAV contacts

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

概览

AI 生成的概览

面向 Open-Xchange 及标准邮件主机的本地 MCP 服务器,让助手读写邮件、管理 Sieve 过滤器、日历事件与联系人。

可以做什么
  • 跨文件夹读取、搜索和列出邮件,并发送、回复、存草稿、移动、标记、归档和删除邮件
  • 创建、更新和删除文件夹以及服务器端 Sieve 邮件过滤器
  • 列出日历与事件、查询他人空闲/忙碌状态,并创建、更新或删除事件
  • 接受、拒绝或暂定回复会议邀请
  • 在服务器端列出和搜索联系人,并新建联系人
  • 列出已配置的账户,并在每次调用时指定某个账户
适用场景
适合让助手处理 Open-Xchange 邮箱或任何 IMAP/SMTP/CalDAV/CardDAV 账户:筛选和搜索邮件、起草回复、管理过滤器、处理日历邀请与联系人,并可同时管理多个账户。
运行要求
通过 npx(Node.js)或 Docker 在本机运行。需要为各分区配置主机和登录用户,以及邮件、CalDAV、CardDAV 的应用专用密码(OX_MCP_MAIL_APP_PASSWORD、OX_MCP_CALDAV_APP_PASSWORD、OX_MCP_CARDDAV_APP_PASSWORD),或 OAuth2/OIDC 参数。需能访问邮件与 DAV 主机;过滤器需 ManageSieve 4190 端口。配置文件位于 ~/.ox-mcp/config.json 或通过 --config 指定。
安装前请注意
会在配置或环境变量中保存应用专用密码和 OAuth 客户端密钥;配置文件以 0600 权限创建。写入类工具默认关闭,但一旦启用即可发送、删除、移动和归档邮件、改写邀请(并通知组织者)以及创建联系人。使用 imap 传输时,ox-mcp 会激活自己的 Sieve 脚本,使其他脚本的过滤器失效。空闲/忙碌仅显示可用性,不含事件详情。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

ox-mcp

[npm] [npm downloads] [license: MIT] [node]

[ox-mcp MCP server]

An MCP server for Open-Xchange and standards-based mail platforms — read & search email, send & reply, manage server-side filters, calendar events and invitations, contacts, and other people's availability (free/busy), across one or many accounts.

It speaks standard IMAP + SMTP + ManageSieve + CalDAV + CardDAV with RFC 6638 free/busy, so it works with any Open-Xchange deployment or standards-compliant host. Authenticate with your email + app password (the same credential DAVx5 uses) or OAuth2/OIDC.

No affiliation with Open-Xchange.

Install / run

bash
npx -y @rheopyrin/ox-mcp# or with a custom config location:npx -y @rheopyrin/ox-mcp --config /path/to/config.json

MCP client config (Claude Desktop / Claude Code):

jsonc
{  "mcpServers": {    "ox": {      "command": "npx",      "args": ["-y", "@rheopyrin/ox-mcp"],      "env": {        "OX_MCP_MAIL_SERVER": "mail.example.com",        "OX_MCP_MAIL_USER": "[email protected]",        "OX_MCP_MAIL_APP_PASSWORD": "xxxx-xxxx-xxxx-xxxx",        "OX_MCP_CALDAV_SERVER": "dav.example.com",        "OX_MCP_CALDAV_USER": "[email protected]",        "OX_MCP_CALDAV_APP_PASSWORD": "yyyy-yyyy-yyyy-yyyy"      }    }  }}

On first run (without --config) it creates ~/.ox-mcp/config.json (permissions 0600) with every feature flag listed — reads enabled, writes disabled — and empty hosts for you to fill in.

--config

--config <file> (or env OX_MCP_CONFIG; the flag wins) loads an explicit config file instead of ~/.ox-mcp/config.json. The file must exist — nothing is auto-created when the override is used.

Tools

Tools are grouped by protocol domain. A group's tools appear only when enabled, and the group's server host must be configured (see Validation).

GroupRead (enabled by default)Write (disabled by default)
email_* (IMAP/SMTP/Sieve — mail section)email_list_folders, email_list, email_read, email_search, email_filter_listemail_send, email_save_draft, email_reply, email_reply_all, email_delete, email_move, email_flag, email_mark_read, email_mark_unread, email_mark_spam, email_archive, email_create_folder, email_delete_folder, email_filter_create, email_filter_update
calendar_* (CalDAV — calDav section)calendar_list, calendar_list_events, calendar_free_busycalendar_create_event, calendar_update_event, calendar_delete_event, calendar_accept_event, calendar_decline_event, calendar_tentative_event
contact_* (CardDAV — cardDav section)contact_list, contact_findcontact_create
metalist_servers (always on)—
  • Every tool (except list_servers) accepts an optional server argument to target a specific account. A tool is hidden from the tool list unless its flag is enabled for at least one account.
  • email_search searches all folders by default; pass folder to narrow it. On the ox-api transport, body/text match only the subject and addresses of recent messages — use transport: "imap" for true full-text search.
  • email_mark_spam / email_archive find the Junk/Archive folder via IMAP special-use attributes, with name-based fallbacks.
  • email_reply / email_reply_all preserve threading (In-Reply-To/References) and exclude your own address from reply-all recipients.
  • The three RSVP tools (calendar_accept_event / calendar_decline_event / calendar_tentative_event) share one feature flag: respondEvent (calDav section). They rewrite your PARTSTAT on the invitation; the server notifies the organizer.
  • contact_find searches contacts server-side (CardDAV addressbook-query, RFC 6352) with automatic fallback to client-side filtering; fields narrows the match to name/email/phone/org (default name + email). Handy for resolving a name to an email before calendar_free_busy. contact_list is plain enumeration.

Mail filters

email_filter_create / email_filter_update manage server-side sieve filters over ManageSieve (port 4190, STARTTLS; requires basic/app-password auth). Rules support conditions on from/to/subject/any header (AND or OR) and actions fileinto (move to folder), discard, markRead, redirect.

Backend depends on mail.transport: with ox-api (default), filters go through the OX mailfilter/v2 module and operate on the account's real webmail rules (rules with tests/actions beyond this model are listed read-only as other). With imap, ox-mcp manages its own sieve script over ManageSieve (port 4190) and activates it — filters from other scripts become inactive while it is active.

Configuration: per-protocol sections

Each account is made of up to three self-contained sections — mail, calDav, cardDav — each with its own server, auth (incl. its own login user), and features. This matches servers (like Open-Xchange) that scope app passwords per protocol: your Mail password, CalDAV password, and CardDAV password can all differ.

jsonc
{  "defaultServer": "default",  "timeoutSeconds": 300,                                     // optional; request timeout, default 300  "servers": {    "default": {      "mail": {        "server": "webmail.example.com",                    // OX HTTP API host (default transport)        "transport": "ox-api",                              // optional; "imap" for direct IMAP/SMTP        "imap": { "host": "imap.example.com", "port": 993 }, // optional overrides        "smtp": { "host": "smtp.example.com", "port": 587, "secure": false }, // secure optional; 993/465 = TLS, else STARTTLS        "auth": { "type": "basic", "user": "[email protected]", "appPassword": "mail-scoped-pw" },        "features": { "search": true, "send": false /* per-tool flags */ }      },      "calDav": {        "server": "dav.example.com",        "auth": { "type": "basic", "user": "[email protected]", "appPassword": "caldav-scoped-pw" },        "features": { "respondEvent": false /* … */ }      },      "cardDav": {        "server": "dav.example.com",        "auth": { "type": "basic", "user": "[email protected]", "appPassword": "carddav-scoped-pw" }      }    }  }}
  • A section you don't configure = its tools are disabled. A calDav-only config is perfectly valid.
  • mail.transport is optional and defaults to "ox-api" — the Open-Xchange HTTP API (the webmail backend, https://<server>/appsuite/api). OX deployments validate app passwords at this middleware, so it works even where raw IMAP rejects them; server is the webmail host. Filter tools use the OX mailfilter/v2 module — they list and edit the account's actual webmail rules. Caveat: search matches subject/addresses (not full bodies).
  • Set transport: "imap" for direct IMAP/SMTP against generic (non-OX) mail hosts — then server is the mail host, with optional split imap/smtp endpoints.
  • enabled: false on a section is a config master switch for all its tools.
  • There is no global features block — flags live only inside sections (env vars remain global).

Feature flags

Resolution precedence — env always beats config, first defined wins:

  1. per-account env, tool — OX_MCP_<ID>_ENABLE_EMAIL_SEND
  2. per-account env, group — OX_MCP_<ID>_ENABLE_MAIL
  3. global env, tool — OX_MCP_ENABLE_EMAIL_SEND
  4. global env, group — OX_MCP_ENABLE_MAIL / _CALDAV / _CARDDAV
  5. section config, tool — servers.<id>.mail.features.send
  6. section config, master — servers.<id>.mail.enabled
  7. default — true for reads, false for writes
bash
# enable sending on all accountsOX_MCP_ENABLE_EMAIL_SEND=true# turn off the whole calendar sectionOX_MCP_ENABLE_CALDAV=false# enable event creation only on the "work" accountOX_MCP_WORK_ENABLE_CALENDAR_CREATE_EVENT=true# enable all three RSVP tools at onceOX_MCP_ENABLE_CALENDAR_RESPOND_EVENT=true

Booleans accept true/1/yes/on and false/0/no/off.

Connection & credentials (env)

Every section field is settable via env: OX_MCP_[ID_]<SECTION>_<FIELD> with SECTION ∈ MAIL | CALDAV | CARDDAV. The default account uses the non-indexed form.

Env varMeaning
OX_MCP_MAIL_SERVER / OX_MCP_CALDAV_SERVER / OX_MCP_CARDDAV_SERVERsection host
OX_MCP_MAIL_USER / OX_MCP_CALDAV_USER / OX_MCP_CARDDAV_USERsection login user
OX_MCP_MAIL_APP_PASSWORD / OX_MCP_CALDAV_APP_PASSWORD / …section app password (basic auth)
OX_MCP_MAIL_IMAP_HOST / _IMAP_PORT / _SMTP_HOST / _SMTP_PORTmail transport overrides (Gmail-style split hosts)
OX_MCP_MAIL_IMAP_SECURE / _SMTP_SECUREforce TLS (true) or STARTTLS (false) on a non-standard port
OX_MCP_MAIL_AUTH_TYPE, _CLIENT_ID, _REFRESH_TOKEN, …per-section OAuth/OIDC fields
OX_MCP_TIMEOUT_SECONDSrequest timeout for all HTTP/IMAP/SMTP operations (default 300)

Default ports: IMAP 993, SMTP 465, DAV 443, ManageSieve 4190. TLS mode derives from the port (993/465 implicit TLS; 143/587 STARTTLS) unless secure is set explicitly.

Validation

Configuration is validated strictly at startup: every present section with enabled tools must have a server (or split imap/smtp hosts for mail) and a login user, or the server exits with an error naming the exact field. Accounts with zero sections error too. Absent sections are simply disabled — no error.

Authentication types

basic (app password) is the default. Other Open-Xchange-aligned mechanisms are supported per section via auth.type / OX_MCP_[ID_]<SECTION>_AUTH_TYPE:

TypeExtra fields (env: OX_MCP_[ID_]<SECTION>_…)
basicAPP_PASSWORD
xoauth2ACCESS_TOKEN
oauth2-refreshCLIENT_ID, CLIENT_SECRET, REFRESH_TOKEN, TOKEN_URL, SCOPE
oauth2-passwordCLIENT_ID, CLIENT_SECRET, PASSWORD, TOKEN_URL, SCOPE
oidcISSUER, CLIENT_ID, CLIENT_SECRET, REFRESH_TOKEN or PASSWORD, SCOPE

Tokens are cached and refreshed automatically. Note: mail filters (ManageSieve) require basic auth.

Multiple accounts

bash
OX_MCP_ACCOUNTS=work,personalOX_MCP_WORK_MAIL_SERVER=mail.work.com[email protected]OX_MCP_WORK_MAIL_APP_PASSWORD=...OX_MCP_PERSONAL_CALDAV_SERVER=dav.personal.com[email protected]OX_MCP_PERSONAL_CALDAV_APP_PASSWORD=...OX_MCP_DEFAULT_SERVER=work

Or define them in ~/.ox-mcp/config.json under servers (keyed by id). list_servers shows what's configured (never secrets); env values override config field-by-field. Feature flags can differ per account (e.g. sending enabled only on work).

Free/busy caveat

calendar_free_busy returns availability windows only (busy/free), via the CalDAV scheduling outbox — no calendar sharing needed. It does not reveal event details, and requires the server to advertise a schedule-outbox-URL. To read a colleague's full calendar, they must share it with your account; shared calendars then appear in calendar_list / calendar_list_events.

Docker

bash
docker build -t ox-mcp .docker run -i --rm \  -e OX_MCP_MAIL_SERVER=mail.example.com \  -e [email protected] \  -e OX_MCP_MAIL_APP_PASSWORD=xxxx \  ox-mcp

Development

bash
npm installnpm run dev          # run from sourcenpm test             # vitestnpm run test:coveragenpm run build        # bundle to dist/ (tsup)

License

MIT

来源:README.md,提交 43ebee1

工具

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

版本历史

3
  1. v0.1.4最新Oct 12, 2026
  2. v0.1.3Oct 11, 2026
  3. v0.1.2Sep 16, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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