Implement SEP-3415: Events Extension

Offen
#376 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
swift

Rechercherichtung

Read the SEP-3415 specification and compare its requirements with the subscriptions/listen handler in rel/1.0.0 and the TaskManager/withTasks(_:) pattern. The proposal identifies server and client entry points, but leaves key decisions open about the target branch, beta stability policy, error codes, and webhook scope. Done means agreeing on those decisions and implementing the selected Events API against the specified revision.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Tracking implementation of SEP-3415, the Events extension (io.modelcontextprotocol/events), for the 2026-07-28 spec release. The SEP is Final and the extension is Beta.

I'd like to contribute this. I'm building a macOS app that hosts an MCP server and pushes events to clients it spawns over stdio, so push delivery is what I need first.

Proposed first PR

  • Server: events/list, events/poll and events/stream, with cursors, replay, truncated, heartbeats, terminated and list-changed notifications.
  • Event types fed either by emit from the host or by a check function.
  • A shared EventRegistry actor installed with Server.withEvents(_:), following TaskManager and withTasks(_:), so one emit reaches every Server that shares it.
  • events/stream modelled on the subscriptions/listen handler in rel/1.0.0.
  • A small client API: listEvents, pollEvents and streamEvents.
  • Mode selection and reconnection on the client are left out.

Webhook delivery as a follow-up

I'd leave events/subscribe and events/unsubscribe for a second PR. Webhook delivery is the largest part of the extension: it needs signed deliveries, endpoint verification, guards against callbacks to internal hosts, an authenticated principal per subscription, and subscriptions that expire unless refreshed. Parts of it are also still being discussed (modelcontextprotocol/ext-events#9, #21, #22). Poll and push are smaller and settled enough to start with. If you'd rather have all three modes in one PR, I can do that instead.

Questions

  1. The extension relies on the 2026-07-28 revision, server/discover and subscriptions/listen, which exist only on rel/1.0.0. Should the PR build on that branch and target main once #372 merges?
  2. The extension is Beta and has already changed (modelcontextprotocol/ext-events#11 renumbered the error codes, modelcontextprotocol/ext-events#7 moved the capability). How would you like to handle that?
    • Ship it in the MCP module like Tasks and Skills, under the 1.x stability promise.
    • Ship it as a separate product outside that promise until the extension is stable.
    • Hold off until the extension leaves Beta.
  3. Since the MCPError cases are frozen for 1.x, should the new error codes, -32023 to -32026, be MCPError.Code constants used with .serverError(code:message:data:)?

Related: modelcontextprotocol/typescript-sdk#3209 (draft), modelcontextprotocol/python-sdk#3881, modelcontextprotocol/rust-sdk#1488, modelcontextprotocol/csharp-sdk#2038.

AI disclosure: I used an AI assistant (Claude) to research the SDK and the spec and to draft this issue, and I reviewed it before posting.

Vorherrschende Sprache
Swift
Sterne
1.6k
Forks
278
Ø Merge
11 Std. 15 Min.
Gemergte PRs (30 T.)
46

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus modelcontextprotocol/swift-sdk

Alle Issues in modelcontextprotocol/swift-sdk

Ähnliche Issues

Weitere Issues zu Swift

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.