@ai-sdk/mcp 2.0.36 → 2.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/mcp",
3
- "version": "2.0.36",
3
+ "version": "2.0.37",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -31,20 +31,20 @@
31
31
  }
32
32
  },
33
33
  "dependencies": {
34
+ "@ai-sdk/provider": "4.0.8",
35
+ "@ai-sdk/provider-utils": "5.0.30",
34
36
  "cross-spawn": "^7.0.6",
35
- "pkce-challenge": "^5.0.1",
36
- "@ai-sdk/provider": "4.0.7",
37
- "@ai-sdk/provider-utils": "5.0.29"
37
+ "pkce-challenge": "^5.0.1"
38
38
  },
39
39
  "devDependencies": {
40
+ "@ai-sdk/test-server": "2.0.1",
40
41
  "@types/cross-spawn": "^6.0.6",
41
42
  "@types/node": "22.19.19",
43
+ "@vercel/ai-tsconfig": "0.0.0",
42
44
  "tsup": "^8.5.1",
43
45
  "typescript": "5.8.3",
44
46
  "vitest": "^4.1.6",
45
- "zod": "3.25.76",
46
- "@ai-sdk/test-server": "2.0.1",
47
- "@vercel/ai-tsconfig": "0.0.0"
47
+ "zod": "3.25.76"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "zod": "^3.25.76 || ^4.1.8"
@@ -1166,8 +1166,17 @@ class DefaultMCPClient implements MCPClient {
1166
1166
  }: {
1167
1167
  schemas?: TOOL_SCHEMAS;
1168
1168
  } = {}): Promise<McpToolSet<TOOL_SCHEMAS>> {
1169
- const definitions = await this.listTools();
1170
- return this.toolsFromDefinitions(definitions, {
1169
+ let definitions = await this.listTools();
1170
+ const tools = [...definitions.tools];
1171
+
1172
+ while (definitions.nextCursor != null) {
1173
+ definitions = await this.listTools({
1174
+ params: { cursor: definitions.nextCursor },
1175
+ });
1176
+ tools.push(...definitions.tools);
1177
+ }
1178
+
1179
+ return this.toolsFromDefinitions({ ...definitions, tools }, {
1171
1180
  schemas,
1172
1181
  } as { schemas?: TOOL_SCHEMAS });
1173
1182
  }