Email Inbox API + Sending by Sendmux

io.github.Sendmux由 GitHub 帳號 Sendmux 發布v2.2.0更新於 Oct 24, 2026

AI email inbox and sending tools with attachments, search, live events, and webhooks.

發布方自己的服務:Sending

已驗證Streamable HTTP可網頁執行溝通與協作商業與電商

概覽

AI 產生的概覽

Sendmux MCP 讓 AI 助理透過 Sendmux 信箱讀取與寄送郵件,並管理網域、Webhook 與附件。

可以做什麼
讀取信箱:列出郵件、討論串、資料夾,搜尋、計數,並在限定時間內等待新郵件,讀取附件內容或連結,並從信箱寄送含內嵌或已上傳附件的郵件。管理帳戶:網域、信箱、日誌、指標、支出摘要和 Webhook。寄送外寄郵件:上傳附件參照後執行單封或批次寄送。查詢已授權信箱的個人資料與工作階段資訊。
適用情境
當助理需要在 Sendmux 上處理真實郵件時使用,例如整理收件匣、搜尋與摘要郵件、等待新郵件到達,或寄送含附件的郵件。管理功能適合處理網域、日誌和 Webhook 等帳戶事務。
執行需求
可作為帶 OAuth 的遠端端點使用,也可透過 npm 或 PyPI 套件在本機執行(Python 套件需 Python 3.10 或更新版本)。本機使用需以環境變數提供 API 金鑰:SENDMUX_MAILBOX_API_KEY、SENDMUX_MANAGEMENT_API_KEY(根金鑰),可選 SENDMUX_SENDING_API_KEY,並以 SENDMUX_MCP_SURFACES 選擇功能面。HTTP 模式需 SENDMUX_MCP_HTTP_BEARER_TOKEN,除非明確允許無驗證 HTTP。
安裝前請注意
這些金鑰是敏感憑證:根金鑰具管理權限,可寄送金鑰能寄出真實郵件。寄送工具會寄出真實郵件,已完成的寄送與上傳無法透過回復套件版本撤銷。代理權杖受伺服器端範圍限制,自行註冊的代理權杖不含 email.send。附件內容與連結應在模型上下文之外處理。若啟用無驗證選項,HTTP 模式將不設驗證。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Email Inbox API + Sending by Sendmux,將其新增到工作區。
  2. 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.Sendmux%2Fsendmux-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。

{
  "mcpServers": {
    "email-inbox-api-sending-by-sendmux": {
      "type": "http",
      "url": "https://mcp.sendmux.ai/mcp"
    }
  }
}

README

Email Inbox API + Sending by Sendmux

[PyPI version] [Python versions] [PyPI downloads] [Licence]

Email inbox API, inbound mail, and outbound sending MCP and A2A servers for AI agents, with inbound email, clean JSON parsing, webhooks, and multi-provider routing through Sendmux.

This package is the Sendmux MCP. Keep it separate from any documentation-search MCP used by docs tooling.

Documentation

Requirements

  • Python 3.10 or newer.
  • A send-capable smx_mbx_* key or owner-approved Sending-resource smx_agent_* token for Sending tools.
  • A mailbox-scoped smx_mbx_* key or scoped smx_agent_* token for Mailbox tools.
  • A root smx_root_* key for Management tools.

2.0.0 upgrade

Version 2.0.0 removes local file_path and roots inputs from MCP attachment tools. Before upgrading a self-managed package or server, retain the prior known-working package environment, dependency state, and MCP client and tool configuration. Update attachment callers to use the attachment workflow for agents, then verify tool discovery and each attachment workflow your agents use.

To roll back a self-managed installation, restore the retained package environment, dependency state, and MCP client and tool configuration together. Verify tool discovery and the relevant attachment workflow before resuming agents. A package rollback doesn't reverse uploads or sends that have already completed.

For clients that use Sendmux's hosted endpoint, changing a local pip environment doesn't change the deployed server version. A hosted deployment rollback is a separate operator release action and must be verified against the hosted endpoint.

Installation

sh
pip install sendmux-mcp

Usage

Run a single local server with the per-surface commands.

sh
QUBRICS_API_KEY=smx_mbx_... sendmux-mcp-mailboxQUBRICS_API_KEY=smx_root_... sendmux-mcp-managementQUBRICS_API_KEY=smx_mbx_... sendmux-mcp-sending

Run a combined local server with sendmux-mcp.

sh
QUBRICS_MCP_SURFACES=mailbox,sending \QUBRICS_MAILBOX_API_KEY=smx_mbx_... \QUBRICS_SENDING_API_KEY=smx_mbx_... \sendmux-mcp

Run all three local surfaces when you have both key types.

sh
QUBRICS_MCP_SURFACES=mailbox,management,sending \QUBRICS_MAILBOX_API_KEY=smx_mbx_... \QUBRICS_MANAGEMENT_API_KEY=smx_root_... \QUBRICS_SENDING_API_KEY=smx_mbx_... \sendmux-mcp

