Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Wire-schema validation does not see raw-HTTP / inline-mock scenario traffic

Đang mở
#418 2 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 7 ngày

@RanaPriyansh đang làm issue này rồi.

Từ ngày 8/9/2026.

  • #497 của @RanaPriyansh — đang mở

Đá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
68/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ệ
typescript
Lĩnh vực
testing-qa

Hướng nghiên cứu

Bắt đầu với các kịch bản client được liệt kê trong src/scenarios/client/ và các kịch bản server trong src/scenarios/server/, sau đó chạy core client suite đối với TypeScript SDK everything-client để tái hiện các kiểm tra wire-schema còn thiếu. Truy vết mock server dùng chung có nhận biết phiên bản và các đường dẫn raw fetch hoặc Client, bao gồm các inline mock trong request-metadata.ts, mrtr-client.ts, json-schema-ref-deref.ts và http-base.ts. Được xem là hoàn tất khi lưu lượng bypass được xác thực, các vi phạm có chủ ý có thể opt out, và các mock draft server/discover sử dụng dạng serverInfo hiện tại của _meta.

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

Mô tả

#399 validates every JSON-RPC message that flows through the shared choke points (the SDK transport hooks and the version-aware mock server). Traffic that bypasses those choke points is never schema-checked, and the bypass surface is wider than the note in the PR body (which only mentions the client-auth express mock).

Known uninstrumented paths:

Client scenarios with hand-rolled inline HTTP mocks (requests from the client under test are not validated):

  • src/scenarios/client/initialize.ts — the client's initialize request is never schema-checked
  • src/scenarios/client/sse-retry.ts
  • src/scenarios/client/elicitation-defaults.ts
  • src/scenarios/client/http-base.ts and its subclasses (request-metadata.ts, mrtr-client.ts, json-schema-ref-deref.ts)
  • the client-auth scenarios' express mock (already disclosed in #399)

Server scenarios using raw fetch or their own SDK Client (messages to/from the server under test are not validated):

  • src/scenarios/server/sse-polling.ts and sse-multiple-streams.ts — both build their own uninstrumented Client
  • src/scenarios/server/http-standard-headers.ts, lifecycle.ts, stateless.ts — raw fetch calls

Observable at the CLI: running the core client suite against the typescript-sdk everything-client, only tools_call reports a wire-schema-valid check; initialize, sse-retry, and every auth scenario record no wire traffic at all.

Related cleanup while touching these files: four client-scenario inline mocks still emit the pre-#3002 top-level serverInfo on draft server/discover responses instead of _meta['io.modelcontextprotocol/serverInfo'] (request-metadata.ts, mrtr-client.ts, json-schema-ref-deref.ts, http-base.ts — src/mock-server/stateless.ts was already fixed in #403).

Suggested direction: route inline client-scenario mocks through the shared version-aware mock server where feasible, and add a small validated-fetch helper for the raw-HTTP server scenarios so intentional protocol violations can opt out explicitly.

Ngôn ngữ chính
TypeScript
Star
130
Fork
107
Merge trung bình
17 ngày 14 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

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/conformance

Tất cả issue của modelcontextprotocol/conformance

Issue tương tự

Thêm issue về TypeScript

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.