Title: feat(mcp): subscribe tool — wrap WebSocket notifications as MCP SSE events · Issue #494 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: feat(mcp): subscribe tool — wrap WebSocket notifications as MCP SSE events · Issue #494 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: feat(mcp): subscribe tool — wrap WebSocket notifications as MCP SSE events · Issue #494 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Follow-up to #490 (the MCP capstone in v0.0.200). Why The single biggest UX gap surfaced by the v0.0.200 live-fire smoke. Today, agents watching for new resources have to poll `list_resources` / `read_resource`. For chat-style interactio...
Open Graph Description: Follow-up to #490 (the MCP capstone in v0.0.200). Why The single biggest UX gap surfaced by the v0.0.200 live-fire smoke. Today, agents watching for new resources have to poll `list_resources` / `r...
X Description: Follow-up to #490 (the MCP capstone in v0.0.200). Why The single biggest UX gap surfaced by the v0.0.200 live-fire smoke. Today, agents watching for new resources have to poll `list_resources` / `r...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/494
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(mcp): subscribe tool — wrap WebSocket notifications as MCP SSE events","articleBody":"Follow-up to #490 (the MCP capstone in v0.0.200).\n\n## Why\n\nThe single biggest UX gap surfaced by the v0.0.200 live-fire smoke. Today, agents watching for new resources have to poll \\`list_resources\\` / \\`read_resource\\`. For chat-style interactions (forum messages, bot conversations, real-time docs) that's the wrong shape — latency-sensitive and wasteful.\n\nJSS already has the primitive: \\`/.notifications\\` WebSocket with the \\`solid-0.1\\` protocol. The work is wiring it through MCP, not building a new notification system.\n\n## What\n\nA new MCP tool:\n\n\\`\\`\\`\nsubscribe — Subscribe to change events on a resource or container subtree.\n Returns an SSE-streamed sequence of MCP notifications as resources\n change. Subscription is WAC-gated (Read on each emitted resource).\n\\`\\`\\`\n\nWire path: MCP server, on \\`tools/call\\` for \\`subscribe\\`, switches the HTTP response into SSE mode (Streamable HTTP transport allows this — return \\`text/event-stream\\` instead of \\`application/json\\`). Subscribes server-side to the existing notification pipe, filters events by the agent's WAC visibility, emits each as an MCP notification.\n\n\\`\\`\\`\nevent: notification\ndata: {\"jsonrpc\":\"2.0\",\"method\":\"notifications/resource_changed\",\"params\":{\"path\":\"/forum/channels/general/abc.jsonld\",\"kind\":\"created\"}}\n\\`\\`\\`\n\n## Scope\n\n- Streamable HTTP SSE response path in \\`src/mcp/index.js\\`\n- New \\`subscribe\\` tool handler that bridges \\`src/notifications/\\` to the SSE stream\n- Per-event WAC filtering (don't leak resources the agent can't see)\n- Cleanup on client disconnect\n- Test: subscribe, write a resource via another path, observe the event\n- Doc update in \\`docs/mcp.md\\`\n\nEstimated ~150-250 lines including tests.\n\n## Acceptance\n\n- [ ] \\`subscribe\\` returns an SSE stream of MCP notifications\n- [ ] WAC-filtered (anonymous subscriber only sees public changes)\n- [ ] Survives client reconnect cleanly\n- [ ] Tested against a known write pattern\n- [ ] Documented in \\`docs/mcp.md\\` with a curl example\n\n## Related\n\n- #490 — parent MCP capstone\n- TODO-after — \\`docs/mcp.md\\` deferral note for \\`subscribe\\` is currently true","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-05-18T07:55:37Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/494"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:921a4dae-4460-bd82-9bc0-b260fa302a99 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D206:18D8CC:123AD97:175265A:6B03CE7D |
| html-safe-nonce | e695d5481173d3bb5ec3bc9cd2213a407dcd88c91b67f34c08b7d06d0efb6f51 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjA2OjE4RDhDQzoxMjNBRDk3OjE3NTI2NUE6NkIwM0NFN0QiLCJ2aXNpdG9yX2lkIjoiNDgyODIzMzQ0ODAzODg0NjA3NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fd963004d80d5b83de33f49b61dc0db39e98ecc8dc987c0e7779f5f56e95d6fb |
| hovercard-subject-tag | issue:4467300835 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/494/issue_layout |
| twitter:image | https://opengraph.githubassets.com/241a4f4de3fdfe5a4b2f7b144abe0b672efab7ccb5ed1f74add5a2a30783f150/JavaScriptSolidServer/JavaScriptSolidServer/issues/494 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/241a4f4de3fdfe5a4b2f7b144abe0b672efab7ccb5ed1f74add5a2a30783f150/JavaScriptSolidServer/JavaScriptSolidServer/issues/494 |
| og:image:alt | Follow-up to #490 (the MCP capstone in v0.0.200). Why The single biggest UX gap surfaced by the v0.0.200 live-fire smoke. Today, agents watching for new resources have to poll `list_resources` / `r... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width