[Client] Support subscriptions/listen (2026-07-28)

Offen
#752 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@songecko arbeitet bereits daran.

Seit 19.11.2026.

  • #753 von @songecko — offen

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
20/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Tech-Stack
php
Bereich
api

Rechercherichtung

Read the client implementation around Client::callTool() and the existing notification handling, then compare the protocol behavior with the referenced server support in #444 and #451. Implement Client::listen() for subscriptions/listen, including the acknowledged filter, subscription notifications, cancellation, and termination behavior. Done means the client can open the stream, dispatch its notifications to callbacks, and return or throw as described; pull request #753 is already open for this issue.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement

Is your feature request related to a problem? Please describe.
On 2026-07-28 the server answers subscriptions/listen (#444, #451), but the client has no way to open that stream. A PHP client can't receive notifications/resources/updated or list changes from a modern server, so it has to poll instead.

Describe the solution you'd like
A Client::listen() that sends subscriptions/listen with a SubscriptionFilter, hands the acknowledged filter and each notification of the subscription to callbacks, and returns when the server ends the subscription (including the stdio notifications/cancelled termination), or throws on cancellation like callTool().

Describe alternatives you've considered
Polling resources/read from the application, which misses the point of subscriptions; and a custom notification handler, which can't open the stream or tell its notifications apart from others.

Additional context
#340 listed the client side of SEP-2575, and #185 listed resource subscriptions for the client; both closed with that part open. Handshake-era resources/subscribe is out of scope here.

Vorherrschende Sprache
PHP
Sterne
1.7k
Forks
206
Ø Merge
1 T. 19 Std.
Gemergte PRs (30 T.)
100

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/php-sdk

Alle Issues in modelcontextprotocol/php-sdk

Ähnliche Issues

Weitere Issues zu PHP

Neue Issues direkt in Ihr Postfach

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