@mastra/mcp 0.4.1-alpha.0 → 0.4.1-alpha.2
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/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +22 -0
- package/package.json +4 -3
- package/src/server-logging.test.ts +5 -15
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/mcp@0.4.1-alpha.
|
|
2
|
+
> @mastra/mcp@0.4.1-alpha.2 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
|
[34mCLI[39m Building entry: src/index.ts
|
|
6
6
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
7
|
[34mCLI[39m tsup v8.4.0
|
|
8
8
|
[34mTSC[39m Build start
|
|
9
|
-
[32mTSC[39m ⚡️ Build success in
|
|
9
|
+
[32mTSC[39m ⚡️ Build success in 17707ms
|
|
10
10
|
[34mDTS[39m Build start
|
|
11
11
|
[34mCLI[39m Target: es2022
|
|
12
12
|
Analysis will use the bundled TypeScript version 5.8.2
|
|
13
13
|
[36mWriting package typings: /home/runner/work/mastra/mastra/packages/mcp/dist/_tsup-dts-rollup.d.ts[39m
|
|
14
14
|
Analysis will use the bundled TypeScript version 5.8.2
|
|
15
15
|
[36mWriting package typings: /home/runner/work/mastra/mastra/packages/mcp/dist/_tsup-dts-rollup.d.cts[39m
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 14246ms
|
|
17
17
|
[34mCLI[39m Cleaning output folder
|
|
18
18
|
[34mESM[39m Build start
|
|
19
19
|
[34mCJS[39m Build start
|
|
20
20
|
[32mCJS[39m [1mdist/index.cjs [22m[32m200.48 KB[39m
|
|
21
|
-
[32mCJS[39m ⚡️ Build success in
|
|
21
|
+
[32mCJS[39m ⚡️ Build success in 4253ms
|
|
22
22
|
[32mESM[39m [1mdist/index.js [22m[32m199.82 KB[39m
|
|
23
|
-
[32mESM[39m ⚡️ Build success in
|
|
23
|
+
[32mESM[39m ⚡️ Build success in 4256ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @mastra/mcp
|
|
2
2
|
|
|
3
|
+
## 0.4.1-alpha.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [405b63d]
|
|
8
|
+
- Updated dependencies [61e92f5]
|
|
9
|
+
- Updated dependencies [c71013a]
|
|
10
|
+
- @mastra/core@0.9.1-alpha.2
|
|
11
|
+
|
|
12
|
+
## 0.4.1-alpha.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [20275d4]
|
|
17
|
+
- Updated dependencies [7d1892c]
|
|
18
|
+
- Updated dependencies [a90a082]
|
|
19
|
+
- Updated dependencies [35955b0]
|
|
20
|
+
- Updated dependencies [c1409ef]
|
|
21
|
+
- Updated dependencies [11d4485]
|
|
22
|
+
- Updated dependencies [2d4001d]
|
|
23
|
+
- @mastra/core@0.9.1-alpha.1
|
|
24
|
+
|
|
3
25
|
## 0.4.1-alpha.0
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp",
|
|
3
|
-
"version": "0.4.1-alpha.
|
|
3
|
+
"version": "0.4.1-alpha.2",
|
|
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.1-alpha.
|
|
29
|
+
"@mastra/core": "^0.9.1-alpha.2"
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
162
|
+
logger: consoleLogger,
|
|
173
163
|
},
|
|
174
164
|
},
|
|
175
165
|
});
|