The generic sendmux-mcp command also accepts --surface or --surfaces. The wrapper commands select exactly one surface.

Transports

stdio is the default transport for local agent clients.

sh
QUBRICS_API_KEY=smx_mbx_... sendmux-mcp-mailbox --transport stdio

http and streamable-http expose the MCP endpoint over HTTP. HTTP mode defaults to 127.0.0.1:8765/mcp and requires a separate MCP bearer token unless you explicitly opt out.

sh
QUBRICS_API_KEY=smx_mbx_... \QUBRICS_MCP_HTTP_BEARER_TOKEN=local-mcp-token \sendmux-mcp-mailbox --transport http --host 127.0.0.1 --port 8765 --path /mcp

/health returns a small JSON health response for the selected surfaces.

Hosted Endpoint

The public hosted MCP endpoint is https://mcp.sendmux.ai/mcp.

For hosted clients, use HTTP transport with OAuth. Do not add manual Authorization headers, API keys, custom OAuth endpoints, or custom scopes unless your client explicitly requires them.

Hosted OAuth clients that omit requested scopes during registration or authorization are supported; the server advertises the hosted scope set through discovery and bearer challenges.

The packaged sendmux-mcp-hosted command runs the hosted server runtime. Local and private deployments should use the local commands above unless you are operating a compatible OAuth-backed hosted environment.

Hosted A2A Endpoint

The same hosted runtime exposes deterministic A2A 1.0 over HTTP+JSON at https://a2a.sendmux.ai/a2a/v1. Discover it from https://a2a.sendmux.ai/.well-known/agent-card.json; OAuth resource metadata is at https://a2a.sendmux.ai/.well-known/oauth-protected-resource.

Send exactly one JSON DataPart to the A2A message:send operation. Its data selects a curated Sendmux operation and supplies that operation's inputs:

json
{  "operationId": "managementListDomains",  "pathParameters": {},  "query": { "limit": 10 },  "headers": {},  "body": null,  "mailboxId": null}

operationId uses the same curated operation IDs as the hosted MCP service. OAuth grants are audience-bound to the A2A resource and retain their Sendmux surface and permission limits. The service returns one JSON DataPart containing the upstream status, safe response headers, and JSON body (or bodyBase64 for non-JSON responses).

The A2A endpoint is immediate and stateless: streaming, push notifications, persistent tasks, and task cancellation are not advertised or routed.

Configuration

SettingEnvironmentDefault
Tool surfacesQUBRICS_MCP_SURFACESrequired for sendmux-mcp; wrapper commands select one surface
API key fallbackQUBRICS_API_KEYaccepted for compatible single-key setups
Mailbox API keyQUBRICS_MAILBOX_API_KEYrequired when mailbox is selected unless a compatible fallback is provided
Management API keyQUBRICS_MANAGEMENT_API_KEYrequired when management is selected unless a compatible fallback is provided
Sending API keyQUBRICS_SENDING_API_KEYrequired when sending is selected unless the fallback key is a send-capable smx_mbx_* key or owner-approved Sending-resource smx_agent_* token
App API base URLQUBRICS_APP_BASE_URLhttps://app.sendmux.ai/api/v1
Sending API base URLQUBRICS_SENDING_BASE_URLhttps://smtp.sendmux.ai/api/v1
TransportQUBRICS_MCP_TRANSPORTstdio
HTTP hostQUBRICS_MCP_HOST127.0.0.1
HTTP portQUBRICS_MCP_PORT8765
HTTP pathQUBRICS_MCP_PATH/mcp
HTTP bearer tokenQUBRICS_MCP_HTTP_BEARER_TOKENrequired for HTTP unless opt-out is enabled
Allow unauthenticated HTTPQUBRICS_MCP_ALLOW_UNAUTHENTICATED_HTTPfalse
Allowed browser originsQUBRICS_MCP_ALLOWED_ORIGINSno browser origins
Snapshot directory overrideQUBRICS_MCP_OPENAPI_INPUT_DIR or OPENAPI_INPUT_DIRpackaged snapshots
App snapshot overrideQUBRICS_MCP_APP_OPENAPIpackaged app snapshot
Sending snapshot overrideQUBRICS_MCP_SENDING_OPENAPIpackaged sending snapshot
Request timeoutQUBRICS_MCP_TIMEOUT_SECONDS30
Retry attemptsQUBRICS_MCP_RETRY_MAX_ATTEMPTS3
Retry time budget, in secondsQUBRICS_MCP_RETRY_MAX_ELAPSED_SECONDSunset

Retries honour Retry-After and X-RateLimit-Reset without applying the local backoff ceiling, and stop for retryable: false. Set the optional retry budget with RetryConfig(max_elapsed_seconds=30), the environment variable above, or --retry-max-elapsed-seconds 30. A retry that would exceed the remaining budget returns the original error; in-flight requests keep their normal HTTP timeouts.

