Skip to main content

MCP Server

The Zyphr MCP Server lets any MCP-compatible AI client call Zyphr directly — sending emails, push notifications, SMS, and in-app messages, rendering templates, managing subscribers, and inspecting webhook deliveries — all from inside the model loop. No bespoke wrapper code required.

Model Context Protocol is an open standard for connecting AI assistants to external tools and data. If your AI client speaks MCP, this server plugs Zyphr in.

Install

npx -y @zyphr-dev/mcp-server

The binary is also exposed as zyphr-mcp when installed as a dependency.

Configure

Add the server to your MCP client's configuration:

{
"mcpServers": {
"zyphr": {
"command": "npx",
"args": ["-y", "@zyphr-dev/mcp-server"],
"env": {
"ZYPHR_API_KEY": "zy_test_..."
}
}
}
}

End users always point at production (https://api.zyphr.dev/v1) using either a zy_test_* or zy_live_* key from the Zyphr Dashboard.

Environment variables

VariableRequiredDefaultNotes
ZYPHR_API_KEYYeszy_live_* or zy_test_*
ZYPHR_BASE_URLNohttps://api.zyphr.dev/v1Override for non-production environments
ZYPHR_READ_ONLYNofalseWhen true, mutating tools are not registered
ZYPHR_ALLOWED_TOOLSNo(all)Comma-separated whitelist of tool names. Overrides ZYPHR_READ_ONLY

The server fails fast with a clear stderr message if ZYPHR_API_KEY is missing.

Tools

Integration (zero-to-first-send helpers)

ToolDescription
get_sdk_install_for_languageReturns install commands, init snippet, env vars, and a docs link for the chosen language (node, python, ruby, go, php, csharp). Pass an optional packageManager (e.g. yarn, poetry) to narrow to a single command.
get_quickstart_for_channelReturns drop-in service file(s) for the chosen channel (email, push, sms, inbox, webhook), language, and optional framework (express, nextjs, flask, fastapi, rails, laravel, aspnetcore). Webhook handlers always verify the HMAC signature; unknown framework hints fall back to plain SDK code.

Send

ToolDescription
send_emailSend a transactional email. Supports inline html/text or templateId + templateData.
send_pushSend a push notification to a user, device, or subscriber.
send_smsSend an SMS message (E.164 recipient).
send_inbox_messageDeliver an in-app inbox message to a subscriber.

Templates

ToolDescription
list_templatesList templates in the account.
get_templateFetch a single template by ID.
render_templatePreview a template with the given variables without sending. Returns the rendered subject/html/text.
create_templateCreate a new template.

Subscribers

ToolDescription
find_subscriberLook up a subscriber by external ID.
list_subscribersList subscribers (filter by status or email).
create_subscriberCreate a new subscriber.
update_subscriberUpdate a subscriber. Pass null for email/phone/name/avatarUrl to clear them.
set_subscriber_preferencesSet notification preferences for a subscriber.

Webhooks

ToolDescription
list_webhooksList configured webhook endpoints.
create_webhookRegister a new webhook endpoint subscribed to one or more event types.
get_webhook_deliveriesInspect delivery history for a webhook (filter by status, event type, or date range).

Safety

Two environment variables let you scope what the AI is allowed to do:

  • ZYPHR_READ_ONLY=true suppresses every mutating tool (sends, creates, updates). Only the read-only tools (list_*, get_*, find_*, render_template, get_webhook_deliveries) remain. Use this when you want the AI to investigate or report without touching state.
  • ZYPHR_ALLOWED_TOOLS="tool_a,tool_b" is a comma-separated whitelist. When set, only those tools are registered. The whitelist takes precedence over ZYPHR_READ_ONLY, so you can explicitly allow a mutating tool inside an otherwise read-only profile.

No delete_* tools are exposed in this release. Destructive operations remain dashboard-only.

Example prompts

Once connected, your AI client can act on prompts like:

  • "I'm starting a new Node project and want to use Zyphr — what do I install?" → calls get_sdk_install_for_language
  • "Add Zyphr email to my Express app." → calls get_quickstart_for_channel
  • "Show me how to verify a Zyphr webhook in a FastAPI route." → calls get_quickstart_for_channel, returns a handler with HMAC verification
  • "Send a welcome email to alice@example.com with subject 'Welcome to Acme' and a short HTML greeting."
  • "Preview the welcome email template with name='Alice' and verify that the verify link is included."
  • "Look up the subscriber for external ID user_123 and update their email preferences for marketing to false."
  • "Push a notification titled 'Order shipped' to subscriber usr_42."
  • "Send an SMS to +14155551234 confirming their appointment."
  • "Drop an inbox message for subscriber usr_42 with title 'New report ready' and an action URL to the report page."
  • "Show me the last 20 webhook deliveries for webhook whk_abc that failed in the past hour and tell me why."

Errors from the Zyphr API are surfaced verbatim as MCP errors, so the AI can react to validation failures, rate limits, or auth problems without guessing.

Package & versioning