@apinator/mcp
OfficialThis server lets an AI agent publish events, inspect channels, sign subscriptions, and watch live realtime traffic on your Apinator app.
Publish events (
publish_event) to one channel or up to 100 at once, with JSON or string payloads and an optionalsocket_idto exclude the sender.List active channels (
list_channels) with subscriber counts, optionally filtered by name prefix.Get a single channel's (
get_channel) subscriber count or inactive status.Sign subscription auth (
sign_channel_auth) forprivate-/presence-channels, includingchannel_datafor presence members.Watch a channel live (
watch_channel) over WebSocket for up to 60 seconds, auto-signing private/presence auth, collecting events and reporting progress.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@apinator/mcp Publish a test event to the orders channel and watch for it."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@apinator/mcp
Model Context Protocol server for Apinator. It lets an AI agent (Claude Code, Claude Desktop, Cursor, …) publish events, inspect channels, watch live traffic and set up webhooks on your Apinator app, so it can build and debug realtime features end to end.
Setup
You need your app's ID, key, secret and cluster from the Apinator console. Node.js 18 or newer.
Claude Code
claude mcp add apinator \
-e APINATOR_APP_ID=your-app-id \
-e APINATOR_KEY=your-key \
-e APINATOR_SECRET=your-secret \
-e APINATOR_CLUSTER=eu \
-- npx -y @apinator/mcpClaude Desktop, Cursor and other clients (mcpServers JSON config)
{
"mcpServers": {
"apinator": {
"command": "npx",
"args": ["-y", "@apinator/mcp"],
"env": {
"APINATOR_APP_ID": "your-app-id",
"APINATOR_KEY": "your-key",
"APINATOR_SECRET": "your-secret",
"APINATOR_CLUSTER": "eu"
}
}
}
}Environment variables
Variable | Required | Description |
| yes | App ID |
| yes | API key |
| yes | API secret. Used to sign requests; never returned by any tool |
| yes | Region the app was created in, e.g. |
| no |
|
| no | REST base URL of a local or self-hosted data plane (default |
| no | WebSocket base URL of a local or self-hosted data plane (default |
| no | Base URL of a local or self-hosted control plane, used by the webhook tools (default |
The server checks these at startup and exits with a message naming anything missing or malformed.
Related MCP server: console-stream-mcp
Tools
Tool | What it does |
| Publish an event to a channel, or up to 100 channels. |
| Active channels (with at least one subscriber) and their subscriber counts, optionally filtered by |
| One channel's subscriber count, or |
| The |
| The app's webhook endpoints (max 10): id, URL, events, enabled. Signing secrets are never listed. |
| Register an endpoint |
| Change an endpoint's |
| Delete an endpoint. Not available in read-only mode. |
| Send one signed |
| Recent deliveries to one endpoint (status, attempts, last error), optionally filtered by |
| Connects over WebSocket, subscribes (signing private/presence auth itself), and collects events for |
list_channels, get_channel, sign_channel_auth, watch_channel, list_webhooks and
list_webhook_deliveries are annotated readOnlyHint, so clients can auto-approve them;
delete_webhook is annotated destructiveHint.
A typical end-to-end check an agent runs: start watch_channel on a channel, trigger the code path
that publishes (or call publish_event), and compare the payload with what the client expects.
On cache- channels the last event is replayed to new subscribers, so a watch started after a publish
still receives it.
Webhooks
The webhook tools call the control plane (https://api.apinator.io), signed with the same app key and
secret, and only ever touch this app's endpoints. A typical setup: add a POST route that verifies the
raw body with verifyWebhook from the server SDK and returns 2xx, add_webhook with its public URL, store
the returned secret as APINATOR_WEBHOOK_SECRET, then test_webhook. Webhook URLs must be reachable from
the internet; private and loopback addresses are refused, so expose a local dev server with a tunnel
(cloudflared, ngrok). Secret rotation and delivery retries stay in the console.
Resources and prompts
apinator://docs/llms.txt: the Apinator docs index, fetched from https://apinator.io/llms.txt.apinator://reference/protocol: frames, system events, error codes, channel types and the auth signature.Prompt
add-realtime-feature: walks the agent through choosing channels, wiring the server and client SDKs, verifying withwatch_channel, and adding a webhook receiver when the backend needs one.
Security
The secret stays in the server process. Tool results and errors are scrubbed of it, and API error bodies are shortened to a one-line message.
publish_eventreaches every subscriber of the channel. SetAPINATOR_READ_ONLY=1for an agent that should only look, or use a separate app for development.sign_channel_authproduces valid subscription signatures for any channel name. Only give the server to agents you would trust with your app's auth endpoint.The app secret can manage the app's webhooks. Anyone holding it can point an endpoint at their own URL and receive channel names and presence
user_ids from then on, so treat it like any server secret. It cannot read an existing endpoint's signing secret (onlyadd_webhookreturns one, once), so it cannot forge deliveries to a receiver you already set up.APINATOR_READ_ONLY=1removes every webhook write tool.
Development
npm install
npm run build
npm test # unit tests (mocked fetch, local fake WebSocket server)
npm run typecheck # src and testsReleases are cut by release-please from Conventional
Commits on main; the release PR bumps package.json, updates CHANGELOG.md and tags, and the
workflow then publishes to npm.
Maintainers with the Apinator backend checked out next to this repo (../../backend, or set
BACKEND_DIR) can run the integration test and the MCP inspector against a throwaway local stack:
./scripts/local-stack.sh up # builds the backend, starts Postgres/Redis in Docker on spare ports, seeds an app
npm run build && npm run test:integration
./scripts/local-stack.sh downlocal-stack.sh up writes the local credentials to .local-stack/env. It also sets
APINATOR_API_URL, APINATOR_WS_URL and APINATOR_CONTROL_URL, which point the server at a
non-production stack. Its control plane allows private webhook targets, so the integration test can
register a receiver on localhost.
License
MIT
Available Tools
11 toolsadd_webhookAdd webhookA
Register a webhook endpoint that receives signed POSTs for the chosen events. Returns the endpoint and its whsec_ signing secret, shown only this once: put it in the receiving app's environment (e.g. APINATOR_WEBHOOK_SECRET) and verify each request with verifyWebhook from the server SDK. An app can have at most 10 endpoints; adding a URL that is already registered is refused (use edit_webhook instead).
Inputs: url (required), events (required).
delete_webhookDelete webhookADestructiveIdempotent
Delete a webhook endpoint. It stops receiving events at once, and its pending deliveries are dropped.
Inputs: webhook_id (required).
edit_webhookEdit webhookAIdempotent
Change a webhook endpoint's URL, events, or enabled state. Pass only what changes. The signing secret stays the same.
Inputs: webhook_id (required), url, events, enabled.
get_channelGet channelBRead-only
Get one channel's subscriber count. Reports active: false when nobody is subscribed to it.
Inputs: channel (required).
list_channelsList channelsARead-only
List the app's active channels (channels with at least one subscriber right now) and their subscriber counts. Channels that nobody is subscribed to are not listed, even if events were published to them.
Inputs: prefix.
list_webhook_deliveriesList webhook deliveriesARead-only
Recent deliveries to one webhook endpoint, newest first: event, payload, status, attempts and the last error. Use it to check that events reach your receiver, or why they fail. Failed deliveries are retried 7 times over about 9 hours; delivered and failed ones are kept 7 days.
Inputs: webhook_id (required), limit, status.
list_webhooksList webhooksARead-only
List the app's webhook endpoints (at most 10 per app): id, URL, events and whether each is enabled. Signing secrets are never listed; add_webhook shows a new endpoint's secret once.
Inputs: no named parameters.
publish_eventPublish eventA
Publish an event to one or more Apinator channels. Every client subscribed to those channels receives it immediately. On cache- channels the event is also stored and replayed to future subscribers. Pass exactly one of channel or channels.
Inputs: data (required), name (required), channel, channels, +1 more.
sign_channel_authSign channel authARead-only
Compute the auth signature a client needs to subscribe to a private- or presence- channel, exactly as your auth endpoint would return it. Useful for testing an auth flow or debugging a signature mismatch. Presence channels need channel_data with a user_id.
Inputs: channel (required), socket_id (required), channel_data.
test_webhookTest webhookA
Send one signed webhook.test event to an endpoint now and report the receiver's HTTP status and timing. Redirects are not followed. The test event is not queued or retried, and real events never use this type.
Inputs: webhook_id (required).
watch_channelWatch channelARead-only
Subscribe to a channel over WebSocket and collect the events that arrive for a few seconds, then disconnect. Use it to confirm events are flowing, see payload shapes, or test a publish end to end (start the watch, then publish). Private and presence channels are signed automatically. On presence channels the watcher joins as a member, which other subscribers will see. Long watches report progress every few seconds.
Inputs: channel (required), seconds, max_events, channel_data, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Webhook tools are cleanly partitioned by action (list/add/edit/delete/test/deliveries), and channel tools are similarly distinct (list/get, publish, sign auth, watch). There is little overlap; even the observability tools target different resources, such as webhook deliveries versus live channel events.
Every tool follows a snake_case verb-first pattern with resource-oriented nouns: list_webhooks, add_webhook, edit_webhook, publish_event, sign_channel_auth, watch_channel. Singular/plural usage is consistent with get/list semantics, and there are no mixed conventions.
The 11 tools map well to the domain: webhook lifecycle and delivery inspection plus channel listing, publishing, auth signing, and live watching. Each tool has a clear role, with no obvious filler or missing lightweight operation forcing extra calls.
Webhook coverage is essentially full CRUD plus testing and delivery inspection; channel coverage includes listing, lookup, publishing, auth signing, and live watching. Minor gaps remain, such as no single-webhook getter beyond list_webhooks or event-history retrieval, but core workflows are covered.
Maintenance
Related MCP Connectors
Create and manage Hibira realtime apps (Pusher protocol compatible) from your AI agent.
Webhooks for AI agents: send events, manage endpoints, inspect and retry deliveries.
Capture, inspect, send and assert on webhooks and inbound email from your coding agent.
Build, test and publish agentic workflows from your AI client: approve steps, read tables, see runs.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceReal-time observability dashboard for monitoring AI agents in multi-agent development workflows, with live WebSocket updates of tool calls, sessions, and usage statistics.-
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents to access live console logs, errors, and network requests from web applications via a local WebSocket connection, without copying data to chat.19MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to browse, click, and debug real websites in the user's own signed-in browser or a dedicated Chrome instance, with only explicitly shared tabs reachable and revocable at any time. Exposes the full developer toolbox — console, network, sources, debugger, elements, performance and CPU/memory profiling, storage, service workers, coverage, emulation, accessibility, security, Lighthouse, and Playwright-test recording — as first-class tools callable in one step.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to publish and read events on channels, notify humans, and ask yes/no, multiple-choice, or free-text questions, returning answers as tool results.5 npmMIT