mcp: allow advertising the top-level events capability (MCP Events extension draft)

Đang mở
#1,325 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
58/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
api

Hướng nghiên cứu

Start at mcp.ServerCapabilities, its Experimental and Extensions fields, and the clone implementation; then compare the advertised shape with the linked MCP Events extension draft. Done means a server can serialize a top-level events capability while preserving existing capability behavior and supporting the already-mentioned events custom methods.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

P3

The MCP Events extension draft advertises server support with a top-level events capability:

{ "capabilities": { "events": { "listChanged": true } } }

Reference: https://github.com/modelcontextprotocol/experimental-ext-triggers-events/blob/28ec35e905daa241f019981e2836b4a02f1c0368/docs/design-sketch-proposal.md

mcp.ServerCapabilities (v1.8.0) has typed core fields plus Experimental and Extensions, and no custom marshaller, so a server can't emit that key. AddReceivingCustomMethod already makes events/list, events/subscribe and events/unsubscribe implementable, so the advertisement is the only missing piece.

Would you accept either of these?

  1. A typed field, for example Events *EventCapabilities with ListChanged bool, reflected in clone.
  2. A generic escape hatch for top-level capability keys that a draft extension defines before it gets a typed field.

Happy to send a PR for whichever you prefer.

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

Mở trong Codespaces

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.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của modelcontextprotocol/go-sdk

Tất cả issue của modelcontextprotocol/go-sdk

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.