Track SEP-3371 (consistent SDK extension points): gaps on main
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 12/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- nodejs, typescript
- Domaine
- api, developer-experience
Piste de recherche
This is a tracking issue, not a single task: the table lists gaps in packages/core-internal/src/shared/extensions.ts (ctx.require at line 161, setup at line 85, method conflicts at line 184, use at line 149), packages/server/src/server/extension.ts (line 60) and protocol.ts (line 252), plus docs/advanced/extensions.md. Start by reading extensions.ts and the docs page, then check the conformance fixtures in test/conformance/src. Done would mean the maintainers have agreed on an API design for notification and sending-direction middleware and a fix for each Partial or Gap row, which needs a design decision first.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
SEP-3371 (Consistent SDK Extension Points) was accepted by Core Maintainer vote on 28 November 2026. I'm the SEP author, and this issue tracks where main stands against it.
The SEP requires Tier 1 SDKs to provide three public extension points for protocol version 2026-07-28 and later: extension registration, custom methods, and JSON-RPC middleware. The API shape is the SDK's choice; only the outcomes are required. It takes effect with the first specification release after the SEP reaches Final.
This follows #2820, whose description already lists the first two gaps.
Where main stands
Based on reading the code at 5ee54ee3. Nothing was built or run, so corrections are welcome.
Already met: extension registration with duplicate-id rejection, capability declaration, custom requests, cleanup, and a documented deterministic middleware order.
| Area | Status | Detail |
|---|---|---|
| Dependencies | Partial | ctx.require(extensionId) is order-independent and names both extensions; there is no way to depend on a core capability such as resources. extensions.ts:161 |
| Lifecycle | Partial | A failed setup fails construction or connect; there is no API listing the installed extension ids. extensions.ts:85 |
| Custom notifications | Partial | Validated setNotificationHandler and notification() exist on Server and Client, but neither extension context has a notification member, so extensions use the unchecked general API. extension.ts:60 |
| Method conflicts | Partial | The extension path rejects core names and already-handled request names; it has no notification registration, so notification names are not checked. extensions.ts:184 |
| Middleware coverage | Partial | use() / ctx.use wrap incoming requests only, one exact method each. No middleware for notifications, outgoing requests or their responses, and use throws for subscriptions/listen on a server. extensions.ts:149 |
| Middleware abilities | Partial | Incoming-request middleware can act before and after, return early, and replace the request or result; notifications cannot be forwarded or suppressed. protocol.ts:252 |
| Streams | Gap | Middleware is request-to-result with no per-message hook; progress notifications and subscriptions/listen bypass it. extensions.md:136 |
| Documentation | Partial | One extensions page is linked from the docs nav; nothing in docs/ or the README states that the SDK implements SEP-3371 per role. extensions.md:5 |
| Stability | Gap | extensions, the extension shapes and contexts, use and acceptResultType are marked experimental ("may change in a minor release"). The SEP requires the SDK's normal stability policy. extensions.md:8 |
| Packaging docs (SHOULD) | Partial | Exporting and enabling an extension is shown; declaring SDK compatibility is not covered. extensions.md:34 |
Main gaps
- No middleware for notifications or the sending direction, so a client on
2026-07-28has nothing to wrap. - No per-message middleware for streams (progress, intermediate results,
subscriptions/listen). - The extension and middleware APIs are experimental.
- No checked notification registration on the extension path, and no core-capability dependencies.
- No documented
SEP-3371statement per role.
Not verified
- Whether application middleware can be placed outside extension middleware (the docs say extension middleware always runs outside it).
- Preservation of nested
_metathrough result encoding. - Whether custom client-to-server notifications are delivered on
2026-07-28over HTTP.
Conformance
The conformance approach is proposed in modelcontextprotocol/conformance#606. It would have each SDK's fixtures (test/conformance/src/everythingServer.ts and everythingClient.ts) install small synthetic extensions built only on the SDK's public APIs.
What would help
- Corrections to the table above.
- A maintainer view on which gaps you would close and how; the SEP leaves the design to each SDK.
- Whether a maintainer has time to work on this with me. I can help with the conformance fixture.
AI assistance: the code read and this write-up were done with GitHub Copilot (Claude) at my direction.
- Langage dominant
- TypeScript
- Étoiles
- 13.8k
- Forks
- 2.5k
- Merge moyen
- 6 j 23 h
- PR mergées (30 j)
- 2
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de modelcontextprotocol/typescript-sdk
-
v2
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
modelcontextprotocol/typescript-sdk#3270 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
`callTool` with `allowInputRequired: true` throws on an `input_required` result when the tool declares an `outputSchema`Peut-être pris @mgoldsborough l’a pris il y a 6 jours. Ouvertev2
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
modelcontextprotocol/typescript-sdk#3249 ·
Les mainteneurs répondent en général sous 1 jour
-
v2
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
modelcontextprotocol/typescript-sdk#3243 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
TypeScript client accepts an unknown `resultType` in the first `server/discover` replyPeut-être pris @Tidehyc l’a pris il y a 8 jours. Ouvertev2
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
modelcontextprotocol/typescript-sdk#3235 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
UriTemplate.match() throws a TypeError on an empty expression it acceptsPeut-être pris @yunusemrejs l’a pris il y a 12 jours. Ouvertev1 v2
Difficulté 2/5 1-3 heures Accessibilité débutants 80/100
modelcontextprotocol/typescript-sdk#3221 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de modelcontextprotocol/typescript-sdk
Issues similaires
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Vessel9817/onion-site-template#512 ·
Les mainteneurs répondent en général sous 1 jour
-
nightly-tests
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
BlackBeltTechnology/pi-agent-dashboard#1256 ·
Les mainteneurs répondent en général sous 1 jour
-
approved
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
fritzprix/libr-agent#3266 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
better-auth/better-auth#13101 · 1 commentaire · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour