[Demo] SEP-2640 v1 Skills over MCP: skills/list + skills/get + directory read - #3046
Draft
olaservo wants to merge 3 commits into
Draft
[Demo] SEP-2640 v1 Skills over MCP: skills/list + skills/get + directory read#3046olaservo wants to merge 3 commits into
olaservo wants to merge 3 commits into
Conversation
…kills Replaces the earlier skill://index.json discovery-index prototype with the current SEP-2640 surface: - 28 bundled SKILL.md files served as individually addressable resources at skill://github/<name>/SKILL.md, with resource metadata sourced from frontmatter instead of duplicated in Go code - skills/list and skills/get protocol methods carrying verbatim YAML frontmatter and complete per-file sha256 digests per entry - resources/directory/read with inode/directory child listings, declared via the directoryRead capability setting - Dynamic* hooks so a later change can answer skills/get and directory reads for repo-hosted skills outside the bundled registry Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Capability declaration happens before mcp.NewServer (capabilities are captured at construction); resource + method registration happens in the shared constructor so the per-request HTTP server path serves skills too. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Ports the per-repo half of the earlier prototype and reworks it for the
current SEP:
- skill://{owner}/{repo}/{skill_name}/{+file_path} resource template and
list_repo_skills tool (skills toolset), unchanged in role: baseline
URI readability plus model-callable enumeration
- RepoSkillEntry backs skills/get for repo-hosted skill URIs — the SEP's
unenumerable-catalog case: fetches the skill directory, digests every
file, and returns a content-bindable entry for skills no listing
mentions; non-conforming directories answer -32602
- RepoSkillDirectory backs resources/directory/read across repo skill
namespaces, listing discovered skills and walking their trees
- completion handler answers skill:// refs; docs regenerated
The mcp-resource-template index entry from the old prototype has no
successor: the template is discoverable via resources/templates/list, and
skills/get now covers verification for URIs learned out of band.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
4 tasks
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
Server-side demo of SEP-2640 v1 — the Skills extension as scoped down in the July 2026 rework. From-scratch replacement for #2428 / #2360, which targeted the earlier
skill://index.jsonrevision of the SEP. WIP demo fork, not intended for upstream merge as-is.What's in this branch
skill://github/<name>/SKILL.mdvia//go:embed, served as individually addressable resources. Names and descriptions come from SKILL.md frontmatter — no Go-side duplication.skills/list+skills/getprotocol methods (go-sdkAddReceivingCustomMethod): entries carry verbatim YAML frontmatter rendered as JSON and a complete per-filesha256:resourcesset, so hosts can verify and content-bind approvals per the SEP's integrity model. List results carry SEP-2549ttlMs/cacheScope.resources/directory/read, gated behinddirectoryRead: truein theio.modelcontextprotocol/skillscapability declaration; subdirectories markedinode/directory.skillstoolset): theskill://{owner}/{repo}/{skill_name}/{+file_path}resource template andlist_repo_skillstool carry over from the earlier demo, and — new for v1 —skills/getanswers dynamically for repo-hosted skill URIs: the server fetches the skill directory, digests every file, and returns a content-bindable entry for skills no listing mentions (the SEP's unenumerable-catalog case).resources/directory/readwalks repo skill trees the same way.skill://index.json, nomcp-resource-templateindex entries (both superseded in the 2026-07-16 v1 scope-down).Verified end-to-end
Live stdio JSON-RPC against the built binary:
initializedeclares"io.modelcontextprotocol/skills": {"directoryRead": true}skills/list→ 28 entries with verbatim frontmatter, digests,ttlMs/cacheScopeskills/getround-trips a listed skill; unknown URIs answer-32602resources/directory/readonskill://github→ 28inode/directorychildrenTest plan
go build ./...clean;gofmt/go vetclean-32602cases, repo-hosted dynamic entriesskillstoolsetRelated
index.jsondraftindex.json+allowedToolsindex field)🤖 Generated with Claude Code