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

Ouverte
#752 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@songecko y travaille déjà.

Depuis le 19/11/2026.

  • #753 par @songecko — ouverte

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
20/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
À l'abandon
Stack technique
php
Domaine
api

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
PHP
Étoiles
1.7k
Forks
206
Merge moyen
1 j 19 h
PR mergées (30 j)
100

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de modelcontextprotocol/php-sdk

Toutes les issues de modelcontextprotocol/php-sdk

Issues similaires

Plus d'issues PHP

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.