Skip to content

Align resource layer with SEP-2640 (Skills Extension)#59

Merged
olaservo merged 2 commits into
mainfrom
feature/update-resource-functionality
May 3, 2026
Merged

Align resource layer with SEP-2640 (Skills Extension)#59
olaservo merged 2 commits into
mainfrom
feature/update-resource-functionality

Conversation

@olaservo

@olaservo olaservo commented May 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace the existing skill://{name} and skill://{name}/ URIs with the SEP-2640 shape: skill://<skill-path>/SKILL.md for the skill markdown, sibling URIs for supporting files, and a new skill://index.json discovery resource.
  • Declare the SEP extension capability extensions["io.modelcontextprotocol/skills"]: {} in the initialize response.
  • Add four helpers (getSkillPath, buildSkillResourceUri, parseSkillResourceUri, buildSkillIndex) in skill-discovery.ts and reuse them from resources, subscriptions, and prompts.

This is a breaking change to the URI scheme. Pre-1.0, draft SEP, no backward-compat shims.

Resource shape after this PR

URI Listed? Returns
skill://<skill-path>/SKILL.md yes SKILL.md (text/markdown), name and description from frontmatter
skill://<skill-path>/<file-path> no (template-resolvable) Supporting file with extension-derived MIME type
skill://index.json yes SEP discovery index (application/json)

<skill-path> is <prefix>/<baseName> for prefixed skills (local: dir basename, GitHub: owner-repo) or just <baseName> for bundled — final segment always equals the frontmatter + 'name' + per SEP.

Out of scope

  • Archive (type: "archive") entries in the index.
  • + 'mcp-resource-template' + index entries.
  • + '_meta' + projection of additional frontmatter (commit + '207b3fd' + removed it; reintroducing would contradict that direction).

Test plan

  • + 'npm run build' + clean
  • + 'npm test' + — 168/168 passing (rewrote + 'skill-resources.test.ts' + and + 'subscriptions.test.ts' + , extended + 'skill-discovery.test.ts' + with helper coverage)
  • Manual via MCP Inspector:
    • + 'initialize' + advertises + 'extensions["io.modelcontextprotocol/skills"]' +
    • + 'resources/list' + shows one + 'skill:///SKILL.md' + per skill plus + 'skill://index.json' + ; no legacy + 'skill://name' + or + 'skill://name/' +
    • + 'resources/read' + of + 'skill://index.json' + returns SEP-shaped JSON
    • + 'resources/read' + of + 'skill:///SKILL.md' + returns markdown
    • + 'resources/read' + of a sibling file (e.g., + 'skill:///scripts/example.py' + ) returns content
    • Subscribe to + 'skill://index.json' + ; modify any SKILL.md → notification fires
    • Add a new SKILL.md on disk → + 'notifications/resources/list_changed' + and + 'notifications/resources/updated' + for + 'skill://index.json' + both fire

🤖 Generated with Claude Code

olaservo and others added 2 commits May 3, 2026 15:24
Replace legacy `skill://{name}` and `skill://{name}/` URIs with the SEP-2640
shape: `skill://<skill-path>/SKILL.md` for skill markdown, individual files
addressable as siblings, and a new `skill://index.json` discovery resource.
Declares the `io.modelcontextprotocol/skills` extension in initialize
capabilities, and adds `getSkillPath` / `buildSkillResourceUri` /
`parseSkillResourceUri` / `buildSkillIndex` helpers in skill-discovery.ts.

This is a breaking change to the URI scheme; pre-1.0, draft SEP, no shims.

SEP: modelcontextprotocol/modelcontextprotocol#2640

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Document the new URI shapes, the `extensions["io.modelcontextprotocol/skills"]`
capability, and the four SEP helpers in skill-discovery.ts. Note the explicit
`skill://index.json` update notification fired from `refreshSkills()`.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@olaservo
olaservo merged commit 7584861 into main May 3, 2026
@olaservo
olaservo deleted the feature/update-resource-functionality branch May 3, 2026 22:34
This was referenced May 3, 2026
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