Packaged OpenAPI snapshots are the default so released tool names, schemas, and descriptions stay stable. Path, directory, and URL overrides are available for development, canary, and debugging runs.

Tool Surfaces

  • Mailbox: tools for granted mailboxes, profile/session discovery, messages, attachments, bounded message waits, threads, folders, search, counts, and mailbox sends. Requires an smx_mbx_* key or scoped smx_agent_* token. Agent tokens remain limited by server-side scopes; pre-claim self-registered agent tokens do not include email.send.
  • Management: tools for domains, mailboxes, logs, metrics, spend summary, and webhooks. Requires an smx_root_* key.
  • Sending: tools for attachment upload refs, single sends, and batch sends. Requires an smx_mbx_* key or owner-approved Sending-resource smx_agent_* token.

The server rejects keys with the wrong prefix before starting.

Package Contract For Maintainers

The source checkout includes sendmux_mcp/mcp-contract.json, generated from the actual server factory's public tool discovery. Use its tools.by_surface entries and tools.count instead of maintaining a separate catalogue. Each entry retains the tool's description, input/output schemas, and annotations. The contract also separates hosted resource, local transports, API origins, certified protocol revisions, and the runtime versions used during generation.

After installing a build that contains the contract, read it without credentials or network requests:

python
from sendmux_mcp.contract import load_contract
contract = load_contract()print(contract["package"])

The result identifies the installed distribution and version. load_contract() raises ValueError for stale source/version evidence, a mismatched pinned FastMCP runtime, or unsupported certified revisions. The recorded transitive MCP version is provenance, not a narrower dependency constraint. Reading the artifact does not certify a newly resolved dependency version or prove a deployed service matches this build.

uploads distinguishes the locally enforced inline and Mailbox byte caps from Sending's returned max_size_bytes authority. The Sending presign request schema does not impose a numeric maximum; use the upload intent response, not a historical source constant. URL expiry and physical attachment retention are not equivalent, and this artifact does not certify storage cleanup.

From the repository root, pnpm generate:mcp refreshes native editable metadata and writes deterministic contract bytes. With that environment prepared, pnpm exec .tmp/python-venv/bin/python -m sendmux_mcp.contract --check checks freshness without rewriting. pnpm build:mcp verifies tests, wheel/sdist inclusion, installed consumption, and frozen conformance checks. Checkout changes are not available through pip install until their release is published.

Attachment Workflow For Agents

Use qubrics_mailbox_wait_for_message when a user asks an agent to wait for new mail. The tool is bounded; if it returns matched=false, call it again rather than holding an MCP tool call open indefinitely.

When a message has attachments:

  1. Call qubrics_mailbox_read_attachment with message_id and attachment_id when you need the attachment contents.
  2. For small text-like attachments, read the returned text.
  3. For binary or oversized attachments, use the returned resource_link / download_url promptly outside model context.
  4. Use qubrics_mailbox_get_attachment only when metadata is enough or you need to refresh the link.

Use qubrics_mailbox_upload_attachment for outbound attachments over MCP. It accepts exactly one input mode:

  • presign_upload_url=true for hosted MCP or shell-capable agents; upload the file to the returned URL with exact headers and no API key, then send with the returned blob_id.
  • content_base64 only for tiny agent-authored files, capped at 32 KiB decoded. If it is too large, switch to a presigned upload, CLI --attach, or SDK file helpers.

Presigned uploads use the mailbox attachment cap, currently 7,500,000 bytes per attachment, and pin the exact declared byte length and content type.

For mailbox sends, qubrics_mailbox_send_message accepts either tiny inline base64 attachment objects (content, filename, content_type) or uploaded attachment references (blob_id, filename, content_type).

For Sending API sends, use qubrics_sending_upload_attachment only for tiny inline content, or call qubrics_sending_create_attachment_upload and PUT bytes outside model context. Then pass {"attachment_id": "att_..."} in qubrics_sending_send_email.attachments[].

Console Scripts

  • sendmux-mcp
  • sendmux-mcp-mailbox
  • sendmux-mcp-management
  • sendmux-mcp-sending
  • sendmux-mcp-hosted

Support

Open an issue in qubrics/qubrics-sdk with the package name, version, command, transport, and request ID from any API error.

Licence

MIT. See the licence file.

來源:packages/python/mcp/README.md,提交 e3d5448

工具

0
該伺服器需要登入,因此 SourceWeft 無法在沒有帳號的情況下讀取其工具,也未收錄。已連接帳號所能看到的內容可能因帳號及其權限而異。

版本歷史

6
  1. v2.2.0最新Oct 2, 2026
  2. v2.1.4Oct 1, 2026
  3. v2.1.3Sep 21, 2026
  4. v2.1.2Sep 19, 2026
  5. v2.1.1Sep 17, 2026
  6. v2.1.0Sep 16, 2026

評分

已滿足適用檢查項的 85%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Sending 整合