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

MCP: move to Streamable HTTP (spec 2026-07-28) with OAuth, so clients refresh their own tokens

Đang mở
#714 0 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ó
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
35/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

Hướng nghiên cứu

Start with backend-ts/src/routes/mcp.ts and docs/MCP.md, then read the linked MCP 2026-07-28 transport and authorization specifications. Map the existing /sse flow, role gates, and per-call audit before planning the new Streamable HTTP and OAuth paths. Done means the new transport and token refresh flow work while /sse remains available, and the MCP documentation and mcp-surface skill are updated.

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

Mô tả

backend enhancement

Why

WorkWell's MCP server (backend-ts/src/routes/mcp.ts) speaks the legacy HTTP+SSE transport: GET /sse, with initialize, notifications/initialized and ping. Clients connect through npx mcp-remote <api>/sse --transport sse-only --header Authorization:${AUTH_HEADER} (docs/MCP.md). Two problems follow.

  1. The transport is on the removal track. MCP revision 2026-07-28 (current; the previous was 2025-11-25) formally lists HTTP+SSE as Deprecated in the new deprecation registry. That revision also removes the initialize handshake, sessions and ping from the core, and requires server/discover plus the Mcp-Method/Mcp-Name headers.
  2. The token cannot refresh. Access tokens last 15 minutes, on purpose (#703): a JWT cannot be revoked, and logout revokes only the refresh family. mcp-remote sends a fixed --header and never renews it. So an MCP session dies after 15 minutes, and a new JWT has to be minted by hand. mcp-remote's own OAuth client does refresh tokens, which needs the server to support the MCP authorization flow.

What to do

  • Serve Streamable HTTP per 2026-07-28:
    • server/discover;
    • per-request _meta version and capabilities;
    • the required headers;
    • ttlMs/cacheScope on list results.
    • Keep /sse alongside until clients have moved.
  • Support the MCP authorization flow (OAuth 2.1, optional in the spec but the only way a client refreshes on its own):
    • Protected Resource Metadata (RFC 9728);
    • an authorization server issuing short access tokens plus refresh tokens;
    • Client ID Metadata Documents rather than the now-deprecated Dynamic Client Registration.
    • Keep the existing role gates (ROLE_ADMIN/ROLE_CASE_MANAGER) and per-call audit.
  • Update docs/MCP.md and the mcp-surface skill.

Not urgent

Nothing on the "Ready for January" list uses MCP, and the pilot does not. One caveat: Claude Desktop's own custom connectors have an open report of not refreshing expired OAuth tokens (anthropics/claude-ai-mcp#247). Check the client side before relying on refresh.

Also noted: a Claude Desktop config still pointing at https://twh-api.os.mieweb.org/sse gets a 404. That was the retired Java host; the live one is twh-api-ts.

Ngôn ngữ chính
TypeScript
Star
0
Fork
0
Merge trung bình
4 giờ 20 phút
Pull request đã merge (30 ngày)
104

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 Taleef7/workwell

Tất cả issue của Taleef7/workwell

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.