@mastra/mcp 0.4.0 → 0.4.1-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.
@@ -1,23 +1,23 @@
1
1
 
2
- > @mastra/mcp@0.4.0-alpha.9 build /home/runner/work/mastra/mastra/packages/mcp
2
+ > @mastra/mcp@0.4.1-alpha.1 build /home/runner/work/mastra/mastra/packages/mcp
3
3
  > tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting
4
4
 
5
5
  CLI Building entry: src/index.ts
6
6
  CLI Using tsconfig: tsconfig.json
7
7
  CLI tsup v8.4.0
8
8
  TSC Build start
9
- TSC ⚡️ Build success in 17616ms
9
+ TSC ⚡️ Build success in 16950ms
10
10
  DTS Build start
11
11
  CLI Target: es2022
12
12
  Analysis will use the bundled TypeScript version 5.8.2
13
13
  Writing package typings: /home/runner/work/mastra/mastra/packages/mcp/dist/_tsup-dts-rollup.d.ts
14
14
  Analysis will use the bundled TypeScript version 5.8.2
15
15
  Writing package typings: /home/runner/work/mastra/mastra/packages/mcp/dist/_tsup-dts-rollup.d.cts
16
- DTS ⚡️ Build success in 13130ms
16
+ DTS ⚡️ Build success in 13984ms
17
17
  CLI Cleaning output folder
18
18
  ESM Build start
19
19
  CJS Build start
20
20
  ESM dist/index.js 199.82 KB
21
- ESM ⚡️ Build success in 4740ms
21
+ ESM ⚡️ Build success in 4421ms
22
22
  CJS dist/index.cjs 200.48 KB
23
- CJS ⚡️ Build success in 4742ms
23
+ CJS ⚡️ Build success in 4424ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @mastra/mcp
2
2
 
3
+ ## 0.4.1-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [20275d4]
8
+ - Updated dependencies [7d1892c]
9
+ - Updated dependencies [a90a082]
10
+ - Updated dependencies [35955b0]
11
+ - Updated dependencies [c1409ef]
12
+ - Updated dependencies [11d4485]
13
+ - Updated dependencies [2d4001d]
14
+ - @mastra/core@0.9.1-alpha.1
15
+
16
+ ## 0.4.1-alpha.0
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [81fb7f6]
21
+ - @mastra/core@0.9.1-alpha.0
22
+
3
23
  ## 0.4.0
4
24
 
5
25
  ### Minor Changes
@@ -268,7 +268,47 @@ location: z.ZodString;
268
268
  location: string;
269
269
  }, {
270
270
  location: string;
271
- }>>>;
271
+ }>>> & {
272
+ inputSchema: z.ZodObject<{
273
+ location: z.ZodString;
274
+ }, "strip", z.ZodTypeAny, {
275
+ location: string;
276
+ }, {
277
+ location: string;
278
+ }>;
279
+ outputSchema: z.ZodObject<{
280
+ temperature: z.ZodNumber;
281
+ feelsLike: z.ZodNumber;
282
+ humidity: z.ZodNumber;
283
+ windSpeed: z.ZodNumber;
284
+ windGust: z.ZodNumber;
285
+ conditions: z.ZodString;
286
+ location: z.ZodString;
287
+ }, "strip", z.ZodTypeAny, {
288
+ location: string;
289
+ temperature: number;
290
+ feelsLike: number;
291
+ humidity: number;
292
+ windSpeed: number;
293
+ windGust: number;
294
+ conditions: string;
295
+ }, {
296
+ location: string;
297
+ temperature: number;
298
+ feelsLike: number;
299
+ humidity: number;
300
+ windSpeed: number;
301
+ windGust: number;
302
+ conditions: string;
303
+ }>;
304
+ execute: (context: ToolExecutionContext<z.ZodObject<{
305
+ location: z.ZodString;
306
+ }, "strip", z.ZodTypeAny, {
307
+ location: string;
308
+ }, {
309
+ location: string;
310
+ }>>) => Promise<any>;
311
+ };
272
312
 
273
313
  export declare const writeErrorLog: (message: string, data?: any) => void;
274
314
 
@@ -268,7 +268,47 @@ location: z.ZodString;
268
268
  location: string;
