MCP Events Demo
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP Events Demo
A real MCP Events publisher, built with the official TypeScript SDK, that you can connect to MCPJam or another compatible client.
Try the hosted demo · Official SDK Events PR
Hosted MCP endpoint: https://mcp-events.mcpjam.com/mcp. Create a session on the home page to get its Authorization header.
Jensen comeback show
The Node server can host a four-clip MCP App and publish the beta event jensen.returned.
In MCPJam Playground, connect the server, select open_show, and click Run.
Click Start the show. At the mid-bite pause the app calls cue_scene with
stage and plays the entrance when the publisher acknowledges it. Check
Play the locker room after the stage clip for the timed follow-up, or click
Locker room or Wolf speech to cue a scene manually. Each cue emits
one event with a new ID, a scene and a message.
To observe independent deliveries, subscribe to jensen.returned in Events
using Poll. Leave the scene argument skipped for every scene, or set it to
stage, locker-room or wolf. In Triggers, select that hosted subscription
to run instructions on delivery. The stage player and the hosted trigger run
are independently observable.
Control room
Open /jensen on the server (for example https://mcp-events.mcpjam.com/jensen)
in a separate window. Set how long Jensen plays GTA 6 (5 seconds to 10 minutes),
choose the scene he returns to, and click Start. When the time runs out, the
server emits jensen.returned; Send now emits immediately and Cancel stops
the run without emitting. The page reuses the session created on the home page
in the same browser, or accepts a pasted bearer token. The run is stored per
session: in the Worker's Durable Object (fired by its alarm) or in memory with a
timer on the local Node server. The API is GET|POST|DELETE /jensen/run and
POST /jensen/run/emit, behind the same bearer token as /mcp.
With the show open in MCPJam, the player loops the couch clip until a tool
result carrying the event's scene reaches it, then shows the alert and plays
the return scene. It never emits events itself. npm run test:control checks
the schedule, send-now and cancel paths against a running server.
The hosted Worker includes the show and its four clips. Create a session on
the demo home page and connect to the HTTPS
endpoint using the supplied bearer header. For local development, follow
the setup below and run npm run start:show. The prepared clips are in
cloudflare/assets/media/; the MIT license applies to the server source.
Related MCP server: Signal Galaxy
Try it in MCPJam
Open the hosted demo and click Create session.
Add an HTTP server in MCPJam with the URL shown on the page.
Choose Bearer Token and paste only the token (without the
Bearerprefix). Alternatively, add a custom Authorization header with the fullBearer <token>value. Do not configure both. No OAuth login is needed.In Events, subscribe to
timer.tick. A heartbeat arrives about every 10 seconds.For manual delivery, subscribe to
demo.ping, then callemit_pingfrom Tools:
{ "message": "Hello MCPJam!", "topic": "demo" }Both event types support webhook, polling, and streaming (push). The optional topic subscription argument filters demo.ping events. Enable the desired delivery mode in your MCPJam client/host settings.
Each visitor gets an isolated 30-minute session. Keep its token private: anyone holding it can access that session. When it expires, subscriptions stop and stored session data is removed. Create another session to continue. Use synthetic test messages only.
An agent can call emit_ping just like any other MCP tool. Whether that agent automatically consumes or reacts to the event depends on the client's integration; this demo does not establish Events support across every MCPJam Playground, eval, swarm, or user-testing surface.
Official SDK version
The source is pinned as a git submodule to:
Repository:
modelcontextprotocol/typescript-sdkBranch at selection:
feature/ext-events-sep-3415Commit:
5ebb589b970bfc8f98e344e13299f8eb76ff8cd1Events implementation: PR #3209, experimental and open when selected
This is not a stable npm release of Events support. The server speaks MCP 2026-07-28 and advertises capabilities.extensions["io.modelcontextprotocol/events"]. It does not emulate the older top-level capabilities.events draft.
demo.ts uses the official EventsExtension, registerEvent, emit, and createMcpHandler APIs. The SDK handles protocol messages, subscription validation, callback verification, signatures, leases, and delivery retries. Cloudflare supplies the HTTP sender, persistent subscription storage, and scheduling through the SDK's extension points.
Run locally
Requirements: Node 24 and pnpm 10.26.1.
git clone --recurse-submodules https://github.com/MCPJam/mcp-events-demo.git
cd mcp-events-demo
nvm use
npm run setup
npm startThe setup script installs the SDK's locked workspace dependencies, builds its server/client/Node packages, and links them into the demo. Do not run a separate npm install in the root.
Connect to http://127.0.0.1:18889/mcp. On first start, the Node server generates .demo-token (gitignored, mode 0600). Set the custom HTTP header:
Authorization: Bearer <contents of .demo-token>The local Node version has a single test principal and in-memory subscriptions. It uses the SDK's nodeWebhookSender. The hosted version uses isolated sessions and Durable Object storage. Both use the same event definitions in demo.ts.
Local configuration:
Variable | Default | Purpose |
|
| Node server port |
|
| Override the local bearer credential |
|
| Smoke-test receiver; set on both Node server and test if changing it |
| Local receiver URL | Public HTTPS receiver URL for remote tests |
For temporary remote access to the local Node server, install cloudflared and run npm run tunnel. This is separate from the permanent Workers deployment.
Deploy your own Cloudflare copy
The hosted version uses a Worker and one SQLite-backed Durable Object per session. You need a Cloudflare account with Workers and Durable Objects available.
# After npm run setup:
npm --prefix cloudflare ci
cd cloudflare
npx wrangler loginChoose a unique Worker name in cloudflare/wrangler.jsonc. Remove the routes entry for MCPJam's domain, or replace it with a domain in your own Cloudflare account. Change the two rate-limit namespace IDs if those IDs already exist in your account. The config does not contain an account ID or production secrets.
npx wrangler deploy
npx wrangler secret put DEMO_SESSION_SECRETAt the secret prompt, paste a fresh random secret of at least 32 characters, for example one generated with openssl rand -hex 32. Until this secret is configured, session creation and MCP access return 503. Rotating it invalidates existing session tokens.
Wrangler prints your workers.dev address and any configured custom domain. MCPJam's deployment uses mcp-events.mcpjam.com. Share the home page, where users create their own credentials, rather than sharing one user's token. The landing page's source link points to this repository; update it for your fork if desired.
For local Cloudflare development, create cloudflare/.dev.vars with a different random secret:
DEMO_SESSION_SECRET=your-local-random-secret-at-least-32-charactersThen run npm --prefix cloudflare run dev and visit http://localhost:18891. Never commit .dev.vars or share the session-signing secret.
Automatic deployments
GitHub Actions runs the verification suite on pushes and pull requests. After a push to main passes verification, the Deploy Cloudflare production job builds and deploys that exact commit, then checks the live endpoint and session isolation. Pull requests and other branches do not deploy. Production deployments are serialized so an in-progress deployment is not cancelled halfway through.
The repository's production environment is restricted to the main branch. It needs:
Environment secret
CLOUDFLARE_API_TOKEN: a dedicated deployment token, scoped to the target Cloudflare account and custom-domain zone, with the permissions required to deploy Workers and maintain their routes.Environment variable
CLOUDFLARE_ACCOUNT_ID: the target account ID.
The Worker's DEMO_SESSION_SECRET remains in Cloudflare; CI does not generate, read, or rotate it. GitHub's pull-request approval requirement still applies before changes can merge to main.
For forks, configure these environment values and change the production URL in the workflow to your own hostname before enabling deployments.
Architecture and limits
demo.ts: shared event catalog and manual emission tool, using the official SDK.server.ts: local Node HTTP server and SDK Node webhook sender.cloudflare/src/index.ts: session creation, validation, rate limiting, Durable Object routing, webhook storage, and alarms.cloudflare/src/webhook-sender.ts: Workersfetchadapter; HTTPS only, no redirects, five-second timeout, 64 KiB response cap. Cloudflare's public outbound network enforces private-destination restrictions. No private networking bindings are configured.cloudflare/src/landing.ts: self-service connection instructions; no account or shared credential required.
Hosted sessions use signed, expiring bearer tokens. The session ID routes all requests to the same Durable Object. Webhook subscription records (including signing secrets) live in that object's storage. An alarm emits the heartbeat roughly every 10 seconds, even without incoming HTTP requests, and terminates subscriptions and deletes storage at session expiry.
Demo durability: the event replay buffer and manual sequence counter are in memory and may reset after runtime eviction or deployment. Webhook records survive those restarts until session expiry, but this is not a durable event queue or an exactly-once delivery system. Alarm retries reuse an event ID where possible; consumers should deduplicate by event ID.
The hosted replay buffer holds at most 256 events / five minutes per event type. SDK subscription quotas and a stored-webhook cap bound each session. Session creation is limited to approximately 10/minute per IP and MCP requests to 300/minute per session, per Cloudflare location. These are demo safeguards, not a global spending cap. Active sessions use Durable Object requests, storage, and duration; normal Cloudflare usage charges apply. Worker invocation logging is disabled to avoid collecting demo traffic by default.
Tests
npm run typecheck
npm --prefix cloudflare run check
npm run test:unit
npm --prefix cloudflare run build
# With the local Node server running:
npm test
# With the local Cloudflare server running:
npm run test:isolationThe official SDK client checks discovery, manual event delivery via all three modes, topic filtering, timer delivery, and cancellation. Additional checks cover session separation, missing/forged credentials, expiration/signature validation, and the Cloudflare sender's transport boundaries.
To test all modes against a hosted server, expose the smoke-test receiver from your machine:
cloudflared tunnel --url http://127.0.0.1:18890In another terminal, use that tunnel's HTTPS URL:
WEBHOOK_URL=https://YOUR-RECEIVER.trycloudflare.com/events \
npm run test:cloudflare -- https://YOUR-DEMO.workers.dev/mcp
npm run test:isolation -- https://YOUR-DEMO.workers.dev/mcpThe test creates its own 30-minute hosted session. Its receiver is started before subscribing and closed when the test finishes. Stop the receiver tunnel afterward. Hosted senders cannot call your machine's localhost directly.
GitHub Actions builds the pinned SDK, typechecks both runtimes, runs unit checks, tests all three modes against Node, and checks isolation in the local Cloudflare runtime. Public callback delivery is verified separately against the live deployment.
License
Demo code: MIT. The official SDK submodule retains its Apache-2.0 license.
Player media and loading
The player preloads four small MP4s directly from /media/ using ordinary browser
media requests. Clips are public demo assets; MCP calls and subscriptions still
require the session bearer token. The app resource declares the media origin in
its CSP. Tool results carry URLs, never video bytes. Playback starts independently
of cue_scene, so a slow event receiver cannot hold the picture on Loading.
The cold open cues stage at 6.25 seconds. Enable Continue to the locker room to cue that scene when stage ends, or select any scene manually. Emission errors are visible and retryable; playback continues. Reload/open a fresh show after a server update to use the latest player.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Authenticated event topics for agent-to-agent messaging with per-agent credentials and audit logs.
PagerDuty's official hosted MCP server: incidents, on-call, services, schedules and more.
TheSignup MCP server — read and manage signups, participants, webhooks, and analytics.
Eventify MCP server — manage events, attendees, sessions, speakers, sponsors, and analytics.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables monitoring and management of tasks via WebSocket events and authorization requests through MCP tools.MIT
- AlicenseNot gradedqualityCmaintenancePublishes experimental MCP Events methods — events/list, events/stream, events/poll, and events/subscribe/events/unsubscribe with verified webhook delivery — so MCP clients can receive pushed notifications alongside a public website. Anonymous visitors appear as floating dots and can ping or send a short message of up to 200 Unicode code points to any chosen name, with no accounts, database, or persistent storage.MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to manage signed event subscriptions, submit Grok requests and receive results and replies, and track deduplicated asynchronous delivery through an authenticated owner console backed by persistent storage. External message text is treated strictly as data, with bounded retries and receipt-based roundtrip termination.MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients and webhook-driven agents to exchange durable messages with atomic claim, completion, and acknowledgement workflows, plus verified webhook event subscriptions and native wake-ups.MIT