diff --git a/package-lock.json b/package-lock.json index 2af3e6a..63ec9e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "dependencies": { "@mcp-ui/server": "^6.1.0", "@modelcontextprotocol/ext-apps": "^1.1.1", - "@modelcontextprotocol/sdk": "^1.27.1", + "@modelcontextprotocol/sdk": "^1.29.0", "@opentelemetry/api": "^1.9.0", "@opentelemetry/auto-instrumentations-node": "^0.56.0", "@opentelemetry/exporter-trace-otlp-http": "^0.56.0", @@ -2065,9 +2065,9 @@ ] }, "node_modules/@modelcontextprotocol/sdk": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.27.1.tgz", - "integrity": "sha512-sr6GbP+4edBwFndLbM60gf07z0FQ79gaExpnsjMGePXqFcSSb7t6iscpjk9DhFhwd+mTEQrzNafGP8/iGGFYaA==", + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.29.0.tgz", + "integrity": "sha512-zo37mZA9hJWpULgkRpowewez1y6ML5GsXJPY8FI0tBBCd77HEvza4jDqRKOXgHNn867PVGCyTdzqpz0izu5ZjQ==", "license": "MIT", "dependencies": { "@hono/node-server": "^1.19.9", @@ -11620,9 +11620,9 @@ } }, "node_modules/path-to-regexp": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", - "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==", + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.1.tgz", + "integrity": "sha512-fvU78fIjZ+SBM9YwCknCvKOUKkLVqtWDVctl0s7xIqfmfb38t2TT4ZU2gHm+Z8xGwgW+QWEU3oQSAzIbo89Ggw==", "license": "MIT", "funding": { "type": "opencollective", diff --git a/package.json b/package.json index e143e35..1e068f8 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "dependencies": { "@mcp-ui/server": "^6.1.0", "@modelcontextprotocol/ext-apps": "^1.1.1", - "@modelcontextprotocol/sdk": "^1.27.1", + "@modelcontextprotocol/sdk": "^1.29.0", "@opentelemetry/api": "^1.9.0", "@opentelemetry/auto-instrumentations-node": "^0.56.0", "@opentelemetry/exporter-trace-otlp-http": "^0.56.0", diff --git a/patches/@modelcontextprotocol+sdk+1.27.1.patch b/patches/@modelcontextprotocol+sdk+1.29.0.patch similarity index 59% rename from patches/@modelcontextprotocol+sdk+1.27.1.patch rename to patches/@modelcontextprotocol+sdk+1.29.0.patch index 84cd1c1..ebf0718 100644 --- a/patches/@modelcontextprotocol+sdk+1.27.1.patch +++ b/patches/@modelcontextprotocol+sdk+1.29.0.patch @@ -1,8 +1,26 @@ -diff --git a/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js b/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js -index 23639ce..7b8a325 100644 +--- a/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js ++++ b/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js +@@ -197,7 +197,7 @@ + return; + } + if (!result.structuredContent) { +- throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, `Output validation error: Tool ${toolName} has an output schema but no structured content was provided`); ++ console.warn(`[MCP SDK Patch] Output validation warning: Tool ${toolName} has an output schema but no structured content was provided`); + } + // if the tool has an output schema, validate structured content + const outputObj = (0, zod_compat_js_1.normalizeObjectSchema)(tool.outputSchema); +@@ -205,7 +205,7 @@ + if (!parseResult.success) { + const error = 'error' in parseResult ? parseResult.error : 'Unknown error'; + const errorMessage = (0, zod_compat_js_1.getParseErrorMessage)(error); +- throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, `Output validation error: Invalid structured content for tool ${toolName}: ${errorMessage}`); ++ console.warn(`[MCP SDK Patch] Output validation warning: Invalid structured content for tool ${toolName}: ${errorMessage}`); + } + } + /** --- a/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js +++ b/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js -@@ -194,15 +194,20 @@ export class McpServer { +@@ -194,15 +194,20 @@ return; } if (!result.structuredContent) {