SpacePost

dev.spacepost由 spacepost.dev 发布官方发布者v0.2.2更新于 Nov 4, 2026

Send email and manage domains, contacts and webhooks on SpacePost, the Resend-compatible email API.

已验证Streamable HTTP可网页运行沟通与协作商业与电商

概览

AI 生成的概览

SpacePost MCP 封装 SpacePost(兼容 Resend)邮件 API,让助手发送邮件并管理域名、联系人、群发和 Webhook。

可以做什么
  • 发送单封或批量邮件、定时发送,并列出、改期或取消待发邮件
  • 注册、验证、更新和删除发信域名,并返回所需 DNS 记录
  • 管理受众及其联系人,以及退信抑制名单和租户
  • 创建、修改、删除群发,并发送或定时发送,发送前可做送达率就绪检查
  • 管理 API 密钥和 Webhook
  • 可按 API 区域、只读模式或仅发送权限筛选暴露的工具
适用场景
适合让助手通过 SpacePost 起草并发送事务性邮件或群发邮件,或在对话中查看和配置账户的域名、受众、联系人和 Webhook。
运行要求
需要 SpacePost 账户和在控制台创建的 API 密钥(sp_live_...),通过 SPACEPOST_API_KEY 或 Authorization bearer 头传入。可作为托管 Streamable HTTP 端点使用,也可用 npx @spacepost/mcp 以 stdio 在本地运行,本地包内置规范可离线启动。可选配置包括默认发件人、基础地址、只读模式、工具集和权限。
安装前请注意
助手拥有该密钥的全部权限,full_access 密钥可创建和删除域名、API 密钥、Webhook、受众和联系人,并可发信。发信按收件人计入配额,群发会发送给该受众所有已订阅联系人。创建 API 密钥时令牌只返回一次。删除受众会同时删除其联系人。不需要写入时建议使用 sending_access 或只读配置。

安装

在 SourceWeft 中

  1. 打开 控制台中的 SpacePost,将其添加到工作区。
  2. 连接 Authorization token 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/dev.spacepost%2Fmcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "spacepost": {
      "type": "http",
      "url": "https://api.spacepost.dev/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_TOKEN>"
      }
    }
  }
}

README

[SpacePost]

@spacepost/mcp

[SpacePost MCP server on Glama]

An MCP server that gives AI assistants the whole SpacePost API: one tool per endpoint of the API reference, generated from the OpenAPI document. New API features become MCP tools automatically. Docs: https://docs.spacepost.dev/tools/mcp/

SpacePost is a Resend-compatible transactional email API on Amazon SES (EU company), with an SMTP relay and this MCP server.

Two ways to use it:

  • Hosted: https://api.spacepost.dev/mcp (Streamable HTTP) with Authorization: Bearer sp_live_.... Nothing to install.
  • Local (this package): npx -y @spacepost/mcp, stdio. The spec is bundled, so it starts offline.

Create an API key in the SpacePost dashboard. In the official MCP Registry the server is dev.spacepost/mcp; on npm it is @spacepost/mcp.

Configuration

Env
SPACEPOST_API_KEYRequired. The assistant has exactly this key's permissions (sending_access keys can only send).
SPACEPOST_BASE_URLOptional, default https://api.spacepost.dev
SPACEPOST_DEFAULT_FROMOptional sender (e.g. Acme <[email protected]>) used when send_email has no from
SPACEPOST_READ_ONLYtrue = --read-only
SPACEPOST_TOOLSETS= --toolsets
SPACEPOST_PERMISSION= --permission
Flag
--read-onlyOnly tools for GET endpoints
--toolsets a,bOnly these API areas (OpenAPI tags): emails, domains, apikeys, webhooks, audiences, contacts, broadcasts, suppressions, tenants
--permission sending_accessOnly tools a send-only key can use (operations with x-permission: sending_access)
--list-toolsPrint the tools for the given options and exit
--help, --version

The hosted endpoint takes the same options as query parameters: /mcp?read_only=true&toolsets=emails,domains. It derives the permission filter from the caller's key: sending_access keys see only the sending tools in tools/list. Other tools are not blocked by MCP; calling one goes to the API, which answers restricted_api_key as it does for REST.

