PluginBench
MCP Server
Active
MIT

Email Inbox API + Sending by Sendmux MCP Server

io.github.Sendmux/sendmux-mcp

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

What is the Email Inbox API + Sending by Sendmux MCP server?

The Sendmux MCP server provides AI agents with email inbox and sending capabilities through the Mailbox and Sending APIs. It supports attachments, message search, live mailbox events, and webhooks, enabling agents to read, send, and monitor emails programmatically.

Sendmux MCP integrates email management into AI workflows. Use it to read incoming messages with attachments, send emails with files, search your inbox, stream live email events, and set up webhooks. Ideal for AI agents that need to handle email as part of their task execution.

How to install Email Inbox API + Sending by Sendmux

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Environment / auth
  • SENDMUX_MCP_SURFACES
    required

    Tool surfaces to run locally.

  • SENDMUX_MAILBOX_API_KEY
    required
    secret

    Mailbox API key for Mailbox API and Sending API tools.

  • SENDMUX_MANAGEMENT_API_KEY
    required
    secret

    Root API key for Management API tools.

  • SENDMUX_SENDING_API_KEY
    secret

    Optional send-capable smx_mbx_ key or owner-approved smx_agent_ token for Sending API tools when it differs from the Mailbox API key.

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "sendmux-mcp": {
      "command": "uvx",
      "args": [
        "sendmux-mcp"
      ],
      "env": {
        "SENDMUX_MCP_SURFACES": "<YOUR_SENDMUX_MCP_SURFACES>",
        "SENDMUX_MAILBOX_API_KEY": "<YOUR_SENDMUX_MAILBOX_API_KEY>",
        "SENDMUX_MANAGEMENT_API_KEY": "<YOUR_SENDMUX_MANAGEMENT_API_KEY>",
        "SENDMUX_SENDING_API_KEY": "<YOUR_SENDMUX_SENDING_API_KEY>"
      }
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • mailbox_get_messages — Retrieve messages from your inbox with metadata and attachment information.
  • mailbox_send_message — Send emails with optional attachments and recipient configuration.
  • mailbox_search_messages — Search inbox messages by subject, sender, content, or other criteria.
  • mailbox_wait_for_message — Wait for incoming messages with a bounded timeout for real-time event handling.
  • mailbox_get_attachment — Fetch attachment metadata and download URLs for email attachments.
  • mailbox_upload_attachment — Upload files as attachments before sending messages.
  • mailbox_stream_events — Stream live mailbox events in real-time (new messages, reads, etc.).
  • sending_send_email — Send emails via the Sending API with support for attachments and advanced options.

Use cases

  • Monitor incoming emails and trigger AI workflows based on message content or sender.
  • Send automated email responses or notifications from AI agents with file attachments.
  • Search and retrieve specific emails from your inbox for processing or analysis.
  • Stream live email events to keep AI agents synchronized with mailbox changes.
  • Upload and attach files to outbound emails without manual base64 encoding.

Email Inbox API + Sending by Sendmux MCP server FAQ

What is the Sendmux MCP server?

Sendmux MCP exposes email inbox and sending capabilities to AI agents via the Model Context Protocol. It lets Claude, Cursor, and other MCP clients read emails, send messages, manage attachments, and monitor live mailbox events.

Is Sendmux free?

Sendmux offers both free and paid tiers. Check sendmux.ai for pricing details. The MCP server itself is open-source (MIT licensed).

How do I install it in Cursor or Claude?

Install via PyPI: `pip install sendmux-mcp`. Then configure your MCP client to run `sendmux-mcp-mailbox` or `sendmux-mcp-sending` with appropriate API keys. Alternatively, connect to the hosted MCP endpoint at `https://mcp.sendmux.ai/mcp` using OAuth.

What authentication is required?

Use Sendmux API keys: `smx_mbx_*` for mailbox and sending operations, or `smx_agent_*` tokens for scoped access. The hosted MCP endpoint uses OAuth and does not require manual API key configuration.

Can I send attachments?

Yes. Use `mailbox_upload_attachment` to upload files first, then reference them in `mailbox_send_message`. For the Sending API, use the file helper functions in your SDK (e.g., `sendEmailWithFiles` in TypeScript or `send_email_with_files` in Python) to avoid manual base64 encoding.

Does it support live email events?

Yes. Use `mailbox_wait_for_message` for bounded waits in agent tool calls, or `mailbox_stream_events` via the CLI/SDK to stream real-time mailbox events (new messages, reads, etc.).

README (reference)

Source of truth, from the repository.

Sendmux SDKs

npm version PyPI version Go Reference crates.io version CI npm downloads Licence: MIT

Official SDK, CLI, and MCP workspace for Sendmux.

Packages

EcosystemPackageSurfaceAPI key or authInstallSource
npm@sendmux/coreShared TypeScript helpersn/anpm install @sendmux/corepackages/ts/core
npm@sendmux/sendingSending APIsmx_mbx_* or owner-approved smx_agent_*npm install @sendmux/sendingpackages/ts/sending
npm@sendmux/mailboxMailbox APIsmx_mbx_* or smx_agent_*npm install @sendmux/mailboxpackages/ts/mailbox
npm@sendmux/managementManagement APIsmx_root_*npm install @sendmux/managementpackages/ts/management
npm@sendmux/sdkTypeScript umbrella packagesurface-specificnpm install @sendmux/sdkpackages/ts/sdk
npm@sendmux/clisendmux CLIcommand/profile-specificnpm install -g @sendmux/clipackages/ts/cli
npm@sendmux/ai-sdkVercel AI SDK tools (agent inbox + sending)send + receive smx_mbx_* or smx_agent_*npm install @sendmux/ai-sdkpackages/ts/ai-sdk
Homebrewsendmuxsendmux CLIcommand/profile-specificbrew install sendmux/tap/sendmuxSendmux/homebrew-tap
PyPIsendmux-coreShared Python helpersn/apip install sendmux-corepackages/python/core
PyPIsendmux-sendingSending APIsmx_mbx_* or owner-approved smx_agent_*pip install sendmux-sendingpackages/python/sending
PyPIsendmux-mailboxMailbox APIsmx_mbx_* or smx_agent_*pip install sendmux-mailboxpackages/python/mailbox
PyPIsendmux-managementManagement APIsmx_root_*pip install sendmux-managementpackages/python/management
PyPIsendmux-sdkPython umbrella packagesurface-specificpip install sendmux-sdkpackages/python/sdk
PyPIsendmux-mcpLocal MCP plus hosted MCP and A2A serversOAuth for hosted; surface-specific keys for localpip install sendmux-mcppackages/python/mcp
PyPIlangchain-sendmuxLangChain toolkit (agent inbox + sending)send + receive smx_mbx_* or smx_agent_*pip install langchain-sendmuxpackages/python/langchain
Gosendmux.ai/go/coreShared Go helpersn/ago get sendmux.ai/go@v1.0.0go/core
Gosendmux.ai/go/sendingSending APIsmx_mbx_* or owner-approved smx_agent_*go get sendmux.ai/go@v1.0.0go/sending
Gosendmux.ai/go/mailboxMailbox APIsmx_mbx_* or smx_agent_*go get sendmux.ai/go@v1.0.0go/mailbox
Gosendmux.ai/go/managementManagement APIsmx_root_*go get sendmux.ai/go@v1.0.0go/management
Gosendmux.ai/go/sdkGo umbrella packagesurface-specificgo get sendmux.ai/go@v1.0.0go/sdk
crates.iosendmuxRust umbrella cratesurface-specificcargo add sendmuxrust
Packagistsendmux/coreShared PHP helpersn/acomposer require sendmux/core:^1.0packages/php/core
Packagistsendmux/sendingSending APIsmx_mbx_* or owner-approved smx_agent_*composer require sendmux/sending:^1.0packages/php/sending
Packagistsendmux/mailboxMailbox APIsmx_mbx_* or smx_agent_*composer require sendmux/mailbox:^1.0packages/php/mailbox
Packagistsendmux/managementManagement APIsmx_root_*composer require sendmux/management:^1.0packages/php/management
Packagistsendmux/sdkPHP umbrella packagesurface-specificcomposer require sendmux/sdk:^1.0packages/php/sdk
RubyGemssendmux-coreShared Ruby helpersn/agem install sendmux-corepackages/ruby/core
RubyGemssendmux-sendingSending APIsmx_mbx_* or owner-approved smx_agent_*gem install sendmux-sendingpackages/ruby/sending
RubyGemssendmux-mailboxMailbox APIsmx_mbx_* or smx_agent_*gem install sendmux-mailboxpackages/ruby/mailbox
RubyGemssendmux-managementManagement APIsmx_root_*gem install sendmux-managementpackages/ruby/management
RubyGemssendmux-sdkRuby umbrella packagesurface-specificgem install sendmux-sdkpackages/ruby/sdk

Quick start

Install only the package for the surface you need.

npm install @sendmux/sending
pip install sendmux-sending
go get sendmux.ai/go@v1.0.0
cargo add sendmux
composer require sendmux/sending:^1.0
gem install sendmux-sending

Use send-capable smx_mbx_* keys or owner-approved Sending-resource smx_agent_* tokens for Sending clients. Use smx_mbx_* keys or scoped smx_agent_* tokens for Mailbox clients. Use root smx_root_* keys for Management clients. Agent tokens remain limited by server-side scopes; pre-claim self-registered agent tokens do not include email.send.

For command-line access, install the CLI:

brew install sendmux/tap/sendmux
npm install -g @sendmux/cli
sendmux --help

For MCP clients, install sendmux-mcp or connect to the hosted MCP endpoint:

pip install sendmux-mcp
sendmux-mcp-mailbox --help

The hosted MCP endpoint is https://mcp.sendmux.ai/mcp. Local MCP commands support stdio and HTTP transports; hosted MCP uses OAuth and does not require manual API keys or custom OAuth endpoints.

For A2A 1.0 clients, discover the hosted HTTP+JSON service from https://a2a.sendmux.ai/.well-known/agent-card.json. It exposes the same curated mailbox, management, and sending operations with an OAuth grant bound specifically to https://a2a.sendmux.ai/a2a/v1.

For AI-agent frameworks, first-party tool wrappers are available:

npm install @sendmux/ai-sdk ai zod   # Vercel AI SDK: sendmux({ apiKey }) returns a ToolSet
pip install langchain-sendmux        # LangChain: SendmuxToolkit(api_key=...).get_tools()

Both wrap the generated Sending and Mailbox clients, so the OpenAPI spec stays the single source of truth.

Attachments And Live Mailbox Events

Mailbox attachment metadata now includes a short-lived download_url. Fetch that URL promptly with a plain HTTP client; it does not require an Authorization header, but it expires after a short TTL. If a download URL expires, re-fetch the message or attachment metadata to receive a fresh URL.

For outbound files, avoid manually placing base64 in prompts or source strings. Use the zero-context path for your lane:

  • CLI: sendmux mailbox:send-message --attach ./report.pdf or sendmux sending:send --attach ./report.pdf.
  • TypeScript: use @sendmux/mailbox/node sendMailboxMessageWithFiles(...) or @sendmux/sending/node sendEmailWithFiles(...).
  • Python: use sendmux_mailbox.send_mailbox_message_with_files(...) or sendmux_sending.send_email_with_files(...).
  • MCP: local stdio can use mailbox_upload_attachment with file_path; hosted and shell-capable agents can mint a presigned upload URL, PUT bytes to it without an API key, then send with the returned blob_id.

Mailbox direct uploads, presigned uploads, CLI --attach, and mailbox SDK file helpers share the mailbox attachment cap: currently 7,500,000 bytes per attachment. Sending API attachment helpers encode files into the send request body; the generated Sending API limit is max 10 attachments and a 25 MB request body.

Small generated attachments can still use inline base64 where the API schema supports them. MCP inline base64 is capped at 32 KiB decoded; the cheaper alternatives are file_path, presigned upload, CLI --attach, and SDK file helpers.

Live mailbox events are available through idiomatic lanes:

  • TypeScript: streamMailboxEvents(...) returns an async iterator over typed mailbox realtime events.
  • Python: iter_mailbox_events(...) yields typed MailboxRealtimeEvent models from the generated mailbox client.
  • CLI: sendmux mailbox:stream-events --follow prints one JSON event per line until the stream closes or the process is interrupted.
  • MCP: use mailbox_wait_for_message for bounded waits inside agent tool calls, then mailbox_get_attachment to renew attachment metadata and fetch download_url.

Repository structure

PathPurpose
packages/tsTypeScript SDK packages and the sendmux CLI.
packages/pythonPython SDK packages and the sendmux-mcp package.
goGo module sendmux.ai/go and subpackages.
rustRust crate published as sendmux on crates.io.
packages/phpPHP package sources used for Packagist packages and public split repositories.
packages/rubyRubyGem package sources.
codegenGenerator configuration and templates.
scriptsGeneration, verification, publishing, and release helper scripts.
docsSurface-coverage and live E2E audit artefacts.
.github/workflowsCI, canary, live E2E, and release workflows.

Versioning and support

SDK packages track the Sendmux public API contracts. Patch versions can differ between packages when a fix only affects one ecosystem or runtime.

Generated clients are built from committed OpenAPI snapshots. Any API contract change must update the snapshots and generated output in the same change.

For help, open a GitHub issue with the package name, version, command or import path, and the request ID from any API error response.

Contributing

Open pull requests against this repository. Keep generated output, source snapshots, and verification artefacts together in the same change.

Security issues should be reported through GitHub Security Advisories.

Licence

This repository is available under the MIT licence.

Related MCP servers

Pay-per-use web extract, token prices, and wallet balances via x402 USDC micropayments.

View repository →

Open-source MCP proxy for AI agent access control with CEL policies, RBAC, and audit.

View repository →

Enable AI agents to compile TeX files with LaTeX inside a Docker container.

3
Python
AGPL-3.0
View repository →

Let AI agents like Claude and Codex run Stata regression analysis safely on your local machine.

209
Python
AGPL-3.0
View repository →
SESequesign logo

Sequesign

Active

Cryptographically verifiable receipts of an agent's delegated work, verified offline.

0
JavaScript
Apache-2.0
View repository →

Find verified appliance repair, HVAC, and plumbing technicians by location and brand.