MCP: move to Streamable HTTP (spec 2026-07-28) with OAuth, so clients refresh their own tokens
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
- Lĩnh vực
- api, authentication, backend-api-design, documentation
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ả
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.
- 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
initializehandshake, sessions andpingfrom the core, and requiresserver/discoverplus theMcp-Method/Mcp-Nameheaders.- When can HTTP+SSE be removed? The deprecation SEP says as early as the next revision; the release blog says a 12-month offramp.
- Sources: https://modelcontextprotocol.io/specification/2026-07-28/changelog and https://modelcontextprotocol.io/specification/2026-07-28/deprecated
- 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-remotesends a fixed--headerand 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
_metaversion and capabilities; - the required headers;
ttlMs/cacheScopeon list results.- Keep
/ssealongside 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.mdand themcp-surfaceskill.
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
- Đọ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 Taleef7/workwell
-
frontend maui-pilot pilot-ask question
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation owner-ops waiting
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
owner-ops waiting
Độ khó 1/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
-
backend maui-pilot webchart-convergence
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
backend
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Taleef7/workwell
Issue tương tự
-
Add: Digi World (Romania) SDĐang mởcheck:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/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 88/100
Fission-AI/OpenSpec#1986 ·
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 75/100
nestjs/docs.nestjs.com#3554 ·
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 74/100
publicodes/publicodes#868 ·
-
namespace operations
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
EclipseFdn/open-vsx.org#13488 ·
Maintainer thường phản hồi trong vòng 2 ngày