Claude Code

bash
# hostedclaude mcp add --transport http spacepost https://api.spacepost.dev/mcp --header "Authorization: Bearer sp_live_..."# localclaude mcp add spacepost -e SPACEPOST_API_KEY=sp_live_... -e SPACEPOST_DEFAULT_FROM="Acme <[email protected]>" -- npx -y @spacepost/mcp

Cursor (~/.cursor/mcp.json or .cursor/mcp.json)

json
{  "mcpServers": {    "spacepost": { "url": "https://api.spacepost.dev/mcp", "headers": { "Authorization": "Bearer sp_live_..." } }  }}

Claude Desktop (claude_desktop_config.json)

json
{  "mcpServers": {    "spacepost": {      "command": "npx",      "args": ["-y", "@spacepost/mcp"],      "env": { "SPACEPOST_API_KEY": "sp_live_...", "SPACEPOST_DEFAULT_FROM": "Acme <[email protected]>" }    }  }}

Docker

bash
docker build -t spacepost-mcp .docker run -i --rm -e SPACEPOST_API_KEY=sp_live_... spacepost-mcp

The image builds the server from this repo's source and runs it over stdio as a non-root user. The key is read from the environment at runtime; nothing is baked into the image.

How tools are built

  • Name: operationId in snake_case (sendEmail → send_email, getBroadcastReadiness → get_broadcast_readiness). The 12 hand-written tools of 0.1 keep their names.
  • Input: one flat JSON Schema object with path params (snake_case: audience_id, id_or_email), query params, header params (Idempotency-Key → idempotency_key) and the top-level JSON body fields. A body field that collides with a parameter name is exposed as body_<field>; a non-object body (the batch array) as body. $ref/allOf are inlined; enums, formats, patterns, bounds, defaults and descriptions are kept.
  • Description: summary + description from the spec, curated extras, the key permission and the HTTP route.
  • Annotations: GET → readOnlyHint; DELETE → destructiveHint; GET/PUT/DELETE → idempotentHint; overridable per operation.
  • Result: the API's JSON (text + structuredContent). Errors: isError: true with the Resend-style { statusCode, name, message } body and a hint.

Tuning a tool

Tools follow the API's OpenAPI document. Operations carry these extensions (set by SpacePost in the spec):

yaml
x-mcp: { hidden: false, description: "Extra guidance for agents.", destructive: true, idempotent: true, openWorld: true }x-permission: sending_access # only on operations a sending_access key may call

src/overlay.ts (keyed by operationId) holds the few curated descriptions that are about using a tool well rather than the API itself; x-mcp wins when both set a field.

Development

bash
bun installbun run build     # dist/index.js, spec includedbun testbun run generate  # refresh src/generated/openapi.json from https://api.spacepost.dev/openapi.json

Issues and pull requests are welcome. Security reports: [email protected].

0.2 breaking changes: results are the raw API JSON instead of short text summaries, and verify_domain returns the verify response (call get_domain for the new status).

License

MIT, see LICENSE. © Studio 404 d.o.o.

来源:README.md,提交 eeb7307

工具

46

list_emails

List emails

List emails. Returns sent and scheduled emails, newest first, without bodies. Requires a `full_access` API key. API: `GET /emails` (operationId `listEmails`, Emails).

输入参数afterlimitbefore

send_email

Send an email

Send an email. Validates and queues one email. Each recipient counts towards your quota. Use `scheduled_at` to send later (up to 30 days ahead). Pass `tenant_id` to send on behalf of a tenant (not needed when the `from` domain belongs to one). Fails with `422` if `tenant_id` conflicts with the domain's tenant, `403 sending_paused` if the tenant is paused and `429 daily_quota_exceeded` if it reached its daily cap. `from` must be on a verified domain (e.g. "Acme <[email protected]>"); call list_domains to find one. Provide `html`, `text` or both. Send to [email protected] (or bounced@ / complained@) to test without sending real mail. Delivered email cannot be recalled: confirm recipients and content with the user when unsure. Pass `idempotency_key` when retrying so the email is not sent twice. Request body: Either `html` or `text` is required. `reply_to` is also accepted as `replyTo` and `scheduled_at` as `scheduledAt`. Works with a `sending_access` or `full_access` API key. API: `POST /emails` (operationId `sendEmail`, Emails).

