Skip to content

Commit be703ff

Browse files
PederHPclaude
andcommitted
chore: add changeset for capability negotiation fix
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 8fcec13 commit be703ff

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@modelcontextprotocol/client': patch
3+
---
4+
5+
Respect capability negotiation in list methods by returning empty lists when server lacks capability
6+
7+
The Client now returns empty lists instead of sending requests to servers that don't advertise the corresponding capability:
8+
- `listPrompts()` returns `{ prompts: [] }` if server lacks prompts capability
9+
- `listResources()` returns `{ resources: [] }` if server lacks resources capability
10+
- `listResourceTemplates()` returns `{ resourceTemplates: [] }` if server lacks resources capability
11+
- `listTools()` returns `{ tools: [] }` if server lacks tools capability
12+
13+
This respects the MCP spec requirement that "Both parties SHOULD respect capability negotiation" and avoids unnecessary server warnings and traffic. The existing `enforceStrictCapabilities` option continues to throw errors when set to `true`.

0 commit comments

Comments
 (0)