Skip to content

Add grouping extension implementation with tests and examples#11

Draft
chughtapan wants to merge 4 commits intomodelcontextprotocol:mainfrom
chughtapan:groups/implementation
Draft

Add grouping extension implementation with tests and examples#11
chughtapan wants to merge 4 commits intomodelcontextprotocol:mainfrom
chughtapan:groups/implementation

Conversation

@chughtapan
Copy link
Contributor

@chughtapan chughtapan commented Mar 4, 2026

Porting over the reference implementation from @cliffhall's SDK PR (modelcontextprotocol/typescript-sdk#1399) for the extension package.

Extension vs SDK differences

Aspect SDK (PR #1399) Extension (this PR)
Capability path capabilities.groups capabilities.extensions["io.modelcontextprotocol/grouping"]
Server API McpServer.registerGroup() new GroupingExtension(mcpServer).registerGroup()
Client API Client.listGroups() new GroupingClient(client).listGroups()

Blocked on typescript-sdk #1629 and #1630.

Test plan

  • npm run build — TypeScript compiles
  • npm test — 5/5 tests pass
  • npm run lint — ESLint + Prettier clean

🤖 Generated with Claude Code

chughtapan and others added 4 commits March 4, 2026 11:31
Port tests and examples from the reference SDK implementation
(modelcontextprotocol/typescript-sdk#1399)
to the extension wrapper, adapted for GroupingExtension/GroupingClient.

Tests mirror the reference's 3 server tests + 2 notification tests.
Server example aligns tool schemas, resource URIs, and content.
Client example adds depth control, cycle-safe traversal, and
multi-group filtering.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The lockfile still referenced the old @anthropic/ext-grouping name.
Regenerated to match @modelcontextprotocol/ext-grouping.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Switch capability registration from experimental to extensions
- Add prompt registrations with group membership to example server
- Add prompt grouping to mixed-group test
- Update README capability section

Co-Authored-By: Claude Opus 4.6 <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