269
269
  }, {
270
270
  location: string;
271
- }>>>;
271
+ }>>> & {
272
+ inputSchema: z.ZodObject<{
273
+ location: z.ZodString;
274
+ }, "strip", z.ZodTypeAny, {
275
+ location: string;
276
+ }, {
277
+ location: string;
278
+ }>;
279
+ outputSchema: z.ZodObject<{
280
+ temperature: z.ZodNumber;
281
+ feelsLike: z.ZodNumber;
282
+ humidity: z.ZodNumber;
283
+ windSpeed: z.ZodNumber;
284
+ windGust: z.ZodNumber;
285
+ conditions: z.ZodString;
286
+ location: z.ZodString;
287
+ }, "strip", z.ZodTypeAny, {
288
+ location: string;
289
+ temperature: number;
290
+ feelsLike: number;
291
+ humidity: number;
292
+ windSpeed: number;
293
+ windGust: number;
294
+ conditions: string;
295
+ }, {
296
+ location: string;
297
+ temperature: number;
298
+ feelsLike: number;
299
+ humidity: number;
300
+ windSpeed: number;
301
+ windGust: number;
302
+ conditions: string;
303
+ }>;
304
+ execute: (context: ToolExecutionContext<z.ZodObject<{
305
+ location: z.ZodString;
306
+ }, "strip", z.ZodTypeAny, {
307
+ location: string;
308
+ }, {
309
+ location: string;
310
+ }>>) => Promise<any>;
311
+ };
272
312
 
273
313
  export declare const writeErrorLog: (message: string, data?: any) => void;
274
314
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp",
3
- "version": "0.4.0",
3
+ "version": "0.4.1-alpha.1",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -26,19 +26,20 @@
26
26
  "date-fns": "^4.1.0",
27
27
  "exit-hook": "^4.0.0",
28
28
  "uuid": "^11.1.0",
29
- "@mastra/core": "^0.9.0"
29
+ "@mastra/core": "^0.9.1-alpha.1"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@ai-sdk/anthropic": "^1.1.15",
33
33
  "@microsoft/api-extractor": "^7.52.1",
34
34
  "@types/node": "^20.17.27",
35
35
  "eslint": "^9.23.0",
36
+ "json-schema-to-zod": "^2.6.0",
36
37
  "tsup": "^8.4.0",
38
+ "tsx": "^4.19.3",
37
39
  "typescript": "^5.8.2",
38
40
  "vitest": "^3.0.9",
39
41
  "zod": "^3.24.2",
40
42
  "zod-to-json-schema": "^3.22.4",
41
- "json-schema-to-zod": "^2.6.0",
42
43
  "@internal/lint": "0.0.2"
43
44
  },
44
45
  "scripts": {
@@ -1,7 +1,7 @@
1
1
  import { spawn } from 'child_process';
2
2
  import path from 'path';
3
3
  import { describe, it, expect, vi, beforeEach, afterEach, beforeAll, afterAll } from 'vitest';
4
- import type { LogMessage, LoggingLevel } from './client';
4
+ import type { LogMessage } from './client';
5
5
  import { MCPConfiguration } from './configuration';
6
6
 
7
7
  // Increase test timeout for server operations
@@ -63,7 +63,7 @@ describe('MCP Server Logging', () => {
63
63
  servers: {
64
64
  weather: {
65
65
  url: new URL('http://localhost:60809/sse'),
66
- log: weatherLogHandler,
66
+ logger: weatherLogHandler,
67
67
  },
68
68
  stock: {
69
69
  command: 'npx',
@@ -71,7 +71,7 @@ describe('MCP Server Logging', () => {
71
71
  env: {
72
72
  FAKE_CREDS: 'test',
73
73
  },
74
- log: stockLogHandler,
74
+ logger: stockLogHandler,
75
75
  },
76
76
  },
77
77
  });
@@ -122,7 +122,7 @@ describe('MCP Server Logging', () => {
122
122
  badServer: {
123
123
  command: 'nonexistent-command-that-will-fail',
124
124
  args: [],
125
- log: highSeverityHandler,
125
+ logger: highSeverityHandler,
126
126
  },
127
127
  },
128
128
  });
@@ -145,16 +145,6 @@ describe('MCP Server Logging', () => {
145
145
  });
146
146
 
147
147
  it('should support console logging patterns', async () => {
148
- const _logLevels: LoggingLevel[] = [
149
- 'debug',
150
- 'info',
151
- 'notice',
152
- 'warning',
153
- 'error',
154
- 'critical',
155
- 'alert',
156
- 'emergency',
157
- ];
158
148
  const logMessages: string[] = [];
159
149
 
160
150
  const consoleLogger = (logMessage: LogMessage) => {
@@ -169,7 +159,7 @@ describe('MCP Server Logging', () => {
169
159
  echoServer: {
170
160
  command: 'echo',
171
161
  args: ['test'],
172
- log: consoleLogger,
162
+ logger: consoleLogger,
173
163
  },
174
164
  },
175
165
  });