输入参数ccto必填bccfrom必填htmltagstextheaderssubject必填reply_totenant_idattachments另有 2 个

send_batch_emails

Send batch emails

Send batch emails. Sends up to 100 emails in one call. All-or-nothing, if any email is invalid none are sent. Attachments, `scheduled_at` and a per-email `tenant_id` are supported; the paused-tenant and tenant-cap errors apply to the whole batch. Put the emails in `body` as an array. Prefer send_email for a single message. Works with a `sending_access` or `full_access` API key. API: `POST /emails/batch` (operationId `sendBatchEmails`, Emails).

输入参数body必填idempotency_key

get_email

Retrieve an email

Retrieve an email. Requires a `full_access` API key. API: `GET /emails/{id}` (operationId `getEmail`, Emails).

输入参数id必填

update_email

Reschedule an email

Reschedule an email. Changes `scheduled_at` of an email that is still `scheduled`. Requires a `full_access` API key. API: `PATCH /emails/{id}` (operationId `updateEmail`, Emails).

输入参数id必填scheduled_at必填

cancel_email

Cancel a scheduled email

Cancel a scheduled email. Requires a `full_access` API key. API: `POST /emails/{id}/cancel` (operationId `cancelEmail`, Emails).

输入参数id必填

list_domains

List domains

List domains. Requires a `full_access` API key. API: `GET /domains` (operationId `listDomains`, Domains).

输入参数afterlimitbefore

create_domain

Create a domain

Create a domain. Registers a domain and returns the DNS records to add (three DKIM CNAMEs, plus MX and SPF on the MAIL FROM subdomain). Domain names are globally unique. The number of domains is limited by your plan (Free 3, Pro 10, Scale 1,000). The response lists the DNS records (DKIM CNAMEs, MAIL FROM MX and SPF TXT) the user must add at their DNS provider; afterwards call verify_domain and then get_domain to see the new status. DNS changes can take minutes to hours. Requires a `full_access` API key. API: `POST /domains` (operationId `createDomain`, Domains).

输入参数name必填regiontenant_idcustom_return_path

get_domain

Retrieve a domain

Retrieve a domain. Requires a `full_access` API key. API: `GET /domains/{id}` (operationId `getDomain`, Domains).

输入参数id必填

update_domain

Update a domain

Update a domain. Toggles open and click tracking. Requires a `full_access` API key. API: `PATCH /domains/{id}` (operationId `updateDomain`, Domains).

输入参数id必填tlsopen_trackingclick_tracking

delete_domain

Delete a domain

Delete a domain. Requires a `full_access` API key. API: `DELETE /domains/{id}` (operationId `deleteDomain`, Domains).

输入参数id必填

verify_domain

Verify a domain

Verify a domain. Re-checks DNS now. Retrieve the domain afterwards to read the new `status` and per-record statuses. Requires a `full_access` API key. API: `POST /domains/{id}/verify` (operationId `verifyDomain`, Domains).

输入参数id必填

list_api_keys

List API keys

List API keys. Requires a `full_access` API key. API: `GET /api-keys` (operationId `listApiKeys`, API Keys).

输入参数afterlimitbefore

create_api_key

Create an API key

Create an API key. The `token` is returned only in this response. Requires a `full_access` API key. API: `POST /api-keys` (operationId `createApiKey`, API Keys).

输入参数name必填domain_idpermission

delete_api_key

Delete an API key

Delete an API key. The key stops working immediately. The response body is an empty object. Requires a `full_access` API key. API: `DELETE /api-keys/{id}` (operationId `deleteApiKey`, API Keys).

输入参数id必填

list_webhooks

List webhooks

List webhooks. Requires a `full_access` API key. API: `GET /webhooks` (operationId `listWebhooks`, Webhooks).

输入参数afterlimitbefore

create_webhook

Create a webhook

