mcpField
S
SpacePost

SpacePost

Remote
docs.spacepost.devCommunication0Updated 3d ago

About SpacePost

SpacePost is an MCP server for AI assistants working with the SpacePost transactional email API. Its tools are generated from the OpenAPI document, with hosted and local connection options and filters for API areas and permissions.

Key features

  1. 01Expose tools for API endpoints
  2. 02Send transactional emails
  3. 03Manage domains, contacts, and webhooks
  4. 04Filter tools by API area
  5. 05Restrict tools by key permissions

Use cases

  1. 01Send transactional email from an assistant
  2. 02Manage email domains and contacts
  3. 03Work with webhooks and audiences
  4. 04Limit available tools to read-only operations

MCP support

Exposes SpacePost API operations as MCP tools, generated from its OpenAPI document. Clients can connect to the hosted Streamable HTTP endpoint or run the package locally over stdio.

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttps://api.spacepost.dev/mcp
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.

All endpoints
Streamable HTTPhttps://api.spacepost.dev/mcpAuth required
Packages
npm@spacepost/mcp0.2.1

Tools

46
ParameterTypeRequiredDescription
afterstringNoReturn items older than this id (next page). Cannot be combined with `before`.
limitintegerNoNumber of items to return.
beforestringNoReturn items newer than this id (previous page). Cannot be combined with `after`.

Details

From the project 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
# hosted
claude mcp add --transport http spacepost https://api.spacepost.dev/mcp --header "Authorization: Bearer sp_live_..."
# local
claude 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)
{
  "mcpServers": {
    "spacepost": { "url": "https://api.spacepost.dev/mcp", "headers": { "Authorization": "Bearer sp_live_..." } }
  }
}
Claude Desktop (claude_desktop_config.json)
{
  "mcpServers": {
    "spacepost": {
      "command": "npx",
      "args": ["-y", "@spacepost/mcp"],
      "env": { "SPACEPOST_API_KEY": "sp_live_...", "SPACEPOST_DEFAULT_FROM": "Acme <[email protected]>" }
    }
  }
}
Docker
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):

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

bun install
bun run build     # dist/index.js, spec included
bun test
bun 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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.