Repository navigation
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.
Where main stands
Based on reading the code at b21b6251. Nothing was built or run, so corrections are welcome.
Already met: none of the fifteen areas in full; server-side define_custom_method (which already rejects any registered name) is the strongest part.
| Area | Status | Detail |
|---|---|---|
| Registration | Gap | No extension-registration API in either role; support_extensions merges capability hashes, so a duplicate identifier is merged, not rejected. capabilities.rb:57 |
| Capabilities | Partial | Both roles can declare capabilities.extensions and read the peer's, but not as part of an extension registration. capabilities.rb:57 |
| Dependencies | Gap | No generic dependency mechanism; the only such check is hardcoded for the built-in Skills extension. server.rb:1906 |
| Lifecycle | Gap | No extension registry to query and no atomic install of an extension's contributions. server.rb:399 |
| Custom requests | Partial | The server handles custom requests through define_custom_method, with no params or result schema; the client's generic request is private. server.rb:399 |
| Custom notifications | Partial | The server dispatches id-less custom methods to define_custom_method handlers; the client has no notification-handler API. http.rb:215 |
| Method conflicts | Partial | Server define_custom_method raises MethodAlreadyDefinedError for any registered name; client on_server_request overwrites. http.rb:329 |
| Middleware coverage | Partial | The server has one around_request hook around received requests and notifications; nothing wraps outgoing server messages or any client message. instrumentation.rb:18 |
| Middleware abilities | Partial | The hook can act before and after and return early, but receives only an instrumentation hash, not params or _meta. instrumentation.rb:18 |
| Streams | Gap | subscriptions/listen is served in the transport, and outgoing notifications go straight to it, so no hook sees stream items. streamable_http_transport.rb:1128 |
| Cleanup | Partial | The server hook is a plain block call, so ensure unwinds normally; there is no client middleware. instrumentation.rb:37 |
| Ordering | Gap | around_request is a single slot, so there is no composition or ordering, and any code can replace another's hook. configuration.rb:48 |
| Documentation | Gap | Capability extensions, custom methods and around_request are on separate pages; SEP-3371 is not mentioned anywhere in the repo. index.md:1 |
| Stability | Partial | The existing APIs are ordinary public API with no experimental marker; the missing extension points have no API to cover. VERSIONING.md:3 |
| Packaging docs (SHOULD) | Gap | None for third-party extensions. capability-extensions.md:9 |
Main gaps
- No extension-registration concept in either role: no identifier registry, duplicate rejection, dependency checks or all-or-nothing install.
- The client has no custom-method surface: no public generic request or notify and no notification handlers.
- Middleware is a single server-side, receive-only hook that cannot be composed and has no access to params or
_meta. - Streamed messages (
subscriptions/listen, progress) bypass the hook. - No typed or validated params and results for custom methods.
Not verified
- Preservation of unknown
_metaend to end. - Whether the stdio server transport routes all inbound messages through
Server#handle.
Conformance
The conformance approach is proposed in modelcontextprotocol/conformance#606. It would have each SDK's fixtures (conformance/server.rb and conformance/client.rb) 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.
Activity