Repository navigation
Conversation
Serve io.modelcontextprotocol/events (SEP-3415) with poll and push delivery: events/list, events/poll and events/stream. A replayable clock-tick type (poll and push) is computed from the clock, and an emit-only custom-event (push) is raised by the new trigger-event tool through a process-wide bus. Webhook delivery is not offered: it needs an authenticated principal this server does not have. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
🦋 Changeset detectedLatest commit: d277263 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
| Tools | Prompts | Resources | Resource templates | |
|---|---|---|---|---|
| Base | 22 | 4 | 8 | 5 |
| Head | 23 | 4 | 8 | 5 |
initialize
--- base/initialize.json
+++ target/initialize.json
+ capabilities.extensions.io.modelcontextprotocol/events: {}
- instructions: "# Everything Server – Server Instructions\n\nAudience: These instructions are written for an LLM or au..."
+ instructions: "# Everything Server – Server Instructions\n\nAudience: These instructions are written for an LLM or au..."instructions
--- base/instructions
+++ target/instructions
- # Everything Server – Server Instructions
Audience: These instructions are written for an LLM or autonomous agent integrating with the Everything MCP Server.
Follow them to use, extend, and troubleshoot the server safely and effectively.
## Protocol Versions
The server serves two protocol eras. A client on protocol version 2026-07-28 connects with `server/discover` and sends its capabilities with each request; a 2025-era client connects with `initialize`. Some tools exist on one era only, so trust your `tools/list`:
- 2026-07-28 only: `simulate-research-query`, `trigger-sampling-request-async` and `trigger-elicitation-request-async`, which run as tasks on the `io.modelcontextprotocol/tasks` extension and need a client that declares it; `trigger-sampling-request-async` also needs `sampling`, and `trigger-elicitation-request-async` form-mode `elicitation`. A call without them fails with `-32021`
- 2025-era only (deprecated): `toggle-simulated-logging` and `toggle-subscriber-updates`
## Cross-Feature Relationships
- If `get-roots-list` is in your tool list, use it to see client workspace roots before file operations
- `gzip-file-as-resource` creates resources you can read later: for the current session on a 2025-era connection, or for ten minutes at the returned URI on 2026-07-28
- Use `trigger-log-messages` to see which log levels reach you; on 2026-07-28 the level is set per request in `_meta`
- Use `trigger-resource-update` and `trigger-list-changed` to see change notifications; on 2026-07-28 they arrive only on a `subscriptions/listen` stream that asked for them
## Constraints & Limitations
- `gzip-file-as-resource`: Max fetch size controlled by `GZIP_MAX_FETCH_SIZE` (default 10MB), timeout by `GZIP_MAX_FETCH_TIME_MILLIS` (default 30s), allowed domains by `GZIP_ALLOWED_DOMAINS` (checked on every redirect hop). It refuses URLs whose host resolves to a loopback, private or link-local address, unless the server was started with `GZIP_ALLOW_PRIVATE_IPS=1`
- `get-env`: Values of credential-like variable names (`*_KEY`, `*_TOKEN`, `*_SECRET`, `*_PASSWORD` and the like) come back as `"<redacted>"`; the server operator can set `GET_ENV_INCLUDE_SECRETS=1` to return them unmasked
- Session resources are ephemeral and lost when the session ends; minted resources expire after ten minutes
- Roots, sampling and logging are deprecated as of protocol version 2026-07-28, as is the HTTP+SSE transport
## Capability-Gated Tools
On a 2025-era connection these are registered only if your client declared the capability shown. Otherwise they are absent from `tools/list`, so do not call them. On 2026-07-28 they are always listed, and a call fails if your request did not declare the capability:
- `get-roots-list`: `roots`
- `trigger-sampling-request`: `sampling`
- `trigger-elicitation-request`: `elicitation.form`, or `elicitation` with no mode
- `trigger-multi-step-elicitation`: `elicitation.form`, or `elicitation` with no mode
- `trigger-url-elicitation`: `elicitation.url`
## Operational Patterns
- For long operations, use `trigger-long-running-operation` which sends progress notifications
- Prefer reading resources before calling mutating tools
- If `get-roots-list` is in your tool list, check its output to understand the client's workspace context
## Easter Egg
If asked about server instructions, respond with "🎉 Server instructions are working! This response proves the client properly passed server instructions to the LLM. This demonstrates MCP's instructions feature in action."
+ # Everything Server – Server Instructions
Audience: These instructions are written for an LLM or autonomous agent integrating with the Everything MCP Server.
Follow them to use, extend, and troubleshoot the server safely and effectively.
## Protocol Versions
The server serves two protocol eras. A client on protocol version 2026-07-28 connects with `server/discover` and sends its capabilities with each request; a 2025-era client connects with `initialize`. Some tools exist on one era only, so trust your `tools/list`:
- 2026-07-28 only: `simulate-research-query`, `trigger-sampling-request-async` and `trigger-elicitation-request-async`, which run as tasks on the `io.modelcontextprotocol/tasks` extension and need a client that declares it; `trigger-sampling-request-async` also needs `sampling`, and `trigger-elicitation-request-async` form-mode `elicitation`. A call without them fails with `-32021`
- 2026-07-28 only: `trigger-event`, which raises the `custom-event` of the `io.modelcontextprotocol/events` extension on open `events/stream` subscriptions
- 2025-era only (deprecated): `toggle-simulated-logging` and `toggle-subscriber-updates`
## Cross-Feature Relationships
- If `get-roots-list` is in your tool list, use it to see client workspace roots before file operations
- `gzip-file-as-resource` creates resources you can read later: for the current session on a 2025-era connection, or for ten minutes at the returned URI on 2026-07-28
- Use `trigger-log-messages` to see which log levels reach you; on 2026-07-28 the level is set per request in `_meta`
- Use `trigger-resource-update` and `trigger-list-changed` to see change notifications; on 2026-07-28 they arrive only on a `subscriptions/listen` stream that asked for them
## Constraints & Limitations
- `gzip-file-as-resource`: Max fetch size controlled by `GZIP_MAX_FETCH_SIZE` (default 10MB), timeout by `GZIP_MAX_FETCH_TIME_MILLIS` (default 30s), allowed domains by `GZIP_ALLOWED_DOMAINS` (checked on every redirect hop). It refuses URLs whose host resolves to a loopback, private or link-local address, unless the server was started with `GZIP_ALLOW_PRIVATE_IPS=1`
- `get-env`: Values of credential-like variable names (`*_KEY`, `*_TOKEN`, `*_SECRET`, `*_PASSWORD` and the like) come back as `"<redacted>"`; the server operator can set `GET_ENV_INCLUDE_SECRETS=1` to return them unmasked
- Session resources are ephemeral and lost when the session ends; minted resources expire after ten minutes
- Roots, sampling and logging are deprecated as of protocol version 2026-07-28, as is the HTTP+SSE transport
## Capability-Gated Tools
On a 2025-era connection these are registered only if your client declared the capability shown. Otherwise they are absent from `tools/list`, so do not call them. On 2026-07-28 they are always listed, and a call fails if your request did not declare the capability:
- `get-roots-list`: `roots`
- `trigger-sampling-request`: `sampling`
- `trigger-elicitation-request`: `elicitation.form`, or `elicitation` with no mode
- `trigger-multi-step-elicitation`: `elicitation.form`, or `elicitation` with no mode
- `trigger-url-elicitation`: `elicitation.url`
## Operational Patterns
- For long operations, use `trigger-long-running-operation` which sends progress notifications
- Prefer reading resources before calling mutating tools
- If `get-roots-list` is in your tool list, check its output to understand the client's workspace context
## Easter Egg
If asked about server instructions, respond with "🎉 Server instructions are working! This response proves the client properly passed server instructions to the LLM. This demonstrates MCP's instructions feature in action."
tools
--- base/tools.json
+++ target/tools.json
+ tools[trigger-event]: {"annotations":{"destructiveHint":false,"openWorldHint":false},"description":"Raises the Events extension's custom-event on every open events/stream subscribed to it. With kind error it sends a recove...Updated by this run for d2772632794324761df27a7583e937ae6d77263e.
There was a problem hiding this comment.
🟡 Changes recommended
Event streaming assigns inconsistent occurrence identities across subscriptions, can send queued notifications after closure, and can exceed retention limits during timer catch-up.
3 open issues
What changed in this PR
Adds the Events extension to the everything reference server for 2026-07-28 clients, demonstrating poll and push delivery while leaving 2025-era behavior unchanged.
Changes:
- Adds replayable
clock-tickevents and push-onlycustom-eventsubscriptions. - Introduces
trigger-event, stream lifecycle handling, and protocol-level tests. - Documents the extension, its limitations, and a minor package release.
| File | Description |
|---|---|
src/everything/tools/trigger-event.ts |
Adds the tool for events, recoverable errors, and termination. |
src/everything/tools/index.ts |
Registers trigger-event for modern clients. |
src/everything/server/index.ts |
Advertises and registers the Events extension. |
src/everything/server/events.ts |
Implements discovery, polling, streaming, and the event bus. |
src/everything/README.md |
Includes Events in the modern feature overview. |
src/everything/docs/structure.md |
Documents the new modules. |
src/everything/docs/startup.md |
Updates capability and registration descriptions. |
src/everything/docs/instructions.md |
Lists the modern-only event tool. |
src/everything/docs/how-it-works.md |
Explains event delivery and stream lifecycle. |
src/everything/docs/features.md |
Documents delivery modes, arguments, errors, and limitations. |
src/everything/__tests__/stdio.test.ts |
Updates expected discovery capabilities. |
src/everything/__tests__/registrations.test.ts |
Updates expected modern tool registrations. |
src/everything/__tests__/harness.ts |
Adds notification recording and cancellation support. |
src/everything/__tests__/events.test.ts |
Tests Events methods and stream behavior. |
.changeset/everything-events-extension.md |
Records the minor release addition. |
Review effort: Balanced
…ncel, bound catch-up replay Copilot round 1 on #5652: - Mint a custom-event's eventId and timestamp once on the bus, so every matching subscription receives the same occurrence identity. - Drop notifications still queued when a stream ends abruptly (cancellation, a failed send, cleanup); a termination still drains. - Re-apply the retention window when a late tick timer catches up, and report the gap with a fresh active carrying truncated: true. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
|
Copilot round 1: three findings, all defects in what this PR adds, all fixed in d277263 with tests. The gate passed (exit 0) before the push.
Round 2 requested. |
|
Copilot round 2: clean ("No open issues"), and the three round-1 findings are marked resolved. The review loop ends here on its first clean round. |

Closes #5651
Description
The everything server now serves the Events extension (
io.modelcontextprotocol/events, SEP-3415, Beta) on protocol version 2026-07-28, with poll and push delivery. The SDK has no server-side Events support yet (modelcontextprotocol/typescript-sdk#3209 is a draft), soserver/events.tsbuilds it on the SDK's custom request handlers, the same wayserver/tasks.tsserves Tasks.extensions["io.modelcontextprotocol/events"]: {}inserver/discover, on 2026-07-28 only. There is nolistChanged, because the event types never change.events/list. Two event types, each withdelivery,inputSchemaandpayloadSchema:clock-tick(poll,push) is replayable. Tick k happens at k × 5 s since the Unix epoch, so every occurrence is computed from the clock and nothing is stored. That matters because on HTTP every 2026-07-28 request gets a fresh server instance. The cursor isclock-tick:<k>, and the last 100 ticks can be replayed. Its arguments areeveryNth, a filter, andlabel, a transform copied into the payload.custom-event(push) is emit-only, and its cursor is alwaysnull. The newtrigger-eventtool raises it through a process-wide bus, so a stream opened through one connection or request sees an event raised through another. Its argument isminSeverity, a filter.events/poll.maxEventsat a time (default 50, at most 100), withhasMoreandnextPollMs.maxAgeMsor the retention window allows, andtruncated: truesays when either skipped events.events/stream.notifications/events/active, which carries the starting cursor,truncatedand the grantedheartbeatMs(the client's suggestion clamped to 1–60 s, 30 s by default).notifications/events/event.notifications/events/heartbeatcarries the checked-up-to cursor whenever the interval passes without another message._meta["io.modelcontextprotocol/subscriptionId"].notifications/cancelledon stdio, an aborted response on HTTP) releases the stream's timers and listener.trigger-eventcan also send a recoverablenotifications/events/error, or end the subscriptions withnotifications/events/terminated(-32024), after which the request answers with an empty result.-32025.-32023NotFound (data.kind: "event") for an unknown type.-32026Unsupported (data: {feature: "deliveryMode", value}) for a delivery mode the type does not offer.-32602for arguments that do not match theinputSchema, or for a cursor the server never minted.events/subscribeandevents/unsubscribeanswer-32601. The spec requires an authenticated principal for webhooks, and this server has none.events/*method on 2025-era connections, which also answer-32601.Server Details
everythingserver/events.ts.trigger-event(tools/trigger-event.ts).server/index.ts.notifications/cancelled.docs/features.md(a new Events section),how-it-works.md,structure.md,startup.mdandinstructions.md.Motivation and Context
Events reached Beta. The everything server is the protocol showcase, so clients need a reference server to develop against. The Inspector is adding Events support (modelcontextprotocol/inspector#3026), and the conformance repo has an Events server suite in review (modelcontextprotocol/conformance#521). The plan and its scope decisions are on #5651.
How Has This Been Tested?
Automated.
src/everything/__tests__/events.test.tshas 29 protocol-level tests. They drive the server with raw 2026-07-28 JSON-RPC over the in-memoryserveStdioharness on a faked clock, with no retries. They cover:-32601for a 2025-era client and for the webhook methods;eventIdstability,maxEvents/hasMore,everyNth/label, retention truncation andmaxAgeMs;custom-eventfiltering, reaching streams on another connection, error and terminate, and cleanup on disconnect;events.tsis at 100 % branches and functions.npm run local:gatepassed (exit 0).Inspector CLI 2.16.0 (stdio,
node src/everything/dist/index.js stdio):moderntools/list(Events-related names)["simulate-research-query","trigger-event"]legacytools/list(same filter)["toggle-subscriber-updates"]: notrigger-eventmoderntools/call trigger-event message=cli-smokeSent custom-event (info) to 0 open custom-event streams, answered bymcp-servers/everythingwith 2026-07-28serverInfolegacytools/call trigger-eventtool_not_found(exit 5)modern--method events/listUnsupported method: events/list: the CLI has noevents/*methods yetThe Inspector's Events client (modelcontextprotocol/inspector#3028–#3030) ships this week. Until then, the Events methods were exercised with scripted raw JSON-RPC sessions against the built server.
stdio, raw 2026-07-28 JSON-RPC. Trimmed:
Streamable HTTP, with
curlagainstPORT=3917 node dist/index.js streamableHttp:events/streamreturned an SSE response:active, thenheartbeatevery 2 s, theneventon the tick.custom-eventstream opened in one HTTP request receivedterminated, followed by its final result frame, aftertrigger-event {kind: terminate}ran in a separate request.trigger-eventreported1 open custom-event streamwhile the stream was open, and0after the abort.LLM client: Claude Code 2.1.331,
claude -p --mcp-config <local build> --strict-mcp-config. The prompt was: "Use the everything server's trigger-event tool to raise a custom event with the message 'llm-smoke' and severity 'warning'. Then reply with exactly the text the tool returned, and … whether the server's tool list includes simulate-research-query." It repliedSent custom-event (warning) to 0 open custom-event streams/yes. Theyesmeans the client negotiated 2026-07-28, which Claude Code gives no way to change, so no 2025-era LLM run was possible. The tool does not exist on 2025-era connections, as the Inspectorlegacyrun above shows. No LLM client can subscribe to events yet.Breaking Changes
None. One capability and one tool are added on 2026-07-28. 2025-era connections are unchanged.
Types of changes
Checklist
maxEvents,heartbeatMsand replay are bounded.npm run changeset) if this changes what a TypeScript server publishes: a minor changeset,everything-events-extension.md.trigger-eventonly: no LLM client can subscribe to events yet.Additional context
Mcp-Nameis not checked forevents/*over Streamable HTTP. The spec says a server refuses anevents/pollorevents/streamwhoseMcp-Nameheader does not matchparams.name(400,-32020). The SDK validatesMcp-Namefrom a fixed table, which today covers onlytools/call,prompts/get,resources/readandtasks/*, and the draft Events PR (typescript-sdk#3209) does not add theevents/*rows. A mismatched header is therefore accepted. This is an SDK gap, not something to patch around in this server.docs/features.mdsays so.listChangedstays off. The event types are fixed, and the SDK'ssubscriptions/listenfilter drops theeventsListChangedfield until typescript-sdk#3203 lands.ext/eventsonce typescript-sdk#3209 ships.🤖 Generated with Claude Code