Sendmux mcp setup
Agent skills for Sendmux
npx -y skills add Sendmux/skills --skill sendmux-mcp-setupAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
What its author says it does
Copied from the file, not written here
Configure Sendmux Model Context Protocol servers for AI agent clients, using hosted OAuth first when supported and secret-backed local env config otherwise. Use when the user wants to install sendmux-mcp, connect the hosted Sendmux MCP endpoint, run local stdio or HTTP MCP servers, set mailbox/management/sending key scopes, add bearer headers, or write MCP config for Claude Code, Cursor, Codex, VS Code/Copilot, Copilot CLI, Gemini CLI, Cline, or Windsurf/Cascade.
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
12.2 KB, ~3.0k tokens by cl100k_base, as published. Nobody here has run it
Sendmux MCP setup
Use this skill to connect an agent client to Sendmux through MCP.
Boundaries
- Do not ask the user to paste API keys or bearer tokens.
- Use
smx_mbx_keys or scopedsmx_agent_tokens for Mailbox MCP tools. - Use send-capable
smx_mbx_keys or owner-approved Sending-resourcesmx_agent_tokens for Sending MCP tools. - Use
smx_root_keys for Management MCP tools. - Use hosted OAuth at
https://mcp.sendmux.ai/mcpwhen the client supports remote MCP OAuth. - Use local stdio when the client cannot use hosted OAuth or local HTTP.
- For local stdio or HTTP, pass Sendmux keys and owner-approved agent tokens through environment variables backed by the user's secret store; do not write raw tokens into checked-in MCP config.
- Use local HTTP bearer only for local/private MCP servers; the bearer token protects the MCP endpoint and is separate from the Sendmux API key used upstream.
- Use server-qualified names such as
sendmux-mailbox:mailbox_search_message_snippetswhen a client needs fully-qualified tool names.
Install
pip install sendmux-mcp
Console scripts:
sendmux-mcp— combined local server; requires--surfacesorSENDMUX_MCP_SURFACES.sendmux-mcp-mailbox— mailbox-only local server.sendmux-mcp-management— management-only local server.sendmux-mcp-sending— sending-only local server.sendmux-mcp-hosted— hosted runtime; do not use this for normal local agent setup.
Choose A Setup
| Setup | Use when | Auth |
|---|---|---|
| Hosted remote | The client supports remote MCP OAuth. | Client signs in through Sendmux OAuth; do not pass API keys. |
| Local stdio | The agent runs a local child process. | Env vars passed to the server process. |
| Local HTTP bearer | A local/private MCP endpoint is shared by one or more clients. | Sendmux API key in server env; Authorization: Bearer ... from client to MCP server. |
Surface Map
| Surface | Key | Tool count | Example tools |
|---|---|---|---|
| Mailbox | smx_mbx_ or scoped smx_agent_ | 24 | mailbox_list_granted_mailboxes, mailbox_search_message_snippets, mailbox_get_attachment, mailbox_upload_attachment, mailbox_wait_for_message |
| Management | smx_root_ | 20 | management_create_domain, management_create_mailbox, management_create_mailbox_key, management_get_spend_summary, management_create_webhook |
| Sending | Send-capable smx_mbx_ or owner-approved Sending-resource smx_agent_ | 5 | sending_send_email, sending_send_email_batch, sending_upload_attachment, sending_create_attachment_upload, sending_get_attachment |
For multi-mailbox grants, call mailbox_list_granted_mailboxes first and pass the returned mailbox_id to mailbox tools when targeting a mailbox.
Attachment upload mode depends on transport and send surface:
- Local stdio can use
mailbox_upload_attachmentwithfile_pathwhen the file is inside a client-shared filesystem root. - Hosted MCP cannot read local paths. Use
presign_upload_url=true, upload with shellcurl, then send with the returnedblob_id. - Sending MCP uses
sending_upload_attachmentwithfile_pathon local stdio, orsending_create_attachment_uploadplus an externalPUTfor hosted/shell-capable agents, then sends withattachment_id. - Use
content_base64only for tiny generated files. Mailbox upload modes cap each attachment at 7,500,000 bytes; Sending upload caps each file at 18 MiB; MCP inline base64 caps at 32 KiB decoded. Seesendmux-attachments.
Local Servers
Mailbox-only stdio:
SENDMUX_API_KEY="$SENDMUX_MBX_KEY" sendmux-mcp-mailbox
Management-only stdio:
SENDMUX_API_KEY="$SENDMUX_ROOT_KEY" sendmux-mcp-management
Sending-only stdio:
SENDMUX_API_KEY="$SENDMUX_MBX_KEY" sendmux-mcp-sending
Combined stdio:
SENDMUX_MCP_SURFACES=mailbox,management,sending \
SENDMUX_MAILBOX_API_KEY="$SENDMUX_MBX_KEY" \
SENDMUX_MANAGEMENT_API_KEY="$SENDMUX_ROOT_KEY" \
SENDMUX_SENDING_API_KEY="$SENDMUX_MBX_KEY" \
sendmux-mcp
Local HTTP bearer:
SENDMUX_API_KEY="$SENDMUX_MBX_KEY" \
SENDMUX_MCP_HTTP_BEARER_TOKEN="$SENDMUX_MCP_HTTP_BEARER_TOKEN" \
sendmux-mcp-mailbox --transport http --host 127.0.0.1 --port 8765 --path /mcp
Client header for that local HTTP server:
Authorization: Bearer $SENDMUX_MCP_HTTP_BEARER_TOKEN
/health returns selected surfaces for local HTTP servers.
Common JSON Clients
Use this shape for Cursor, Cline, and Windsurf/Cascade clients that read an mcpServers object.
Local stdio, one mailbox server:
{
"mcpServers": {
"sendmux-mailbox": {
"command": "sendmux-mcp-mailbox",
"env": {
"SENDMUX_API_KEY": "${env:SENDMUX_MBX_KEY}"
}
}
}
}
Local stdio, all three surfaces:
{
"mcpServers": {
"sendmux": {
"command": "sendmux-mcp",
"args": ["--surfaces", "mailbox,management,sending"],
"env": {
"SENDMUX_MAILBOX_API_KEY": "${env:SENDMUX_MBX_KEY}",
"SENDMUX_MANAGEMENT_API_KEY": "${env:SENDMUX_ROOT_KEY}",
"SENDMUX_SENDING_API_KEY": "${env:SENDMUX_MBX_KEY}"
}
}
}
}
Local/private HTTP bearer:
{
"mcpServers": {
"sendmux-local-http": {
"url": "http://127.0.0.1:8765/mcp",
"headers": {
"Authorization": "Bearer ${env:SENDMUX_MCP_HTTP_BEARER_TOKEN}"
}
}
}
}
Hosted remote OAuth:
{
"mcpServers": {
"sendmux": {
"url": "https://mcp.sendmux.ai/mcp"
}
}
}
Client notes:
- Cursor: put project config at
.cursor/mcp.jsonor global config at~/.cursor/mcp.json; Cursor interpolates${env:NAME}incommand,args,env,url, andheaders. - Cline: use
~/.cline/mcp.json, the Cline MCP UI, orcline mcp; remote setup can ask for URL and headers. - Windsurf/Cascade: use
~/.codeium/mcp_config.jsonor Settings > Tools > Windsurf Settings > Add Server; HTTP config acceptsserverUrlorurl.
Claude Code
Hosted remote OAuth:
claude mcp add --transport http sendmux https://mcp.sendmux.ai/mcp
Then run /mcp and complete the sign-in flow if prompted.
Local stdio:
claude mcp add --transport stdio \
--env SENDMUX_API_KEY="$SENDMUX_MBX_KEY" \
sendmux-mailbox -- sendmux-mcp-mailbox
Local HTTP bearer:
claude mcp add --transport http \
sendmux-local-http http://127.0.0.1:8765/mcp \
--header "Authorization: Bearer $SENDMUX_MCP_HTTP_BEARER_TOKEN"
Project .mcp.json can also use mcpServers with type, url or command, args, env, and headers.
Codex
Use ~/.codex/config.toml for user-level config.
Local stdio:
[mcp_servers.sendmux_mailbox]
command = "sendmux-mcp-mailbox"
env_vars = ["SENDMUX_API_KEY"]
Run Codex with SENDMUX_API_KEY set to an smx_mbx_ key.
Combined stdio:
[mcp_servers.sendmux]
command = "sendmux-mcp"
args = ["--surfaces", "mailbox,management,sending"]
env_vars = ["SENDMUX_MAILBOX_API_KEY", "SENDMUX_MANAGEMENT_API_KEY", "SENDMUX_SENDING_API_KEY"]
Hosted remote OAuth:
[mcp_servers.sendmux]
url = "https://mcp.sendmux.ai/mcp"
oauth_resource = "https://mcp.sendmux.ai/mcp"
Local HTTP bearer:
[mcp_servers.sendmux_local_http]
url = "http://127.0.0.1:8765/mcp"
bearer_token_env_var = "SENDMUX_MCP_HTTP_BEARER_TOKEN"
VS Code And GitHub Copilot
VS Code stores MCP config in .vscode/mcp.json or user profile mcp.json under servers.
Local stdio:
{
"inputs": [
{
"type": "promptString",
"id": "sendmux-mbx-key",
"description": "Sendmux mailbox API key",
"password": true
}
],
"servers": {
"sendmuxMailbox": {
"type": "stdio",
"command": "sendmux-mcp-mailbox",
"env": {
"SENDMUX_API_KEY": "${input:sendmux-mbx-key}"
}
}
}
}
Local HTTP bearer:
{
"inputs": [
{
"type": "promptString",
"id": "sendmux-mcp-token",
"description": "Sendmux local MCP bearer token",
"password": true
}
],
"servers": {
"sendmuxLocalHttp": {
"type": "http",
"url": "http://127.0.0.1:8765/mcp",
"headers": {
"Authorization": "Bearer ${input:sendmux-mcp-token}"
}
}
}
}
Hosted remote OAuth:
{
"servers": {
"sendmux": {
"type": "http",
"url": "https://mcp.sendmux.ai/mcp"
}
}
}
GitHub Copilot CLI can add servers interactively with /mcp add or non-interactively:
copilot mcp add sendmux-mailbox -- sendmux-mcp-mailbox
copilot mcp add --transport http sendmux https://mcp.sendmux.ai/mcp
copilot mcp add --transport http sendmux-local-http http://127.0.0.1:8765/mcp \
--header "Authorization: Bearer $SENDMUX_MCP_HTTP_BEARER_TOKEN"
Gemini CLI
Gemini CLI reads mcpServers from settings.json.
Local stdio:
{
"mcpServers": {
"sendmux-mailbox": {
"command": "sendmux-mcp-mailbox",
"env": {
"SENDMUX_API_KEY": "$SENDMUX_MBX_KEY"
},
"trust": false
}
}
}
Hosted remote OAuth:
{
"mcpServers": {
"sendmux": {
"httpUrl": "https://mcp.sendmux.ai/mcp",
"trust": false
}
}
}
Local HTTP bearer:
{
"mcpServers": {
"sendmux-local-http": {
"httpUrl": "http://127.0.0.1:8765/mcp",
"headers": {
"Authorization": "Bearer $SENDMUX_MCP_HTTP_BEARER_TOKEN"
},
"trust": false
}
}
}
Use /mcp auth sendmux if the hosted remote endpoint needs OAuth authentication.
Verification
After adding the server:
- Restart or refresh MCP servers in the client.
- Confirm the visible tools match the selected surfaces:
- Mailbox-only: no
management_*orsending_*tools. - Management-only: no
mailbox_*orsending_*tools. - Sending-only:
sending_send_email,sending_send_email_batch, and Sending attachment tools.
- Mailbox-only: no
- Run one harmless read tool:
- Mailbox:
mailbox_get_meormailbox_get_session. - Management:
management_list_domainswith a small limit. - Sending: list tools only unless the user confirms a real send.
- Mailbox:
- If local HTTP returns
401, check the clientAuthorizationheader againstSENDMUX_MCP_HTTP_BEARER_TOKEN. - If the process exits before connecting, check the Sendmux key prefix for the selected surface.
Routing
- First Sendmux API setup or first call:
sendmux-getting-started. - Sending body shape or send strategy:
sendmux-send-email. - Mailbox read, search, sync, triage, or reply:
sendmux-mailbox-agent. - Attachment file paths, presigned uploads, and download URLs:
sendmux-attachments. - Account-level management strategy:
sendmux-management. - Terminal command mechanics:
sendmux-cli. - Cheapest-call doctrine:
sendmux-token-efficient-usage.
Gives 0 of the 12 instructions most project setup skills give in ~3.0k tokens
Counted across 999 of the 1,637 authors here whose files we hold, read 2026-08-06
- ask one question at a timein 29 of 999, across 28 files
- detect the package manager from lockfilesin 28 of 999, across 9 files
- present findings to the userin 25 of 999, across 4 files
- explore current repo statein 24 of 999, across 3 files
- update the agent skills block in place if it existsin 24 of 999, across 3 files
- install husky lint-staged and prettierin 23 of 999, across 4 files
- create the lintstagedrc filein 22 of 999, across 3 files
- commit all changed filesin 22 of 999, across 3 files
- run lint-staged to verify it worksin 22 of 999, across 3 files
- initialize huskyin 21 of 999, across 2 files
- create the husky pre-commit filein 21 of 999, across 2 files
- create a prettierrc file if missingin 21 of 999, across 2 files
Said here and by no other author read
- prefer hosted OAuth when supported
- use scoped tokens for mailbox MCP tools
- use send-capable keys for sending MCP tools
- use root keys for management MCP tools
- use local stdio when OAuth is unsupported
- use local HTTP bearer for private servers
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.