Skip to content

Document MCP custom content resources (mcpResources) and the harper+rest:// descriptor scheme#567

Open
kylebernhardy wants to merge 3 commits into
mainfrom
docs/mcp-custom-resources-1609
Open

Document MCP custom content resources (mcpResources) and the harper+rest:// descriptor scheme#567
kylebernhardy wants to merge 3 commits into
mainfrom
docs/mcp-custom-resources-1609

Conversation

@kylebernhardy

Copy link
Copy Markdown
Member

Companion docs for HarperFast/harper#1613 (fixes HarperFast/harper#1609).

Changes to reference/mcp/tools-and-resources.md

  • New Custom mcpResources opt-in section (parallel to Custom mcpTools): fixed URIs vs uriTemplate ({name}/{+name} semantics), content return shapes (text/blob/JSON), live-class dispatch + RBAC delegation, per-parameter completions, reserved-scheme rule, sanitized error behavior.
  • https:// URIs section → harper+rest:// with the rationale (spec reserves https for web-fetchable resources) and the back-compat note for legacy URIs.
  • New Custom content URIs subsection tying the resources surface together (custom-match precedence).

Note for review

Version references say "5.1.16+" assuming harper#1613 ships in the next 5.1 patch — confirm at merge time. Hold merging until harper#1613 lands.

Generated by an LLM (Claude Fable 5).

…scheme (harper#1613)

Companion to HarperFast/harper#1613 (fixes HarperFast/harper#1609):
static mcpResources opt-in (fixed URIs + templates + completions +
reserved-scheme rule), and exported-Resource descriptors moving from
http(s):// to harper+rest:// with back-compat.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the MCP tools and resources documentation to introduce the custom mcpResources opt-in feature, allowing component authors to expose arbitrary content under custom URIs. It also documents the transition from https:// to harper+rest:// URIs for application profile resources in version 5.1.16+ to align with the MCP specification. I have no feedback to provide as there are no review comments.

@github-actions
github-actions Bot temporarily deployed to pr-567 July 6, 2026 14:24 Inactive
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

🚀 Preview Deployment

Your preview deployment is ready!

🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-567

This preview will update automatically when you push new commits.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kylebernhardy

Copy link
Copy Markdown
Member Author

harper#1613 merged to v5.1 — version refs corrected to 5.1.18 (5.1.16/5.1.17 shipped before the merge). Unblocked whenever you're ready. Comment generated by an LLM (Claude Fable 5).

@github-actions
github-actions Bot temporarily deployed to pr-567 July 8, 2026 14:42 Inactive
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

🚀 Preview Deployment

Your preview deployment is ready!

🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-567

This preview will update automatically when you push new commits.

…ved, no login gate

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

🚀 Preview Deployment

Your preview deployment is ready!

🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-567

This preview will update automatically when you push new commits.

@kylebernhardy
kylebernhardy marked this pull request as ready for review July 22, 2026 04:07
@kylebernhardy
kylebernhardy requested a review from a team as a code owner July 22, 2026 04:07

### Custom `mcpResources` opt-in

A component author can expose arbitrary content — documentation pages, rendered reports, any `text` or `blob` payload — as MCP resources under author-chosen URIs by declaring a static `mcpResources` array (5.1.18+):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use the repository's standard availability annotation here? Please add <VersionBadge version="v5.1.18" /> on its own line below the heading and remove (5.1.18+) from this sentence. That keeps this patch-level addition consistent with the neighboring v5.1 feature documentation.

];

async readIndex() {
return { text: '- docs:///guides/install.md\n…', mimeType: 'text/markdown' };

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our content style prefers plain ASCII when typography is not meaningful. Could this sample use ... instead of the Unicode ellipsis, and make the same replacement in the docs:///… example below? That also makes the copied examples easier to type and search.

### `harper+rest://` URIs

The application profile additionally exposes every exported `Resource` (that passes the `exportTypes.mcp` gate **and** the `hasRestVerbs` check) as an `https://<host>:<port>/<path>` URI. These resolve in-process via `Resources.getMatch(path, 'mcp')` — there is no outbound HTTP request. The body returned by `resources/read` is a small descriptor:
The application profile additionally exposes every exported `Resource` (that passes the `exportTypes.mcp` gate **and** the `hasRestVerbs` check) as a `harper+rest://<host>:<port>/<path>` URI (5.1.18+ — earlier releases listed these under `http(s)://`, which the MCP spec reserves for resources a client can fetch directly from the web; legacy `http(s)://` URIs continue to work for `resources/read` and `resources/subscribe`). These resolve in-process via `Resources.getMatch(path, 'mcp')` — there is no outbound HTTP request. The body returned by `resources/read` is a small descriptor:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this is a change to the existing descriptor URI behavior, please add <VersionBadge type="changed" version="v5.1.18" /> on its own line below the heading and remove the inline (5.1.18+) marker. This uses the repository's standard distinction between a newly added surface and changed behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP application profile: no hook to expose custom content resources (only Resource descriptors + harper:// metadata)

3 participants