feat: serve /.well-known/webmcp.json — WebMCP manifest endpoint#149
Open
dfinityianblenke wants to merge 1 commit intomainfrom
Open
feat: serve /.well-known/webmcp.json — WebMCP manifest endpoint#149dfinityianblenke wants to merge 1 commit intomainfrom
dfinityianblenke wants to merge 1 commit intomainfrom
Conversation
Adds a statically-generated WebMCP manifest at /.well-known/webmcp.json that exposes the three skills canister query methods as AI agent tools. The manifest follows the WebMCP 1.0 schema and is consumed by: - Chrome 146+ navigator.modelContext (native WebMCP support) - @dfinity/webmcp polyfill (for all other browsers, Claude Code, Cursor, etc.) - ic-webmcp-codegen for generating client registration scripts Set SKILLS_CANISTER_ID at build time to embed the deployed canister principal: SKILLS_CANISTER_ID=<principal> npm run build When unset the manifest omits canister.id; ICWebMCP will error until the canister is deployed and the site is rebuilt with the real principal. The /.well-known/**/*.json CORS rule in .ic-assets.json5 already covers this file (public, max-age=300, Access-Control-Allow-Origin: *). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Skill Validation ReportNo skill files were changed in this PR — validation skipped. |
This was referenced Apr 2, 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.
Summary
Adds a statically-generated
/.well-known/webmcp.jsonendpoint that exposes the three skills canister query methods as callable AI agent tools.Manifest exposes three tools (WebMCP 1.0 schema):
list_skills—list_skills()— All skill topics with metadataget_skill—get_skill(name)— Full SKILL.md + frontmatter for one skillsearch_skills—search_skills(query)— Keyword search across all skillsAll three are
querymethods with"certified": true.Canister ID injection — set
SKILLS_CANISTER_IDat build time:When unset the manifest omits
canister.id. This is intentional: PR #148 (skills canister) must be deployed first to obtain the real principal, then the site is rebuilt with it set.CORS headers are already handled by the existing
.ic-assets.json5rule for.well-known/**/*.json(Access-Control-Allow-Origin: *, max-age=300).Consumers of this manifest:
navigator.modelContext(native WebMCP)@dfinity/webmcppolyfill (follow-up PR 3 — adds polyfill to site)ic-webmcp-codegen dfx(thewebmcpsection indfx.jsonfrom PR feat: skills canister — list_skills, get_skill, search_skills #148 maps directly to this manifest)Test plan
npm run buildsucceeds (verified locally)dist/.well-known/webmcp.jsonexists and contains all three toolsSKILLS_CANISTER_ID=ryjl3-tyaaa-aaaaa-aaaba-cai npm run build—canister.idappears in manifestcanister.idis omitted (notnull, not""), no build errorThis extends PR 148, and that should be merged first.
This optionally can (and probably should) be followed by PR 150 as well.