Create a webhook. In production the endpoint must use https and resolve to a public address. Requires a `full_access` API key. API: `POST /webhooks` (operationId `createWebhook`, Webhooks).

输入参数events必填endpoint必填

get_webhook

Retrieve a webhook

Retrieve a webhook. Requires a `full_access` API key. API: `GET /webhooks/{id}` (operationId `getWebhook`, Webhooks).

输入参数id必填

update_webhook

Update a webhook

Update a webhook. Requires a `full_access` API key. API: `PATCH /webhooks/{id}` (operationId `updateWebhook`, Webhooks).

输入参数id必填eventsstatusendpoint

delete_webhook

Delete a webhook

Delete a webhook. Requires a `full_access` API key. API: `DELETE /webhooks/{id}` (operationId `deleteWebhook`, Webhooks).

输入参数id必填

list_audiences

List audiences

List audiences. Requires a `full_access` API key. API: `GET /audiences` (operationId `listAudiences`, Audiences).

输入参数afterlimitbefore

create_audience

Create an audience

Create an audience. Requires a `full_access` API key. API: `POST /audiences` (operationId `createAudience`, Audiences).

输入参数name必填

get_audience

Retrieve an audience

Retrieve an audience. Requires a `full_access` API key. API: `GET /audiences/{id}` (operationId `getAudience`, Audiences).

输入参数id必填

delete_audience

Delete an audience

Delete an audience. Also deletes its contacts. Requires a `full_access` API key. API: `DELETE /audiences/{id}` (operationId `deleteAudience`, Audiences).

输入参数id必填

list_contacts

List contacts

List contacts. Requires a `full_access` API key. API: `GET /audiences/{audienceId}/contacts` (operationId `listContacts`, Contacts).

输入参数afterlimitbeforeaudience_id必填

create_contact

Create a contact

Create a contact. Emails are lower-cased. An address can only appear once per audience. Requires a `full_access` API key. API: `POST /audiences/{audienceId}/contacts` (operationId `createContact`, Contacts).

输入参数email必填last_namefirst_nameaudience_id必填unsubscribed

get_contact

Retrieve a contact

Retrieve a contact. Requires a `full_access` API key. API: `GET /audiences/{audienceId}/contacts/{idOrEmail}` (operationId `getContact`, Contacts).

输入参数audience_id必填id_or_email必填

update_contact

Update a contact

Update a contact. Requires a `full_access` API key. API: `PATCH /audiences/{audienceId}/contacts/{idOrEmail}` (operationId `updateContact`, Contacts).

输入参数last_namefirst_nameaudience_id必填id_or_email必填unsubscribed

delete_contact

Delete a contact

Delete a contact. Requires a `full_access` API key. API: `DELETE /audiences/{audienceId}/contacts/{idOrEmail}` (operationId `deleteContact`, Contacts).

输入参数audience_id必填id_or_email必填

list_broadcasts

List broadcasts

List broadcasts. Requires a `full_access` API key. API: `GET /broadcasts` (operationId `listBroadcasts`, Broadcasts).

输入参数afterlimitbefore

create_broadcast

Create a broadcast

Create a broadcast. Creates a draft. The `from` address must belong to a verified domain of your team and `audience_id` to one of your audiences. Requires a `full_access` API key. API: `POST /broadcasts` (operationId `createBroadcast`, Broadcasts).

输入参数from必填htmlnametextsubject必填reply_toaudience_id必填preview_text

get_broadcast

Retrieve a broadcast

Retrieve a broadcast. Requires a `full_access` API key. API: `GET /broadcasts/{id}` (operationId `getBroadcast`, Broadcasts).

输入参数id必填

update_broadcast

Update a broadcast

Update a broadcast. Only drafts can be updated. Request body: Any field of the create request; only drafts can be updated. Requires a `full_access` API key. API: `PATCH /broadcasts/{id}` (operationId `updateBroadcast`, Broadcasts).

输入参数id必填fromhtmlnametextsubjectreply_toaudience_idpreview_text

delete_broadcast

Delete a broadcast

