feat(mcp): GET /api/v1/mcp/skill — env-customized Agent Skill download (#2714)#2728
Merged
Conversation
#2714) renderSkillMarkdown had no HTTP outlet. Serve it from the runtime dispatcher as text/markdown via the raw stream channel (the response channel JSON-encodes bodies), public like /discovery, 404 when the MCP surface is opted out, 501 without the mcp service; URL from auth getMcpResourceUrl() with request-host fallback. Live-verified on showcase (raw markdown + headers + URL injection). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 2 package(s): 21 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
This was referenced Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#2714 Phase 1 — the framework dependency called out in objectstack-ai/objectui#2363:
renderSkillMarkdown()(the ONE generic skill, ADR-0036 Amendment C) had no HTTP outlet.What
GET /api/v1/mcp/skillserves the environment-customizedSKILL.mdastext/markdown(+content-disposition: inline; filename="SKILL.md",cache-control: no-store— same reasoning as/discovery, cloud#152)./discovery: the content is generic agent instructions plus a URL the caller already knows — no schema, no tenant data./mcp: 404 whenOS_MCP_SERVER_ENABLED=false(nothing advertised), 501 when the MCP plugin isn't loaded, 405 (+Allow) for non-GET.getMcpResourceUrl()first, request-host (host+x-forwarded-proto) fallback, documented placeholder last.MCPServerRuntime.renderSkill()exposes the renderer through the registered'mcp'service, so the runtime keeps zero dependency on@objectstack/mcp(same duck-typed seam ashandleHttpRequest).resultstream channel (single-chunk) — theresponsechannel JSON-encodes bodies unconditionally, which would have shipped a quoted string.Verification
http://localhost:3210/api/v1/mcpinjected into the Connect section from the request host.Refs #2714, objectstack-ai/objectui#2363.
🤖 Generated with Claude Code