Skip to content

[Demo] SEP-2640 v1 Skills over MCP: skills/list + skills/get + directory read - #3046

Draft
olaservo wants to merge 3 commits into
github:mainfrom
olaservo:feature/agent-skills-v2
Draft

[Demo] SEP-2640 v1 Skills over MCP: skills/list + skills/get + directory read#3046
olaservo wants to merge 3 commits into
github:mainfrom
olaservo:feature/agent-skills-v2

Conversation

@olaservo

Copy link
Copy Markdown
Contributor

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.json revision of the SEP. WIP demo fork, not intended for upstream merge as-is.

What's in this branch

  • 28 bundled SKILL.md skills at skill://github/<name>/SKILL.md via //go:embed, served as individually addressable resources. Names and descriptions come from SKILL.md frontmatter — no Go-side duplication.
  • skills/list + skills/get protocol methods (go-sdk AddReceivingCustomMethod): entries carry verbatim YAML frontmatter rendered as JSON and a complete per-file sha256: resources set, so hosts can verify and content-bind approvals per the SEP's integrity model. List results carry SEP-2549 ttlMs/cacheScope.
  • resources/directory/read, gated behind directoryRead: true in the io.modelcontextprotocol/skills capability declaration; subdirectories marked inode/directory.
  • Per-repo surface (non-default skills toolset): the skill://{owner}/{repo}/{skill_name}/{+file_path} resource template and list_repo_skills tool carry over from the earlier demo, and — new for v1 — skills/get answers 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/read walks repo skill trees the same way.
  • Retired v1-incompatible surface removed: no skill://index.json, no mcp-resource-template index entries (both superseded in the 2026-07-16 v1 scope-down).

Verified end-to-end

Live stdio JSON-RPC against the built binary:

  • initialize declares "io.modelcontextprotocol/skills": {"directoryRead": true}
  • skills/list → 28 entries with verbatim frontmatter, digests, ttlMs/cacheScope
  • skills/get round-trips a listed skill; unknown URIs answer -32602
  • resources/directory/read on skill://github → 28 inode/directory children

Test plan

  • go build ./... clean; gofmt/go vet clean
  • Unit tests: frontmatter verbatim round-trip, digest format, entry completeness, directory semantics, -32602 cases, repo-hosted dynamic entries
  • In-memory client/server test exercising the full extension surface
  • Docs regenerated for the skills toolset

Related

🤖 Generated with Claude Code

olaservo and others added 3 commits August 5, 2026 21:33
…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>
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.

1 participant