Add Skills extension (SEP-2640) to the modern server by tarun-agarwal1044 · Pull Request #1214 · modelcontextprotocol/java-sdk · GitHub
Skip to content

Add Skills extension (SEP-2640) to the modern server - #1214

Open
tarun-agarwal1044 wants to merge 3 commits into
modelcontextprotocol:mainfrom
tarun-agarwal1044:feat/skills-extension-modern
Open

tarun-agarwal1044 wants to merge 3 commits into
modelcontextprotocol:mainfrom
tarun-agarwal1044:feat/skills-extension-modern

Conversation

@tarun-agarwal1044

@tarun-agarwal1044 tarun-agarwal1044 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds server-side support for the Skills extension (SEP-2640, io.modelcontextprotocol/skills) to the modern (2026-07-28) server, modelled on the Python SDK implementation (python-sdk#3485).

  • SkillsSchema: wire types (Skill, SkillResource, ListSkillsResult, GetSkillResult, ReadDirectoryRequest/Result). Entries validate SEP-2640 rules on construction/deserialization; listing the same skill twice is rejected.
  • McpAsyncSkillRepository / McpSyncSkillRepository + SkillsFeature: serves skills/list, skills/get, and optionally resources/directory/read (opt-in via supportsDirectoryRead(), which advertises directoryRead: true).
  • Conformance fixture serves a sample skill.

Conformance

  • sep-2640-skills-enumeration 32/32, -manifest 6/6, -directory 7/7
  • Full --requirements 2026-07-28 suite unchanged (155 passed / 35 pre-existing failures)

Notes / differences from Python

  • Uses the repository pattern, consistent with Tools/Resources features.
  • Skill deserialization is strict (deviates from CONTRIBUTING lenient-parsing guidance) because SEP-2640 says hosts must not load invalid entries.
  • No client side (no modern client yet), no docs page, skills/get cache TTL comes from feature defaults.

Open questions

 Part of #1140 (server side)

Adds skills/list and skills/get to the 2026-07-28 server as a SkillsFeature
that advertises the io.modelcontextprotocol/skills extension. Skill files are
served by the existing ResourcesFeature through resources/read.

- SkillsSchema: wire types, including the array-or-"dynamic" resources union,
  SHA-256 digest helpers, and validation of the SEP-2640 entry rules
- SkillsFeature with async and sync skill repositories and cache defaults;
  unknown or non-SKILL.md URIs are invalid params, nonconforming entries an
  internal error
- A sample skill in the modern conformance server; the
  sep-2640-skills-enumeration and -manifest scenarios pass

resources/directory/read (directoryRead) is not included.
- Skill and SkillResource validate the SEP-2640 rules when constructed or
  deserialized, and ListSkillsResult rejects a skill listed twice
- Over-limit skills are accepted without a warning, as the limits are SHOULD NOTs
- Optional resources/directory/read: a repository that supportsDirectoryRead()
  advertises directoryRead and serves the method; trailing-slash or unknown
  directories are invalid params, a non-direct child an internal error
- The conformance server serves directory reads; sep-2640-skills-directory passes
@tarun-agarwal1044
tarun-agarwal1044 marked this pull request as ready for review October 21, 2026 12:59

This branch has not been deployed

No deployments
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