modelcontextprotocol / modelcontextprotocol/typescript-sdk

Support the resources/subscribe method

Aperta
#558 6 commenti 3 reazioni 1 assegnatario Vedi su GitHub

@KKonstantinov ci sta già lavorando.

Dal 6/4/2026.

enhancement needs design P2
Lingua principale
TypeScript
Stelle
13.4k
Fork
2.2k
Merge medio
3g 15h
PR unite (30g)
4

Descrizione

Is your feature request related to a problem? Please describe.

I would like to notify clients of updates to resources to which they've subscribed. Currently it appears the SDK does not handle the resources/subscribe request method.

Describe the solution you'd like

I would like the SDK to handle this method.

Describe alternatives you've considered

Right now I can call sendResourceUpdated which is defined as:

    async sendResourceUpdated(params) {
        return this.notification({
            method: "notifications/resources/updated",
            params,
        });
    }

It doesn't determine whether the client has subscribed to the particular resource or not. I would prefer that the SDK not send the notification to clients which have not subscribed.

Another alternative is to step outside the SDK 🤷‍♂️

Additional context

I'm unaware of popular clients (other than the inspector) which support subscriptions, but they will exist eventually.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.