You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reject listRoots if not supported by client, without sending any request #1067
if (this.clientCapabilities.roots() == null) {
returnMono.error(newIllegalStateException("Client must be configured with root listing capabilities"));
}
I reproduced this on current main at c7fef64f92a99c8c758b1aa634f92868d7c2963b.
A bounded local patch adding the missing initialized-client / roots-capability guard to McpAsyncServerExchange.listRoots(String cursor), plus a regression test asserting that unsupported roots fail before session.sendRequest, passes the project's formatter and focused McpAsyncServerExchangeTests.
I have not opened a PR yet because CONTRIBUTING asks that non-trivial changes be discussed first. If this scope matches what maintainers want for #1067, I can prepare the focused patch and run the broader required validation before submitting.
No production access or credentials were involved.
Hi, I have a fix for McpAsyncServerExchange.listRoots that mirrors the fast-fail capability checks already used by createMessage and createElicitation in the same class. The full mcp-core test suite passes with the change. I noticed PRs are already open for this issue. Before adding a sixth, could a maintainer confirm the desired scope and whether a new PR would help here, or whether you would prefer to pick up one of the existing ones?
Activity
soyeladice-svg commentedon Sep 25, 2026
I reproduced this on current main at
c7fef64f92a99c8c758b1aa634f92868d7c2963b.A bounded local patch adding the missing initialized-client / roots-capability guard to
McpAsyncServerExchange.listRoots(String cursor), plus a regression test asserting that unsupported roots fail beforesession.sendRequest, passes the project's formatter and focusedMcpAsyncServerExchangeTests.I have not opened a PR yet because CONTRIBUTING asks that non-trivial changes be discussed first. If this scope matches what maintainers want for #1067, I can prepare the focused patch and run the broader required validation before submitting.
No production access or credentials were involved.
sushma3690 commentedon Oct 7, 2026
Hi, I have a fix for McpAsyncServerExchange.listRoots that mirrors the fast-fail capability checks already used by createMessage and createElicitation in the same class. The full mcp-core test suite passes with the change. I noticed PRs are already open for this issue. Before adding a sixth, could a maintainer confirm the desired scope and whether a new PR would help here, or whether you would prefer to pick up one of the existing ones?