Delete a broadcast. Only drafts and broadcasts that are scheduled for the future can be deleted. Requires a `full_access` API key. API: `DELETE /broadcasts/{id}` (operationId `deleteBroadcast`, Broadcasts).

输入参数id必填

get_broadcast_readiness

Check a broadcast before sending

Check a broadcast before sending. SpacePost extension (not part of Resend). Returns a deliverability checklist: sender domain and DMARC, subject, Gmail clipping (HTML over 102 KB), image-heavy bodies, link shorteners, spam phrases, unsubscribe link and audience quality. `ready` is false when any check has level `error`; `POST /broadcasts/{id}/send` is then refused with `validation_error`. Warnings never block a send. Requires a `full_access` API key. API: `GET /broadcasts/{id}/readiness` (operationId `getBroadcastReadiness`, Broadcasts).

输入参数id必填

send_broadcast

Send or schedule a broadcast

Send or schedule a broadcast. Queues a draft for delivery to every subscribed contact of its audience. The broadcast needs `html` or `text`. Without `scheduled_at` it starts immediately; the status becomes `queued`, then `sending` and `sent`. Sends to every subscribed contact in the audience. Run get_broadcast_readiness first and confirm with the user. Requires a `full_access` API key. API: `POST /broadcasts/{id}/send` (operationId `sendBroadcast`, Broadcasts).

输入参数id必填scheduled_at

list_suppressions

List suppressions

List suppressions. Requires a `full_access` API key. API: `GET /suppressions` (operationId `listSuppressions`, Suppressions).

输入参数afterlimitbefore

create_suppression

Add a suppression

Add a suppression. Adds the address with reason `manual`. Adding an address that is already suppressed returns the existing entry. Requires a `full_access` API key. API: `POST /suppressions` (operationId `createSuppression`, Suppressions).

输入参数email必填

delete_suppression

Remove a suppression

Remove a suppression. Requires a `full_access` API key. API: `DELETE /suppressions/{idOrEmail}` (operationId `deleteSuppression`, Suppressions).

输入参数id_or_email必填

list_tenants

List tenants

List tenants. Requires a `full_access` API key. API: `GET /tenants` (operationId `listTenants`, Tenants).

输入参数afterlimitbefore

create_tenant

Create a tenant

Create a tenant. Creates one of your customers, with its own SES tenant (isolated reputation). `external_id` must be unique within your account. Requires a `full_access` API key. API: `POST /tenants` (operationId `createTenant`, Tenants).

输入参数name必填daily_limitexternal_id

get_tenant

Retrieve a tenant

Retrieve a tenant. Requires a `full_access` API key. API: `GET /tenants/{ref}` (operationId `getTenant`, Tenants).

输入参数ref必填

update_tenant

Update a tenant

Update a tenant. Changes the name, `external_id` or `daily_limit` (`null` removes the cap). Requires a `full_access` API key. API: `PATCH /tenants/{ref}` (operationId `updateTenant`, Tenants).

输入参数ref必填namedaily_limitexternal_id

delete_tenant

Delete a tenant

Delete a tenant. Fails with `422` while the tenant still has domains; delete those first. Requires a `full_access` API key. API: `DELETE /tenants/{ref}` (operationId `deleteTenant`, Tenants).

输入参数ref必填

pause_tenant

Pause a tenant

Pause a tenant. Stops all sending for the tenant. Sends return `403 sending_paused`; emails already queued fail. The body is optional. Requires a `full_access` API key. API: `POST /tenants/{ref}/pause` (operationId `pauseTenant`, Tenants).

输入参数ref必填reason

unpause_tenant

Unpause a tenant

Unpause a tenant. Resumes sending. A tenant that was paused by the reputation guard (bounce or complaint rate) can only be unpaused by a `trusted` or `internal` team; others get `403 invalid_access` and should contact support. Requires a `full_access` API key. API: `POST /tenants/{ref}/unpause` (operationId `unpauseTenant`, Tenants).

输入参数ref必填

版本历史

3
  1. v0.2.2最新Nov 4, 2026
  2. v0.2.2-1Oct 30, 2026
  3. v0.2.1Oct 29, 2026

评分

已满足适用检查项的 100%

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

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Spacepost 集成