Proposal: allow `mcp.streamableClientConn` to listen to SSE stream without using `mcp.Client`

Đang mở
#657 8 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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
62/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, networking

Hướng nghiên cứu

Bắt đầu bằng cách đọc StreamableServerTransport và streamableClientConn, sau đó lần theo kết quả initialize thành công và đường dẫn connectStandaloneSSE hiện có. Thay đổi được hoàn tất khi một transport được sử dụng mà không có mcp.Client có thể bắt đầu lắng nghe luồng SSE thông qua tùy chọn đã thống nhất hoặc trigger được expose, với hành vi liên quan của transport được kiểm thử.

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

Mô tả

needs investigation

Is your feature request related to a problem? Please describe.
We use the SDK to implement reverse proxies for MCP servers and transport conversions. For that purpose, we cannot use mcp.Client directly. We use StreamableServerTransport instead to process the messages.

However, there is no exposed function for StreamableServerTransport (or streamableClientConn) to start to listen the SSE stream (the GET call), without using mcp.Client.

Describe the solution you'd like
Have a boolean say ConnectSSEOnInitializeSuccess in StreamableServerTransport to enable the listening functionality. If flag is set, c.connectStandaloneSSE() will be called automatically after receiving successful initialize result.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Expose sessionUpdated or connectStandaloneSSE() and allow external caller to trigger it.

Additional context
Add any other context or screenshots about the feature request here.

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.