mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-02-19 11:54:58 -05:00
In roots.ts, clientCapabilites.roots and response.roots are optional.
Fixes #2818
This commit is contained in:
@@ -41,7 +41,7 @@ export const syncRoots = async (server: McpServer, sessionId?: string) => {
|
||||
const response = await server.server.listRoots();
|
||||
if (response && "roots" in response) {
|
||||
// Store the roots list for this client
|
||||
roots.set(sessionId, response?.roots);
|
||||
roots.set(sessionId, response.roots);
|
||||
|
||||
// Notify the client of roots received
|
||||
await server.sendLoggingMessage(
|
||||
|
||||
Reference in New Issue
Block a user