Track SEP-3371 (consistent SDK extension points): gaps on main
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 18/100
Hướng nghiên cứu
The gaps are spread across mcp/protocol.go (AddExtension on the capability types), mcp/server.go and mcp/client.go (AddReceivingCustomMethod, AddSendingCustomMethod, CallCustomMethod), and mcp/shared.go (middleware). Read the table and the cited lines first, then check the claims against the code. Done depends on a maintainer choosing the extension-registration API design, which this issue does not settle, so ask for that decision before writing code.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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 #954, where the cost of bundling extensions was first discussed.
Where main stands
Based on reading the code at 13d3c71f. Nothing was built or run, so corrections are welcome.
Already met: middleware in both directions and both roles, over one MethodHandler shape that covers requests and notifications; list-changed notifications on subscriptions/listen and progress go through sending middleware one message at a time.
| Area | Status | Detail |
|---|---|---|
| Registration | Gap | No extension type or register-by-identifier API in either role. |
| Capabilities | Partial | ClientCapabilities.AddExtension and ServerCapabilities.AddExtension write the map, but as an application step, not part of a registration; a second call with the same id overwrites. protocol.go:594 |
| Dependencies | Gap | No dependency mechanism. |
| Lifecycle | Gap | No list of registered extensions and no all-or-nothing install of an extension's contributions. |
| Custom requests | Partial | Typed AddReceivingCustomMethod on the server and AddSendingCustomMethod / CallCustomMethod on the client; no server-to-client custom requests. server.go:2610, client.go:1730 |
| Custom notifications | Gap | No API found to register or send a custom notification in either role; the only notification handler options are built-in ones such as ProgressNotificationHandler. |
| Method conflicts | Partial | Standard method names are rejected; registering the same custom method twice replaces the earlier handler. server.go:2608, client.go:1728 |
| Middleware coverage | Met | AddSendingMiddleware / AddReceivingMiddleware on Server and Client; notifications are sent through the sending handler. shared.go:112, shared.go:180 |
| Middleware abilities | Likely met | A Middleware can act before and after, return early and replace params or results. Suppressing a notification (returning without calling next) is not documented. |
| Streams | Partial | Each listen notification and each progress notification passes through sending middleware separately. Listen notifications are sent with context.Background(), so middleware cannot tie them to the listen request or its cancellation. server.go:850 |
| Ordering | Partial | Deterministic and documented in godoc: within one call the first middleware is outermost, and each later call wraps the existing chain. Nothing documents where the SDK's own MRTR middleware sits relative to user middleware. server.go:2095, mrtr.go:138 |
| Documentation | Gap | No extension-points page. JSON-RPC middleware is described in godoc; in docs/ it appears only for MRTR, and the other middleware there is HTTP. SEP-3371 is not mentioned in the repo. |
| Packaging docs (SHOULD) | Gap | None for third-party extensions. |
Main gaps
- No extension registration: no identifier, duplicate rejection, dependency check, list of registered extensions or all-or-nothing install.
- No custom notifications in either role, and no custom requests from server to client.
- Duplicate custom method registration replaces instead of failing, so two extensions can silently take one method.
- No
SEP-3371statement per role or single extension-points page.
Not verified
- Whether a sending-middleware error on a listen notification reaches anyone besides the server log.
- Preservation of unknown and nested
_metakeys throughParamsround trips. - Stability: whether the custom-method and middleware APIs carry any experimental marker.
Conformance
The conformance approach is proposed in modelcontextprotocol/conformance#606. It would have the Go conformance fixtures 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. Middleware is already close, so registration and custom notifications are the main design work.
- 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 Claude at my direction.
- Ngôn ngữ chính
- Go
- Star
- 5.4k
- Fork
- 623
- Merge trung bình
- 22 giờ 10 phút
- Pull request đã merge (30 ngày)
- 30
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của modelcontextprotocol/go-sdk
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
modelcontextprotocol/go-sdk#1557 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Streamable HTTP (2026-07-28): tools/call with an out-of-range number in arguments fails because extractName decodes Arguments into anyCó thể làm lại được @beiryu đã nhận 10 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
modelcontextprotocol/go-sdk#1534 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Expose generic `SendNotification` on `ServerSession` for custom protocol extensionsCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởneeds investigation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
modelcontextprotocol/go-sdk#745 · 13 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
mcp: 2026-07-28 client runs elicitation and sampling handlers for standalone server requestsCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
modelcontextprotocol/go-sdk#1552 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
mcp: stateless subscriptions/listen stream can start with an unrequested tools/list_changedCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
modelcontextprotocol/go-sdk#1551 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của modelcontextprotocol/go-sdk
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
apache/dubbo-admin#1659 ·
Maintainer thường phản hồi trong vòng 8 ngày
-
taskmanager: a failed v1alpha1 backup leaves the partial backup behindCó thể đã có người làm @arshil42 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Packaging: support mise-en-placeĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100