From 23771dfe8d70c6560bc3b8ab778eaa3abf76c507 Mon Sep 17 00:00:00 2001 From: MQ Date: Wed, 21 May 2025 16:48:15 +0200 Subject: [PATCH 1/3] update mcp sdk --- package-lock.json | 11 ++++++----- package.json | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index d0c74c3..40f1a60 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@apify/datastructures": "^2.0.3", "@apify/log": "^2.5.16", - "@modelcontextprotocol/sdk": "^1.10.1", + "@modelcontextprotocol/sdk": "^1.11.4", "ajv": "^8.17.1", "apify": "^3.4.0", "apify-client": "^2.12.3", @@ -1066,14 +1066,15 @@ "license": "MIT" }, "node_modules/@modelcontextprotocol/sdk": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.10.1.tgz", - "integrity": "sha512-xNYdFdkJqEfIaTVP1gPKoEvluACHZsHZegIoICX8DM1o6Qf3G5u2BQJHmgd0n4YgRPqqK/u1ujQvrgAxxSJT9w==", + "version": "1.11.4", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.11.4.tgz", + "integrity": "sha512-OTbhe5slIjiOtLxXhKalkKGhIQrwvhgCDs/C2r8kcBTy5HR/g43aDQU0l7r8O0VGbJPTNJvDc7ZdQMdQDJXmbw==", "license": "MIT", "dependencies": { + "ajv": "^8.17.1", "content-type": "^1.0.5", "cors": "^2.8.5", - "cross-spawn": "^7.0.3", + "cross-spawn": "^7.0.5", "eventsource": "^3.0.2", "express": "^5.0.1", "express-rate-limit": "^7.5.0", diff --git a/package.json b/package.json index ecba6d3..0ecc360 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "dependencies": { "@apify/datastructures": "^2.0.3", "@apify/log": "^2.5.16", - "@modelcontextprotocol/sdk": "^1.10.1", + "@modelcontextprotocol/sdk": "^1.11.4", "ajv": "^8.17.1", "apify": "^3.4.0", "apify-client": "^2.12.3", From e0132a42f8e7e88c31feaa6ba085c133c7acf599 Mon Sep 17 00:00:00 2001 From: MQ Date: Wed, 21 May 2025 18:00:53 +0200 Subject: [PATCH 2/3] fix content possibly undefined --- src/examples/clientStreamableHttp.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/examples/clientStreamableHttp.ts b/src/examples/clientStreamableHttp.ts index 7d50e40..50f6212 100644 --- a/src/examples/clientStreamableHttp.ts +++ b/src/examples/clientStreamableHttp.ts @@ -73,7 +73,8 @@ async function callSearchTool(client: Client): Promise { }; const searchResult = await client.request(searchRequest, CallToolResultSchema); log.debug('Search result:'); - searchResult.content.forEach((item) => { + const resultContent = searchResult.content || []; + resultContent.forEach((item) => { if (item.type === 'text') { log.debug(`\t${item.text}`); } @@ -95,7 +96,8 @@ async function callActor(client: Client): Promise { }; const actorResult = await client.request(actorRequest, CallToolResultSchema); log.debug('Actor results:'); - actorResult.content.forEach((item) => { + const resultContent = actorResult.content || []; + resultContent.forEach((item) => { if (item.type === 'text') { log.debug(`- ${item.text}`); } From 818b7dd85ec5b9aa423e9e67f5ce6c5161884935 Mon Sep 17 00:00:00 2001 From: Jiri Spilka Date: Wed, 21 May 2025 23:27:27 +0200 Subject: [PATCH 3/3] fix: bump mcp sdk to version 1.11.5 --- package-lock.json | 9 ++++----- package.json | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 40f1a60..f47a062 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@apify/datastructures": "^2.0.3", "@apify/log": "^2.5.16", - "@modelcontextprotocol/sdk": "^1.11.4", + "@modelcontextprotocol/sdk": "^1.11.5", "ajv": "^8.17.1", "apify": "^3.4.0", "apify-client": "^2.12.3", @@ -1066,10 +1066,9 @@ "license": "MIT" }, "node_modules/@modelcontextprotocol/sdk": { - "version": "1.11.4", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.11.4.tgz", - "integrity": "sha512-OTbhe5slIjiOtLxXhKalkKGhIQrwvhgCDs/C2r8kcBTy5HR/g43aDQU0l7r8O0VGbJPTNJvDc7ZdQMdQDJXmbw==", - "license": "MIT", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.11.5.tgz", + "integrity": "sha512-gS7Q7IHpKxjVaNLMUZyTtatZ63ca3h418zPPntAhu/MvG5yfz/8HMcDAOpvpQfx3V3dsw9QQxk8RuFNrQhLlgA==", "dependencies": { "ajv": "^8.17.1", "content-type": "^1.0.5", diff --git a/package.json b/package.json index 0ecc360..50cd6ec 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "dependencies": { "@apify/datastructures": "^2.0.3", "@apify/log": "^2.5.16", - "@modelcontextprotocol/sdk": "^1.11.4", + "@modelcontextprotocol/sdk": "^1.11.5", "ajv": "^8.17.1", "apify": "^3.4.0", "apify-client": "^2.12.3",