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 整合