Repository navigation
Conversation
A static mcpResources entry can name a subscribe method, so MCP clients can watch custom URIs with resources/subscribe. Covers the method's calling convention, how Harper releases the stream, identity lifetime, the JSON-RPC errors a refused subscribe answers, and background restore on reconnect. Companion to HarperFast/harper#3257. Dispatch-Task: harper-3250-mcp-resource-subscribe Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019W6f2CJA6oE5ixf6S2b4Ah
… statements The example now carries its own authorization gate and subscribes through the exported class; the scoped-token exception, the bad-subscribe case and the exact not-subscribable message are stated; changes-only delivery and audit-log delivery are scoped to row-backed resources; a 5.4 release note. Dispatch-Task: harper-3250-mcp-resource-subscribe Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019W6f2CJA6oE5ixf6S2b4Ah
…ote does Dispatch-Task: harper-3250-mcp-resource-subscribe Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019W6f2CJA6oE5ixf6S2b4Ah
… streams end Dispatch-Task: harper-3250-mcp-resource-subscribe Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019W6f2CJA6oE5ixf6S2b4Ah
There was a problem hiding this comment.
Code Review
This pull request updates the Harper Model Context Protocol (MCP) documentation and release notes for version 5.4.0, detailing how MCP clients can now subscribe to custom resources using a new subscribe method. The review feedback recommends avoiding the use of the <VersionBadge> component mid-sentence in running prose across several files, suggesting plain text alternatives instead to improve readability.
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-734 This preview will update automatically when you push new commits. |
Dispatch-Task: harper-3250-mcp-resource-subscribe Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019W6f2CJA6oE5ixf6S2b4Ah
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-734 This preview will update automatically when you push new commits. |
⊙ Problem
Let MCP clients subscribe to custom mcpResources URIs (harper#3257) adds an optional
subscribetostatic mcpResourcesentries. Today the MCP reference says only row-backed resources are subscribable. It does not say what an author'ssubscribemethod must return, or when Harper releases the stream.🤔 Should the docs commit to the release order:
end(), otherwise the iterator'sreturn()?Yes. An author cannot write a correct stream without knowing it. Clients see the refusal of a generator, or of a stream that has neither, as
-32603. The implementation's tests pin that order.💡 Solution
reference/mcp/tools-and-resources.md: a new "Subscribing to custom resources" section.subscribe.reference/mcp/subscriptions.md:reference/mcp/overview.md: the feature list mentions custom subscriptions.release-notes/v5-lincoln/5.4.md: an entry under Subscriptions.🤔 Is authorizing once, at subscribe time, enough?
That is what the implementation does, and the page says so:
🤔 Why does the sample's own gate answer
-32603rather thanpermission denied?It reuses the page's read-example gate, which throws a plain
Error. Only anAccessViolationmaps to-32602 permission denied, as the Errors bullet states, and theharperpackage does not export that class (harperindex.ts).🤔 Should the HTTP 500 → JSON-RPC error change get its own release-note heading?
No. It lands in the same entry because one PR made both changes. The old answer was already a JSON-RPC envelope, only with status 500.
✅ Verification
ff6b85701: error strings, release order, generator handling, scoped-token lifetime and restore concurrency.npm run buildsucceeds with no broken links or anchors, andnpm run format:checkis clean.getstub;CONTRIBUTING.md(raised by Gemini on the PR).v5.4tag or branch, and the newest tag was v5.3.2. Sov5.4.0is the first release that can carry this; recheck the tags before merge.🤖 Generated by Claude Code (Claude Opus 5.5); posted via @kriszyp.
🤖 Generated with Claude Code
https://claude.ai/code/session_019W6f2CJA6oE5ixf6S2b4Ah
Related PRs: none found
Complexity: easy
Review-Coverage: authored=claude; ran=gemini,cursor-composer,codex,cursor-muse; adjudicated=domain; declined=cursor-grok,cursor-kimi,muse; rounds=5; full=2 @ c24c6a9
Review-Attention: skim ~2m (decisions: inline-version-marker-form, example-auth-via-get-override, error-shape-change-placement) @ c24c6a9