@mastra/mcp 1.2.1 → 1.3.0-alpha.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # @mastra/mcp
2
2
 
3
+ ## 1.3.0-alpha.1
4
+
5
+ ### Minor Changes
6
+
7
+ - Added new MCP client APIs for per-server control and diagnostics. ([#14377](https://github.com/mastra-ai/mastra/pull/14377))
8
+ - Added `reconnectServer(serverName)` to reconnect a single MCP server without restarting all servers.
9
+ - Added `listToolsetsWithErrors()` to return both toolsets and per-server errors.
10
+ - Added `getServerStderr(serverName)` to inspect piped stderr for stdio servers.
11
+
12
+ **Example**
13
+
14
+ ```ts
15
+ const { toolsets, errors } = await mcpClient.listToolsetsWithErrors();
16
+ await mcpClient.reconnectServer('slack');
17
+ const stderr = mcpClient.getServerStderr('slack');
18
+ ```
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [[`4444280`](https://github.com/mastra-ai/mastra/commit/444428094253e916ec077e66284e685fde67021e), [`dbb879a`](https://github.com/mastra-ai/mastra/commit/dbb879af0b809c668e9b3a9d8bac97d806caa267), [`8de3555`](https://github.com/mastra-ai/mastra/commit/8de355572c6fd838f863a3e7e6fe24d0947b774f)]:
23
+ - @mastra/core@1.14.0-alpha.2
24
+
25
+ ## 1.2.2-alpha.0
26
+
27
+ ### Patch Changes
28
+
29
+ - **Improved** ([#14260](https://github.com/mastra-ai/mastra/pull/14260))
30
+ - Updated `@modelcontextprotocol/sdk` from `^1.17.5` to `^1.27.1`.
31
+
32
+ **Deprecated**
33
+ - Deprecated prompt `version` usage in `@mastra/mcp`.
34
+ - Prompt versions are not part of MCP protocol behavior and will be removed.
35
+
36
+ **Migration**
37
+ - Use unique prompt names instead of prompt versions.
38
+ - Before: `client.prompts.get({ name: 'explain-code', version: 'v1', args })`
39
+ - After: `client.prompts.get({ name: 'explain-code-v1', args })`
40
+ - `MastraPrompt` is available for migration and is also deprecated.
41
+
42
+ - Updated dependencies [[`51970b3`](https://github.com/mastra-ai/mastra/commit/51970b3828494d59a8dd4df143b194d37d31e3f5), [`085e371`](https://github.com/mastra-ai/mastra/commit/085e3718a7d0fe9a210fe7dd1c867b9bdfe8d16b), [`ce26fe2`](https://github.com/mastra-ai/mastra/commit/ce26fe2166dd90254f8bee5776e55977143e97de), [`b26307f`](https://github.com/mastra-ai/mastra/commit/b26307f050df39629511b0e831b8fc26973ce8b1)]:
43
+ - @mastra/core@1.13.3-alpha.0
44
+
3
45
  ## 1.2.1
4
46
 
5
47
  ### Patch Changes
@@ -30,7 +30,7 @@ export declare class PromptClientActions {
30
30
  * ```typescript
31
31
  * const prompts = await client.prompts.list();
32
32
  * prompts.forEach(prompt => {
33
- * console.log(`${prompt.name} (v${prompt.version}): ${prompt.description}`);
33
+ * console.log(`${prompt.name}: ${prompt.description}`);
34
34
  * });
35
35
  * ```
36
36
  */
@@ -44,7 +44,6 @@ export declare class PromptClientActions {
44
44
  * @param params - Parameters for the prompt request
45
45
  * @param params.name - Name of the prompt to retrieve
46
46
  * @param params.args - Optional arguments to populate the prompt template
47
- * @param params.version - Optional specific version of the prompt to retrieve
48
47
  * @returns Promise resolving to the prompt result with messages
49
48
  * @throws {Error} If fetching the prompt fails or prompt not found
50
49
  *
@@ -56,17 +55,15 @@ export declare class PromptClientActions {
56
55
  * language: 'typescript',
57
56
  * code: 'const x = 1;'
58
57
  * },
59
- * version: '1.0'
60
58
  * });
61
59
  *
62
60
  * // Use prompt messages in AI completion
63
61
  * console.log(prompt.messages);
64
62
  * ```
65
63
  */
66
- get({ name, args, version, }: {
64
+ get({ name, args }: {
67
65
  name: string;
68
66
  args?: Record<string, any>;
69
- version?: string;
70
67
  }): Promise<GetPromptResult>;
71
68
  /**
72
69
  * Sets a notification handler for when the list of available prompts changes.
@@ -1 +1 @@
1
- {"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../../src/client/actions/prompt.ts"],"names":[],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EAAE,uBAAuB,CAAC;IAChC,MAAM,EAAE,aAAa,CAAC;CACvB;AAED;;;;;GAKG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0B;IACjD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IAEvC;;OAEG;gBACS,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,yBAAyB;IAKzD;;;;;;;;;;;;;;;OAeG;IACU,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAyBtC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACU,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,GAAG,OAAO,CAAC,eAAe,CAAC;IAIxG;;;;;;;;;;;;;;;OAeG;IACU,aAAa,CAAC,OAAO,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAG/D"}
@@ -70,24 +70,26 @@ export declare class ResourceClientActions {
70
70
  read(uri: string): Promise<{
71
71
  [x: string]: unknown;
72
72
  contents: ({
73
- [x: string]: unknown;
74
- text: string;
75
73
  uri: string;
74
+ text: string;
75
+ mimeType?: string | undefined;
76
76
  _meta?: {
77
77
  [x: string]: unknown;
78
78
  } | undefined;
79
- mimeType?: string | undefined;
80
79
  } | {
81
- [x: string]: unknown;
82
80
  uri: string;
83
81
  blob: string;
82
+ mimeType?: string | undefined;
84
83
  _meta?: {
85
84
  [x: string]: unknown;
86
85
  } | undefined;
87
- mimeType?: string | undefined;
88
86
  })[];
89
87
  _meta?: {
90
88
  [x: string]: unknown;
89
+ progressToken?: string | number | undefined;
90
+ "io.modelcontextprotocol/related-task"?: {
91
+ taskId: string;
92
+ } | undefined;
91
93
  } | undefined;
92
94
  }>;
93
95
  /**
@@ -108,6 +110,10 @@ export declare class ResourceClientActions {
108
110
  subscribe(uri: string): Promise<{
109
111
  _meta?: {
110
112
  [x: string]: unknown;
113
+ progressToken?: string | number | undefined;
114
+ "io.modelcontextprotocol/related-task"?: {
115
+ taskId: string;
116
+ } | undefined;
111
117
  } | undefined;
112
118
  }>;
113
119
  /**
@@ -127,6 +133,10 @@ export declare class ResourceClientActions {
127
133
  unsubscribe(uri: string): Promise<{
128
134
  _meta?: {
129
135
  [x: string]: unknown;
136
+ progressToken?: string | number | undefined;
137
+ "io.modelcontextprotocol/related-task"?: {
138
+ taskId: string;
139
+ } | undefined;
130
140
  } | undefined;
131
141
  }>;
132
142
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../../src/client/actions/resource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAEzD,UAAU,2BAA2B;IACnC,MAAM,EAAE,uBAAuB,CAAC;IAChC,MAAM,EAAE,aAAa,CAAC;CACvB;AAED;;;;;;GAMG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0B;IACjD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IAEvC;;OAEG;gBACS,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,2BAA2B;IAK3D;;;;;;;;;;;;;;;OAeG;IACU,IAAI,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;IAyBxC;;;;;;;;;;;;;;;;OAgBG;IACU,SAAS,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;IA0BrD;;;;;;;;;;;;OAYG;IACU,IAAI,CAAC,GAAG,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;IAI7B;;;;;;;;;;;;;;OAcG;IACU,SAAS,C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;;IAIlC;;;;;;;;;;;;;OAaG;IACU,WAAW,CAAC,GAAG,EAAE,MAAM;;;;;;;;;IAIpC;;;;;;;;;;;;;;;;;OAiBG;IACU,SAAS,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjF;;;;;;;;;;;;;;;OAeG;IACU,aAAa,CAAC,OAAO,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAG/D"}
@@ -1,3 +1,4 @@
1
+ import type { Stream } from 'node:stream';
1
2
  import { MastraBase } from '@mastra/core/base';
2
3
  import type { Tool } from '@mastra/core/tools';
3
4
  import type { EmptyResult, GetPromptResult, ListPromptsResult, ListResourcesResult, ListResourceTemplatesResult, ReadResourceResult } from '@modelcontextprotocol/sdk/types.js';
@@ -111,6 +112,14 @@ export declare class InternalMastraMCPClient extends MastraBase {
111
112
  * @internal
112
113
  */
113
114
  get sessionId(): string | undefined;
115
+ /**
116
+ * Gets the stderr stream of the child process, if using stdio transport with `stderr: 'pipe'`.
117
+ *
118
+ * Returns null if not connected, not using stdio transport, or stderr is not piped.
119
+ *
120
+ * @internal
121
+ */
122
+ get stderr(): Stream | null;
114
123
  disconnect(): Promise<void>;
115
124
  /**
116
125
  * Checks if an error indicates a session invalidation that requires reconnection.
@@ -152,12 +161,10 @@ export declare class InternalMastraMCPClient extends MastraBase {
152
161
  * Get a prompt and its dynamic messages from the server.
153
162
  * @param name The prompt name
154
163
  * @param args Arguments for the prompt
155
- * @param version (optional) The prompt version to retrieve
156
164
  */
157
- getPrompt({ name, args, version, }: {
165
+ getPrompt({ name, args }: {
158
166
  name: string;
159
167
  args?: Record<string, any>;
160
- version?: string;
161
168
  }): Promise<GetPromptResult>;
162
169
  /**
163
170
  * Register a handler to be called when the prompt list changes on the server.
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client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AAM,IAAI,GAAG,IAAI;IAOlE,qCAAqC,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI;IAO3E,yCAAyC,CAAC,OAAO,EAAE,MAAM,IAAI,GAAG,IAAI;IAOpE,4BAA4B,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI;IAQ/D,8BAA8B,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;YAOhD,kBAAkB;YA+BlB,mBAAmB;IAiC3B,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;CA8HjE"}
@@ -1,3 +1,4 @@
1
+ import type { Stream } from 'node:stream';
1
2
  import { MastraBase } from '@mastra/core/base';
2
3
  import type { Tool } from '@mastra/core/tools';
3
4
  import type { ElicitRequest, ElicitResult, ProgressNotification, Prompt, Resource, ResourceTemplate } from '@modelcontextprotocol/sdk/types.js';
@@ -217,24 +218,26 @@ export declare class MCPClient extends MastraBase {
217
218
  read: (serverName: string, uri: string) => Promise<{
218
219
  [x: string]: unknown;
219
220
  contents: ({
220
- [x: string]: unknown;
221
- text: string;
222
221
  uri: string;
222
+ text: string;
223
+ mimeType?: string | undefined;
223
224
  _meta?: {
224
225
  [x: string]: unknown;
225
226
  } | undefined;
226
- mimeType?: string | undefined;
227
227
  } | {
228
- [x: string]: unknown;
229
228
  uri: string;
230
229
  blob: string;
230
+ mimeType?: string | undefined;
231
231
  _meta?: {
232
232
  [x: string]: unknown;
233
233
  } | undefined;
234
- mimeType?: string | undefined;
235
234
  })[];
236
235
  _meta?: {
237
236
  [x: string]: unknown;
237
+ progressToken?: string | number | undefined;
238
+ "io.modelcontextprotocol/related-task"?: {
239
+ taskId: string;
240
+ } | undefined;
238
241
  } | undefined;
239
242
  }>;
240
243
  /**
@@ -253,6 +256,10 @@ export declare class MCPClient extends MastraBase {
253
256
  subscribe: (serverName: string, uri: string) => Promise<{
254
257
  _meta?: {
255
258
  [x: string]: unknown;
259
+ progressToken?: string | number | undefined;
260
+ "io.modelcontextprotocol/related-task"?: {
261
+ taskId: string;
262
+ } | undefined;
256
263
  } | undefined;
257
264
  }>;
258
265
  /**
@@ -271,6 +278,10 @@ export declare class MCPClient extends MastraBase {
271
278
  unsubscribe: (serverName: string, uri: string) => Promise<{
272
279
  _meta?: {
273
280
  [x: string]: unknown;
281
+ progressToken?: string | number | undefined;
282
+ "io.modelcontextprotocol/related-task"?: {
283
+ taskId: string;
284
+ } | undefined;
274
285
  } | undefined;
275
286
  }>;
276
287
  /**
@@ -355,7 +366,6 @@ export declare class MCPClient extends MastraBase {
355
366
  * @param params.serverName - Name of the server to retrieve from
356
367
  * @param params.name - Name of the prompt to retrieve
357
368
  * @param params.args - Optional arguments to populate the prompt template
358
- * @param params.version - Optional specific version of the prompt
359
369
  * @returns Promise resolving to the prompt result with messages
360
370
  * @throws {MastraError} If fetching the prompt fails
361
371
  *
@@ -365,88 +375,107 @@ export declare class MCPClient extends MastraBase {
365
375
  * serverName: 'weatherServer',
366
376
  * name: 'forecast',
367
377
  * args: { city: 'London' },
368
- * version: '1.0'
369
378
  * });
370
379
  * console.log(prompt.messages);
371
380
  * ```
372
381
  */
373
- get: ({ serverName, name, args, version, }: {
382
+ get: ({ serverName, name, args }: {
374
383
  serverName: string;
375
384
  name: string;
376
385
  args?: Record<string, any>;
377
- version?: string;
378
386
  }) => Promise<{
379
387
  [x: string]: unknown;
380
388
  messages: {
381
- [x: string]: unknown;
389
+ role: "user" | "assistant";
382
390
  content: {
383
- [x: string]: unknown;
384
391
  type: "text";
385
392
  text: string;
393
+ annotations?: {
394
+ audience?: ("user" | "assistant")[] | undefined;
395
+ priority?: number | undefined;
396
+ lastModified?: string | undefined;
397
+ } | undefined;
386
398
  _meta?: {
387
399
  [x: string]: unknown;
388
400
  } | undefined;
389
401
  } | {
390
- [x: string]: unknown;
391
402
  type: "image";
392
- mimeType: string;
393
403
  data: string;
404
+ mimeType: string;
405
+ annotations?: {
406
+ audience?: ("user" | "assistant")[] | undefined;
407
+ priority?: number | undefined;
408
+ lastModified?: string | undefined;
409
+ } | undefined;
394
410
  _meta?: {
395
411
  [x: string]: unknown;
396
412
  } | undefined;
397
413
  } | {
398
- [x: string]: unknown;
399
414
  type: "audio";
400
- mimeType: string;
401
415
  data: string;
416
+ mimeType: string;
417
+ annotations?: {
418
+ audience?: ("user" | "assistant")[] | undefined;
419
+ priority?: number | undefined;
420
+ lastModified?: string | undefined;
421
+ } | undefined;
402
422
  _meta?: {
403
423
  [x: string]: unknown;
404
424
  } | undefined;
405
425
  } | {
406
- [x: string]: unknown;
407
- type: "resource_link";
408
- name: string;
409
426
  uri: string;
427
+ name: string;
428
+ type: "resource_link";
429
+ description?: string | undefined;
430
+ mimeType?: string | undefined;
431
+ annotations?: {
432
+ audience?: ("user" | "assistant")[] | undefined;
433
+ priority?: number | undefined;
434
+ lastModified?: string | undefined;
435
+ } | undefined;
410
436
  _meta?: {
411
437
  [x: string]: unknown;
412
438
  } | undefined;
413
- title?: string | undefined;
414
- description?: string | undefined;
415
439
  icons?: {
416
- [x: string]: unknown;
417
440
  src: string;
418
441
  mimeType?: string | undefined;
419
442
  sizes?: string[] | undefined;
443
+ theme?: "light" | "dark" | undefined;
420
444
  }[] | undefined;
421
- mimeType?: string | undefined;
445
+ title?: string | undefined;
422
446
  } | {
423
- [x: string]: unknown;
424
447
  type: "resource";
425
448
  resource: {
426
- [x: string]: unknown;
427
- text: string;
428
449
  uri: string;
450
+ text: string;
451
+ mimeType?: string | undefined;
429
452
  _meta?: {
430
453
  [x: string]: unknown;
431
454
  } | undefined;
432
- mimeType?: string | undefined;
433
455
  } | {
434
- [x: string]: unknown;
435
456
  uri: string;
436
457
  blob: string;
458
+ mimeType?: string | undefined;
437
459
  _meta?: {
438
460
  [x: string]: unknown;
439
461
  } | undefined;
440
- mimeType?: string | undefined;
441
462
  };
463
+ annotations?: {
464
+ audience?: ("user" | "assistant")[] | undefined;
465
+ priority?: number | undefined;
466
+ lastModified?: string | undefined;
467
+ } | undefined;
442
468
  _meta?: {
443
469
  [x: string]: unknown;
444
470
  } | undefined;
445
471
  };
446
- role: "user" | "assistant";
447
472
  }[];
448
473
  _meta?: {
449
474
  [x: string]: unknown;
475
+ progressToken?: string | number | undefined;
476
+ "io.modelcontextprotocol/related-task"?: {
477
+ taskId: string;
478
+ } | undefined;
450
479
  } | undefined;
451
480
  description?: string | undefined;
452
481
  }>;
@@ -486,6 +515,22 @@ export declare class MCPClient extends MastraBase {
486
515
  * ```
487
516
  */
488
517
  disconnect(): Promise<void>;
518
+ /**
519
+ * Reconnects a single MCP server by name.
520
+ *
521
+ * If the server is already connected, it will be forcefully disconnected and reconnected.
522
+ * If the server has never been connected, a new connection will be established.
523
+ *
524
+ * @param serverName - The name of the server to reconnect (must match a key in `servers`)
525
+ * @throws {Error} If the server name is not found in the configuration
526
+ *
527
+ * @example
528
+ * ```typescript
529
+ * // Reconnect a specific server after it fails
530
+ * await mcp.reconnectServer('weatherServer');
531
+ * ```
532
+ */
533
+ reconnectServer(serverName: string): Promise<void>;
489
534
  /**
490
535
  * Retrieves all tools from all configured servers with namespaced names.
491
536
  *
@@ -531,6 +576,26 @@ export declare class MCPClient extends MastraBase {
531
576
  * ```
532
577
  */
533
578
  listToolsets(): Promise<Record<string, Record<string, Tool<any, any, any, any>>>>;
579
+ /**
580
+ * Returns toolsets organized by server name, along with any per-server errors.
581
+ *
582
+ * Like listToolsets(), but also returns errors for servers that failed to connect
583
+ * or list tools. This allows callers to report specific failure reasons per server.
584
+ *
585
+ * @returns Object with `toolsets` (successful servers) and `errors` (failed servers with error messages).
586
+ *
587
+ * @example
588
+ * ```typescript
589
+ * const { toolsets, errors } = await mcp.listToolsetsWithErrors();
590
+ * for (const [name, err] of Object.entries(errors)) {
591
+ * console.error(`Server ${name} failed: ${err}`);
592
+ * }
593
+ * ```
594
+ */
595
+ listToolsetsWithErrors(): Promise<{
596
+ toolsets: Record<string, Record<string, Tool<any, any, any, any>>>;
597
+ errors: Record<string, string>;
598
+ }>;
534
599
  /**
535
600
  * Gets current session IDs for all connected MCP clients using Streamable HTTP transport.
536
601
  *
@@ -547,6 +612,16 @@ export declare class MCPClient extends MastraBase {
547
612
  * ```
548
613
  */
549
614
  get sessionIds(): Record<string, string>;
615
+ /**
616
+ * Gets the stderr stream of a connected stdio server.
617
+ *
618
+ * Only available for servers using stdio transport with `stderr: 'pipe'`.
619
+ * Returns null if the server is not connected, not using stdio, or stderr is not piped.
620
+ *
621
+ * @param serverName - The name of the server
622
+ * @returns The stderr stream, or null
623
+ */
624
+ getServerStderr(serverName: string): Stream | null;
550
625
  private getConnectedClient;
551
626
  private getConnectedClientForServer;
552
627
  }
@@ -1 +1 @@
1
- {"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../src/client/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,MAAM,EACN,QAAQ,EACR,gBAAgB,EACjB,MAAM,oCAAoC,CAAC;AAI5C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAI1D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,wHAAwH;IACxH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,mFAAmF;IACnF,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;IACnD,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAAa,SAAU,SAAQ,UAAU;IACvC,OAAO,CAAC,aAAa,CAAiD;IACtE,OAAO,CAAC,EAAE,CAAS;IACnB,OAAO,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AAE,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IA+B3E;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACU,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IAK9F;;;;;;;;;;;;;;;OAeG;IACU,sBAAsB,IAAI,OAAO,CAAC;QAC7C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;QACnE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAChC,CAAC;IAiCF;;;;;;;;;;;;;;OAcG;IACH,IAAI,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQvC;IAED;;;;;;;;OAQG;IACI,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;YAM3C,kBAAkB;YAyDlB,2BAA2B;CAO1C"}
@@ -3,7 +3,7 @@ name: mastra-mcp
3
3
  description: Documentation for @mastra/mcp. Use when working with @mastra/mcp APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/mcp"
6
- version: "1.2.1"
6
+ version: "1.3.0-alpha.1"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.2.1",
2
+ "version": "1.3.0-alpha.1",
3
3
  "package": "@mastra/mcp",
4
4
  "exports": {
5
5
  "UnauthorizedError": {
@@ -82,7 +82,7 @@ export const testAgent = new Agent({
82
82
  - US National Weather Service
83
83
 
84
84
  Answer questions using the information you find using the MCP Servers.`,
85
- model: 'openai/gpt-5.1',
85
+ model: 'openai/gpt-5.4',
86
86
  tools: await testMcpClient.listTools(),
87
87
  })
88
88
  ```
@@ -737,7 +737,7 @@ const agent = new Agent({
737
737
  id: 'multi-tool-agent',
738
738
  name: 'Multi-tool Agent',
739
739
  instructions: 'You have access to multiple tool servers.',
740
- model: 'openai/gpt-5.1',
740
+ model: 'openai/gpt-5.4',
741
741
  tools: await mcp.listTools(),
742
742
  })
743
743
 
@@ -788,7 +788,7 @@ const agent = new Agent({
788
788
  id: 'multi-tool-agent',
789
789
  name: 'Multi-tool Agent',
790
790
  instructions: 'You help users check stocks and weather.',
791
- model: 'openai/gpt-5.1',
791
+ model: 'openai/gpt-5.4',
792
792
  })
793
793
 
794
794
  // Later, configure MCP with user-specific settings
@@ -22,7 +22,7 @@ const myAgent = new Agent({
22
22
  name: 'MyExampleAgent',
23
23
  description: 'A generalist to help with basic questions.',
24
24
  instructions: 'You are a helpful assistant.',
25
- model: 'openai/gpt-5.1',
25
+ model: 'openai/gpt-5.4',
26
26
  })
27
27
 
28
28
  const weatherTool = createTool({