diff --git a/package-lock.json b/package-lock.json index c07a741897..56ba065ca9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5818,7 +5818,7 @@ "version": "0.6.2", "license": "MIT", "dependencies": { - "@modelcontextprotocol/sdk": "^1.12.0", + "@modelcontextprotocol/sdk": "^1.17.4", "express": "^4.21.1", "zod": "^3.23.8", "zod-to-json-schema": "^3.23.5" @@ -5833,9 +5833,9 @@ } }, "src/everything/node_modules/@modelcontextprotocol/sdk": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.12.3.tgz", - "integrity": "sha512-DyVYSOafBvk3/j1Oka4z5BWT8o4AFmoNyZY9pALOm7Lh3GZglR71Co4r4dEUoqDWdDazIZQHBe7J2Nwkg6gHgQ==", + "version": "1.17.4", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.17.4.tgz", + "integrity": "sha512-zq24hfuAmmlNZvik0FLI58uE5sriN0WWsQzIlYnzSuKDAHFqJtBFrl/LfB1NLgJT5Y7dEBzaX4yAKqOPrcetaw==", "license": "MIT", "dependencies": { "ajv": "^6.12.6", @@ -5843,6 +5843,7 @@ "cors": "^2.8.5", "cross-spawn": "^7.0.5", "eventsource": "^3.0.2", + "eventsource-parser": "^3.0.0", "express": "^5.0.1", "express-rate-limit": "^7.5.0", "pkce-challenge": "^5.0.0", diff --git a/src/everything/everything.ts b/src/everything/everything.ts index 3360846380..c313b6eaaa 100644 --- a/src/everything/everything.ts +++ b/src/everything/everything.ts @@ -164,8 +164,7 @@ export const createServer = () => { resources: { subscribe: true }, tools: {}, logging: {}, - completions: {}, - elicitation: {}, + completions: {} }, instructions } @@ -177,7 +176,7 @@ export const createServer = () => { let logLevel: LoggingLevel = "debug"; let logsUpdateInterval: NodeJS.Timeout | undefined; - // Store client capabilities + // Store client capabilities let clientCapabilities: ClientCapabilities | undefined; // Roots state management @@ -523,11 +522,6 @@ export const createServer = () => { "Returns a resource reference that can be used by MCP clients", inputSchema: zodToJsonSchema(GetResourceReferenceSchema) as ToolInput, }, - { - name: ToolName.ELICITATION, - description: "Demonstrates the Elicitation feature by asking the user to provide information about their favorite color, number, and pets.", - inputSchema: zodToJsonSchema(ElicitationSchema) as ToolInput, - }, { name: ToolName.GET_RESOURCE_LINKS, description: @@ -548,7 +542,12 @@ export const createServer = () => { "Lists the current MCP roots provided by the client. Demonstrates the roots protocol capability even though this server doesn't access files.", inputSchema: zodToJsonSchema(ListRootsSchema) as ToolInput, }); - + if (clientCapabilities!.elicitation) tools.push ({ + name: ToolName.ELICITATION, + description: "Demonstrates the Elicitation feature by asking the user to provide information about their favorite color, number, and pets.", + inputSchema: zodToJsonSchema(ElicitationSchema) as ToolInput, + }); + return { tools }; }); diff --git a/src/everything/package.json b/src/everything/package.json index 55777ac788..0cff945cb8 100644 --- a/src/everything/package.json +++ b/src/everything/package.json @@ -22,7 +22,7 @@ "start:streamableHttp": "node dist/streamableHttp.js" }, "dependencies": { - "@modelcontextprotocol/sdk": "^1.12.0", + "@modelcontextprotocol/sdk": "^1.17.4", "express": "^4.21.1", "zod": "^3.23.8", "zod-to-json-schema": "^3.23.5"