@mastra/mcp 2.9.0-alpha.1 → 2.9.0-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/dist/client/client.d.ts +42 -0
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/types.d.ts +5 -2
- package/dist/client/types.d.ts.map +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +32 -32
- package/dist/docs/references/reference-tools-mcp-client.md +15 -6
- package/dist/index.cjs +81 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +81 -3
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/client/client.d.ts
CHANGED
|
@@ -79,6 +79,19 @@ export declare class InternalMastraMCPClient extends MastraBase {
|
|
|
79
79
|
private clientConnectionOnClose?;
|
|
80
80
|
private _authState?;
|
|
81
81
|
private operationContextStore;
|
|
82
|
+
/**
|
|
83
|
+
* The requestContext of the tool call whose execution opened the connection. Only the
|
|
84
|
+
* transport's fetch reads it, so the handshake and the streams the connection keeps open are
|
|
85
|
+
* sent as that call. Messages arriving on those streams are delivered outside it, so server logs
|
|
86
|
+
* are not labelled with it and requests their handlers send are not sent as that call.
|
|
87
|
+
*/
|
|
88
|
+
private connectionContextStore;
|
|
89
|
+
/**
|
|
90
|
+
* The connection context of the transport a server message arrived on, as it was when that
|
|
91
|
+
* transport was created, set while the message is delivered. The transport's fetch reads it only for the client's replies to server requests,
|
|
92
|
+
* which belong to the connection rather than to the handler that produced them.
|
|
93
|
+
*/
|
|
94
|
+
private replyContextStore;
|
|
82
95
|
private exitHookUnsubscribe?;
|
|
83
96
|
private sigTermHandler?;
|
|
84
97
|
private sigHupHandler?;
|
|
@@ -122,6 +135,35 @@ export declare class InternalMastraMCPClient extends MastraBase {
|
|
|
122
135
|
private buildStdioEnv;
|
|
123
136
|
private connectStdio;
|
|
124
137
|
private connectHttp;
|
|
138
|
+
/**
|
|
139
|
+
* Connects as a tool call: the handshake and the streams the connection keeps open reach the
|
|
140
|
+
* transport's fetch with the call's requestContext, through the connection context. Any enclosing
|
|
141
|
+
* operation scope is exited first. It would take priority in fetch, and the new streams and stdio
|
|
142
|
+
* child would deliver every later server message in it.
|
|
143
|
+
*/
|
|
144
|
+
private connectAsCall;
|
|
145
|
+
/**
|
|
146
|
+
* The requestContext the transport's fetch passes on for an outgoing request. An operation scope
|
|
147
|
+
* owns its requests, even when its requestContext is null. Outside one, the handshake and the
|
|
148
|
+
* streams the connection keeps open use the connection context, and a reply to a server request
|
|
149
|
+
* uses the context of the connection that delivered the request.
|
|
150
|
+
*/
|
|
151
|
+
private fetchRequestContext;
|
|
152
|
+
/**
|
|
153
|
+
* Delivers every message the server sends outside the connection context, from the handshake on.
|
|
154
|
+
* A server log, notification or request arriving on a stream the opening call started belongs to
|
|
155
|
+
* no call, so a request its handler sends must not be sent as that call. The client's reply to a
|
|
156
|
+
* server request still is, through `replyContextStore`.
|
|
157
|
+
*
|
|
158
|
+
* The reply context is the connection context this transport was created in, captured once. Read
|
|
159
|
+
* at delivery time, it would carry over to a connection that a handler of an older connection's
|
|
160
|
+
* message opens, such as a `reconnectServer()` from a server log callback.
|
|
161
|
+
*
|
|
162
|
+
* The SDK assigns `onmessage` during `connect()` and swaps it while probing the server, so every
|
|
163
|
+
* assignment is wrapped. A handler that wraps an already wrapped one (`interceptTaskResults`, or
|
|
164
|
+
* the probe restoring its saved handler) runs with the same reply context.
|
|
165
|
+
*/
|
|
166
|
+
private deliverOutsideConnectionContext;
|
|
125
167
|
/**
|
|
126
168
|
* Detaches whatever transport is still attached to the underlying SDK Client.
|
|
127
169
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/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GG;IACH,kBAAkB,CAAC,EAAE,UAAU,EAAE,EAAE;QAAE,UAAU,EAAE,6BAA6B,CAAA;KAAE,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CA4B1G;IAEK,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAiB/D;IAED;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAoW9B,iEAAiE;IACjE,IAAI,KAAK,IAAI,IAAI,CAAC,aAAa,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC,CAE5D;IAED;;;OAGG;IACH,OAAO,CAAC,wBAAwB;IAShC;;;;;OAKG;YACW,aAAa;IA6F3B,OAAO,CAAC,mBAAmB;CAQ5B"}
|
package/dist/client/types.d.ts
CHANGED
|
@@ -64,8 +64,11 @@ export type MCPClientProtocolVersion = typeof MCP_CLIENT_PROTOCOL_VERSION | 'leg
|
|
|
64
64
|
* This allows custom fetch implementations to access request-scoped data (e.g., authentication
|
|
65
65
|
* cookies, bearer tokens) from the incoming request and forward them to the MCP server.
|
|
66
66
|
*
|
|
67
|
-
* The `requestContext` parameter is `null` when no context is available (e.g., during
|
|
68
|
-
*
|
|
67
|
+
* The `requestContext` parameter is `null` when no context is available (e.g., during a
|
|
68
|
+
* connection handshake that no tool call started, such as the one `listTools()` opens, or when a
|
|
69
|
+
* tool is called without a request context). When a tool call opens the connection (a tool rebuilt
|
|
70
|
+
* from a cached definition on its first execution, or a reconnect during a call), the handshake
|
|
71
|
+
* receives that call's `requestContext`, and streams the connection keeps open afterwards keep it.
|
|
69
72
|
*
|
|
70
73
|
* @example
|
|
71
74
|
* ```typescript
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/client/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EA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,EAAE,OAAO,CAAC;IACrB,oFAAoF;IACpF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iFAAiF;IACjF,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC;;;;;;OAMG;IACH,MAAM,EAAE;QACN,gDAAgD;QAChD,IAAI,EAAE,MAAM,CAAC;QACb,wDAAwD;QACxD,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,iEAAiE;QACjE,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;CACH,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAAC,CAAC"}
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.9.0-alpha.
|
|
2
|
+
"version": "2.9.0-alpha.2",
|
|
3
3
|
"package": "@mastra/mcp",
|
|
4
4
|
"exports": {
|
|
5
5
|
"InMemoryMCPEventCursorStore": {
|
|
6
6
|
"types": "dist/integrations/events-cursor-store.d.ts",
|
|
7
7
|
"implementation": "dist/index.js",
|
|
8
|
-
"line":
|
|
8
|
+
"line": 25427
|
|
9
9
|
},
|
|
10
10
|
"InMemoryMCPTaskStore": {
|
|
11
11
|
"types": "dist/server/tasks/in-memory-store.d.ts",
|
|
12
12
|
"implementation": "dist/index.js",
|
|
13
|
-
"line":
|
|
13
|
+
"line": 22202
|
|
14
14
|
},
|
|
15
15
|
"InMemoryOAuthStorage": {
|
|
16
16
|
"types": "dist/client/oauth-provider.d.ts",
|
|
17
17
|
"implementation": "dist/index.js",
|
|
18
|
-
"line":
|
|
18
|
+
"line": 17800
|
|
19
19
|
},
|
|
20
20
|
"InMemoryWebhookSubscriptionStore": {
|
|
21
21
|
"types": "dist/server/events/webhook-store.d.ts",
|
|
22
22
|
"implementation": "dist/index.js",
|
|
23
|
-
"line":
|
|
23
|
+
"line": 20572
|
|
24
24
|
},
|
|
25
25
|
"InternalMastraMCPClient": {
|
|
26
26
|
"types": "dist/client/client.d.ts",
|
|
27
27
|
"implementation": "dist/index.js",
|
|
28
|
-
"line":
|
|
28
|
+
"line": 16070
|
|
29
29
|
},
|
|
30
30
|
"MCPClient": {
|
|
31
31
|
"types": "dist/client/configuration.d.ts",
|
|
32
32
|
"implementation": "dist/index.js",
|
|
33
|
-
"line":
|
|
33
|
+
"line": 18293
|
|
34
34
|
},
|
|
35
35
|
"MCPClientServerProxy": {
|
|
36
36
|
"types": "dist/client/server-proxy.d.ts",
|
|
37
37
|
"implementation": "dist/index.js",
|
|
38
|
-
"line":
|
|
38
|
+
"line": 18141
|
|
39
39
|
},
|
|
40
40
|
"MCPEventsSignalProvider": {
|
|
41
41
|
"types": "dist/integrations/events-signals.d.ts",
|
|
42
42
|
"implementation": "dist/index.js",
|
|
43
|
-
"line":
|
|
43
|
+
"line": 25612
|
|
44
44
|
},
|
|
45
45
|
"MCPOAuthClientProvider": {
|
|
46
46
|
"types": "dist/client/oauth-provider.d.ts",
|
|
47
47
|
"implementation": "dist/index.js",
|
|
48
|
-
"line":
|
|
48
|
+
"line": 17852
|
|
49
49
|
},
|
|
50
50
|
"MCPServer": {
|
|
51
51
|
"types": "dist/server/server.d.ts",
|
|
52
52
|
"implementation": "dist/index.js",
|
|
53
|
-
"line":
|
|
53
|
+
"line": 23217
|
|
54
54
|
},
|
|
55
55
|
"MCPTaskLimitError": {
|
|
56
56
|
"types": "dist/server/tasks/store.d.ts",
|
|
57
57
|
"implementation": "dist/index.js",
|
|
58
|
-
"line":
|
|
58
|
+
"line": 21384
|
|
59
59
|
},
|
|
60
60
|
"MCP_CALL_TOOL_CONTENT": {
|
|
61
61
|
"types": "dist/client/client.d.ts",
|
|
62
62
|
"implementation": "dist/index.js",
|
|
63
|
-
"line":
|
|
63
|
+
"line": 15914
|
|
64
64
|
},
|
|
65
65
|
"MCP_CALL_TOOL_META": {
|
|
66
66
|
"types": "dist/client/client.d.ts",
|
|
67
67
|
"implementation": "dist/index.js",
|
|
68
|
-
"line":
|
|
68
|
+
"line": 15916
|
|
69
69
|
},
|
|
70
70
|
"MCP_CLIENT_PROTOCOL_VERSION": {
|
|
71
71
|
"types": "dist/client/types.d.ts",
|
|
@@ -75,62 +75,62 @@
|
|
|
75
75
|
"MCP_DISCOVERY_TIMEOUT_CODE": {
|
|
76
76
|
"types": "dist/client/configuration.d.ts",
|
|
77
77
|
"implementation": "dist/index.js",
|
|
78
|
-
"line":
|
|
78
|
+
"line": 18262
|
|
79
79
|
},
|
|
80
80
|
"MCP_PROTOCOL_VERSION": {
|
|
81
81
|
"types": "dist/server/types.d.ts",
|
|
82
82
|
"implementation": "dist/index.js",
|
|
83
|
-
"line":
|
|
83
|
+
"line": 25154
|
|
84
84
|
},
|
|
85
85
|
"ServerEventActions": {
|
|
86
86
|
"types": "dist/server/events/actions.d.ts",
|
|
87
87
|
"implementation": "dist/index.js",
|
|
88
|
-
"line":
|
|
88
|
+
"line": 19673
|
|
89
89
|
},
|
|
90
90
|
"ServerPromptActions": {
|
|
91
91
|
"types": "dist/server/actions.d.ts",
|
|
92
92
|
"implementation": "dist/index.js",
|
|
93
|
-
"line":
|
|
93
|
+
"line": 19653
|
|
94
94
|
},
|
|
95
95
|
"ServerResourceActions": {
|
|
96
96
|
"types": "dist/server/actions.d.ts",
|
|
97
97
|
"implementation": "dist/index.js",
|
|
98
|
-
"line":
|
|
98
|
+
"line": 19639
|
|
99
99
|
},
|
|
100
100
|
"ServerToolActions": {
|
|
101
101
|
"types": "dist/server/actions.d.ts",
|
|
102
102
|
"implementation": "dist/index.js",
|
|
103
|
-
"line":
|
|
103
|
+
"line": 19621
|
|
104
104
|
},
|
|
105
105
|
"createIntrospectionValidator": {
|
|
106
106
|
"types": "dist/server/oauth-middleware.d.ts",
|
|
107
107
|
"implementation": "dist/index.js",
|
|
108
|
-
"line":
|
|
108
|
+
"line": 25346
|
|
109
109
|
},
|
|
110
110
|
"createOAuthCallbackServer": {
|
|
111
111
|
"types": "dist/client/oauth-callback-server.d.ts",
|
|
112
112
|
"implementation": "dist/index.js",
|
|
113
|
-
"line":
|
|
113
|
+
"line": 17682
|
|
114
114
|
},
|
|
115
115
|
"createOAuthMiddleware": {
|
|
116
116
|
"types": "dist/server/oauth-middleware.d.ts",
|
|
117
117
|
"implementation": "dist/index.js",
|
|
118
|
-
"line":
|
|
118
|
+
"line": 25199
|
|
119
119
|
},
|
|
120
120
|
"createSimpleTokenProvider": {
|
|
121
121
|
"types": "dist/client/oauth-provider.d.ts",
|
|
122
122
|
"implementation": "dist/index.js",
|
|
123
|
-
"line":
|
|
123
|
+
"line": 18115
|
|
124
124
|
},
|
|
125
125
|
"createStaticTokenValidator": {
|
|
126
126
|
"types": "dist/server/oauth-middleware.d.ts",
|
|
127
127
|
"implementation": "dist/index.js",
|
|
128
|
-
"line":
|
|
128
|
+
"line": 25315
|
|
129
129
|
},
|
|
130
130
|
"defineEvent": {
|
|
131
131
|
"types": "dist/server/events/define-event.d.ts",
|
|
132
132
|
"implementation": "dist/index.js",
|
|
133
|
-
"line":
|
|
133
|
+
"line": 25417
|
|
134
134
|
},
|
|
135
135
|
"extractBearerToken": {
|
|
136
136
|
"types": "dist/shared/oauth-types.d.ts",
|
|
@@ -150,32 +150,32 @@
|
|
|
150
150
|
"getCallbackUrlCandidates": {
|
|
151
151
|
"types": "dist/client/oauth-callback-server.d.ts",
|
|
152
152
|
"implementation": "dist/index.js",
|
|
153
|
-
"line":
|
|
153
|
+
"line": 17615
|
|
154
154
|
},
|
|
155
155
|
"getMcpCallToolContent": {
|
|
156
156
|
"types": "dist/client/client.d.ts",
|
|
157
157
|
"implementation": "dist/index.js",
|
|
158
|
-
"line":
|
|
158
|
+
"line": 15936
|
|
159
159
|
},
|
|
160
160
|
"getMcpCallToolMeta": {
|
|
161
161
|
"types": "dist/client/client.d.ts",
|
|
162
162
|
"implementation": "dist/index.js",
|
|
163
|
-
"line":
|
|
163
|
+
"line": 15945
|
|
164
164
|
},
|
|
165
165
|
"isMCPTaskStoreAdmin": {
|
|
166
166
|
"types": "dist/server/tasks/store.d.ts",
|
|
167
167
|
"implementation": "dist/index.js",
|
|
168
|
-
"line":
|
|
168
|
+
"line": 21435
|
|
169
169
|
},
|
|
170
170
|
"isWorkflowTaskContext": {
|
|
171
171
|
"types": "dist/server/tasks/workflow-runs.d.ts",
|
|
172
172
|
"implementation": "dist/index.js",
|
|
173
|
-
"line":
|
|
173
|
+
"line": 22975
|
|
174
174
|
},
|
|
175
175
|
"principalKeyOf": {
|
|
176
176
|
"types": "dist/server/tasks/store.d.ts",
|
|
177
177
|
"implementation": "dist/index.js",
|
|
178
|
-
"line":
|
|
178
|
+
"line": 21376
|
|
179
179
|
},
|
|
180
180
|
"taskKeyOf": {
|
|
181
181
|
"types": "dist/shared/tasks/task-id.d.ts",
|
|
@@ -1764,7 +1764,9 @@ With hooks disabled, your application is responsible for closing MCP connections
|
|
|
1764
1764
|
|
|
1765
1765
|
For HTTP servers, you can provide a custom `fetch` function to handle runtime-defined authentication or request interception. It can also handle other custom behavior. This is particularly useful when you need to refresh tokens on each request or forward user credentials from the incoming request to the MCP server.
|
|
1766
1766
|
|
|
1767
|
-
The custom `fetch` function receives an optional third `requestContext` parameter, which provides access to request-scoped data (e.g., authentication cookies, bearer tokens) set by middleware or passed during agent/tool execution. The `requestContext` is `null`
|
|
1767
|
+
The custom `fetch` function receives an optional third `requestContext` parameter, which provides access to request-scoped data (e.g., authentication cookies, bearer tokens) set by middleware or passed during agent/tool execution. The `requestContext` is `null` for requests that no tool call sends, such as `listTools()` and the connection handshake it opens. When a tool call opens the connection, either because a tool rebuilt with `toolsFromDefinitions()` or `toolFromDefinition()` connects on its first execution or because the call reconnects, the handshake receives that call's `requestContext`. Streams the connection keeps open afterward, such as the server-to-client event stream, keep using that same `requestContext`, and so do the client's replies to server requests on them, such as an answer to an input request. A request your own code starts from a server log or notification on those streams gets `null`.
|
|
1768
|
+
|
|
1769
|
+
A server that authenticates every request therefore needs a credential for discovery as well as for tool calls. The following example forwards the user's cookie when a tool call provides a `requestContext`, and sends the app's own token when there's none, as in `listTools()`. Any request without a `requestContext` gets that token, so have the server limit it to discovery, for example listing tools but not calling them.
|
|
1768
1770
|
|
|
1769
1771
|
When `fetch` is provided, `requestInit` and `authProvider` become optional, as you can handle these concerns within your custom fetch function.
|
|
1770
1772
|
|
|
@@ -1775,10 +1777,15 @@ const mcpClient = new MCPClient({
|
|
|
1775
1777
|
url: new URL('https://api.example.com/mcp'),
|
|
1776
1778
|
fetch: async (url, init, requestContext) => {
|
|
1777
1779
|
const headers = new Headers(init?.headers)
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1780
|
+
if (requestContext) {
|
|
1781
|
+
// A tool call: forward the auth cookie from the incoming request
|
|
1782
|
+
const cookie = requestContext.get('cookie')
|
|
1783
|
+
if (cookie) {
|
|
1784
|
+
headers.set('cookie', cookie)
|
|
1785
|
+
}
|
|
1786
|
+
} else {
|
|
1787
|
+
// No requestContext, as in listTools(): a token the server only accepts for discovery
|
|
1788
|
+
headers.set('authorization', `Bearer ${process.env.MCP_DISCOVERY_TOKEN}`)
|
|
1782
1789
|
}
|
|
1783
1790
|
return fetch(url, { ...init, headers })
|
|
1784
1791
|
},
|
|
@@ -1800,9 +1807,11 @@ await agent.generate('Hello!', {
|
|
|
1800
1807
|
})
|
|
1801
1808
|
```
|
|
1802
1809
|
|
|
1810
|
+
If the server accepts only per-user credentials, skip `listTools()` at startup. Build the catalog with [`listToolDefinitions()`](#listtooldefinitions) from a client that has a credential of its own, for example in a build step with a static `requestInit` header, and store it. At runtime, rebuild the tools with [`toolsFromDefinitions()`](#toolsfromdefinitions). Each rebuilt tool opens the connection on its first call, so the handshake carries that call's `requestContext`.
|
|
1811
|
+
|
|
1803
1812
|
## Handling auth failures inside custom fetch
|
|
1804
1813
|
|
|
1805
|
-
A custom `fetch` shouldn't `throw` when authentication is unavailable.
|
|
1814
|
+
A custom `fetch` shouldn't `throw` when authentication is unavailable. JSON-RPC requests such as `tools/call` are `POST`s, and the SDK surfaces a non-2xx response as an error to the caller of `listTools()`, `tools/call` and so on, which is the behavior you want. A thrown `fetch` is reported the same way but loses the server's status and body. On a 2025-11-25 server, the client also sends a `GET` with no body after the handshake to open the server-to-client event stream, so check `init.method` rather than assuming a `POST` body. Long-lived streams are reopened after a failure: the `subscriptions/listen` `POST` the client opens for `resources.subscribe()` and the `GET` event stream if it drops. An unauthenticated `subscriptions/listen` stream can loop. Wait for the token, then forward the request:
|
|
1806
1815
|
|
|
1807
1816
|
```typescript
|
|
1808
1817
|
async function waitForToken(timeoutMs = 5000): Promise<string | null> {
|
package/dist/index.cjs
CHANGED
|
@@ -15870,6 +15870,16 @@ function shouldDetachPersistentTransportRequest(init) {
|
|
|
15870
15870
|
return false;
|
|
15871
15871
|
}
|
|
15872
15872
|
}
|
|
15873
|
+
/** Whether a request body is a single JSON-RPC response: the client's reply to a server request. */
|
|
15874
|
+
function isJsonRpcResponseBody(body) {
|
|
15875
|
+
if (typeof body !== "string") return false;
|
|
15876
|
+
try {
|
|
15877
|
+
const message = JSON.parse(body);
|
|
15878
|
+
return typeof message === "object" && message !== null && !Array.isArray(message) && !("method" in message) && "id" in message && ("result" in message || "error" in message);
|
|
15879
|
+
} catch {
|
|
15880
|
+
return false;
|
|
15881
|
+
}
|
|
15882
|
+
}
|
|
15873
15883
|
const TASK_WAIT_ERROR_IDS = {
|
|
15874
15884
|
timeout: "MCP_CLIENT_TOOL_TASK_TIMEOUT",
|
|
15875
15885
|
expired: "MCP_CLIENT_TOOL_TASK_EXPIRED",
|
|
@@ -16098,6 +16108,19 @@ var InternalMastraMCPClient = class extends _mastra_core_base.MastraBase {
|
|
|
16098
16108
|
clientConnectionOnClose;
|
|
16099
16109
|
_authState;
|
|
16100
16110
|
operationContextStore = new async_hooks.AsyncLocalStorage();
|
|
16111
|
+
/**
|
|
16112
|
+
* The requestContext of the tool call whose execution opened the connection. Only the
|
|
16113
|
+
* transport's fetch reads it, so the handshake and the streams the connection keeps open are
|
|
16114
|
+
* sent as that call. Messages arriving on those streams are delivered outside it, so server logs
|
|
16115
|
+
* are not labelled with it and requests their handlers send are not sent as that call.
|
|
16116
|
+
*/
|
|
16117
|
+
connectionContextStore = new async_hooks.AsyncLocalStorage();
|
|
16118
|
+
/**
|
|
16119
|
+
* The connection context of the transport a server message arrived on, as it was when that
|
|
16120
|
+
* transport was created, set while the message is delivered. The transport's fetch reads it only for the client's replies to server requests,
|
|
16121
|
+
* which belong to the connection rather than to the handler that produced them.
|
|
16122
|
+
*/
|
|
16123
|
+
replyContextStore = new async_hooks.AsyncLocalStorage();
|
|
16101
16124
|
exitHookUnsubscribe;
|
|
16102
16125
|
sigTermHandler;
|
|
16103
16126
|
sigHupHandler;
|
|
@@ -16290,7 +16313,7 @@ var InternalMastraMCPClient = class extends _mastra_core_base.MastraBase {
|
|
|
16290
16313
|
if (allowedHosts !== void 0) assertHostAllowed(url, allowedHosts);
|
|
16291
16314
|
const policyUserFetch = userFetch && allowedHosts !== void 0 ? wrapFetchWithHostPolicy(userFetch, allowedHosts) : void 0;
|
|
16292
16315
|
const fetch = (requestUrl, init) => {
|
|
16293
|
-
const requestContext = this.
|
|
16316
|
+
const requestContext = this.fetchRequestContext(init);
|
|
16294
16317
|
const executeFetch = () => {
|
|
16295
16318
|
if (allowedHosts === void 0) return userFetch ? userFetch(requestUrl, init, requestContext) : globalThis.fetch(requestUrl, init);
|
|
16296
16319
|
if (policyUserFetch) return policyUserFetch(requestUrl, init, requestContext);
|
|
@@ -16305,6 +16328,7 @@ var InternalMastraMCPClient = class extends _mastra_core_base.MastraBase {
|
|
|
16305
16328
|
fetch
|
|
16306
16329
|
});
|
|
16307
16330
|
observeEventStreamRequests(transport, this.noteEventStreamSent);
|
|
16331
|
+
this.deliverOutsideConnectionContext(transport);
|
|
16308
16332
|
this.connectingTransport = transport;
|
|
16309
16333
|
try {
|
|
16310
16334
|
this.assertSameLifecycle(generation);
|
|
@@ -16326,6 +16350,59 @@ var InternalMastraMCPClient = class extends _mastra_core_base.MastraBase {
|
|
|
16326
16350
|
}
|
|
16327
16351
|
}
|
|
16328
16352
|
/**
|
|
16353
|
+
* Connects as a tool call: the handshake and the streams the connection keeps open reach the
|
|
16354
|
+
* transport's fetch with the call's requestContext, through the connection context. Any enclosing
|
|
16355
|
+
* operation scope is exited first. It would take priority in fetch, and the new streams and stdio
|
|
16356
|
+
* child would deliver every later server message in it.
|
|
16357
|
+
*/
|
|
16358
|
+
connectAsCall(requestContext, connect) {
|
|
16359
|
+
return this.operationContextStore.exit(() => this.connectionContextStore.run(requestContext, connect));
|
|
16360
|
+
}
|
|
16361
|
+
/**
|
|
16362
|
+
* The requestContext the transport's fetch passes on for an outgoing request. An operation scope
|
|
16363
|
+
* owns its requests, even when its requestContext is null. Outside one, the handshake and the
|
|
16364
|
+
* streams the connection keeps open use the connection context, and a reply to a server request
|
|
16365
|
+
* uses the context of the connection that delivered the request.
|
|
16366
|
+
*/
|
|
16367
|
+
fetchRequestContext(init) {
|
|
16368
|
+
const operationContext = this.operationContextStore.getStore();
|
|
16369
|
+
if (operationContext !== void 0) return operationContext;
|
|
16370
|
+
const connectionContext = this.connectionContextStore.getStore();
|
|
16371
|
+
if (connectionContext !== void 0) return connectionContext;
|
|
16372
|
+
const replyContext = this.replyContextStore.getStore();
|
|
16373
|
+
if (replyContext !== void 0 && isJsonRpcResponseBody(init?.body)) return replyContext;
|
|
16374
|
+
return null;
|
|
16375
|
+
}
|
|
16376
|
+
/**
|
|
16377
|
+
* Delivers every message the server sends outside the connection context, from the handshake on.
|
|
16378
|
+
* A server log, notification or request arriving on a stream the opening call started belongs to
|
|
16379
|
+
* no call, so a request its handler sends must not be sent as that call. The client's reply to a
|
|
16380
|
+
* server request still is, through `replyContextStore`.
|
|
16381
|
+
*
|
|
16382
|
+
* The reply context is the connection context this transport was created in, captured once. Read
|
|
16383
|
+
* at delivery time, it would carry over to a connection that a handler of an older connection's
|
|
16384
|
+
* message opens, such as a `reconnectServer()` from a server log callback.
|
|
16385
|
+
*
|
|
16386
|
+
* The SDK assigns `onmessage` during `connect()` and swaps it while probing the server, so every
|
|
16387
|
+
* assignment is wrapped. A handler that wraps an already wrapped one (`interceptTaskResults`, or
|
|
16388
|
+
* the probe restoring its saved handler) runs with the same reply context.
|
|
16389
|
+
*/
|
|
16390
|
+
deliverOutsideConnectionContext(transport) {
|
|
16391
|
+
const replyContext = this.connectionContextStore.getStore() ?? null;
|
|
16392
|
+
let deliver;
|
|
16393
|
+
Object.defineProperty(transport, "onmessage", {
|
|
16394
|
+
configurable: true,
|
|
16395
|
+
enumerable: true,
|
|
16396
|
+
get: () => deliver,
|
|
16397
|
+
set: (handler) => {
|
|
16398
|
+
deliver = handler && ((message, extra) => {
|
|
16399
|
+
const dispatch = () => handler.call(transport, message, extra);
|
|
16400
|
+
this.connectionContextStore.exit(() => this.replyContextStore.run(replyContext, dispatch));
|
|
16401
|
+
});
|
|
16402
|
+
}
|
|
16403
|
+
});
|
|
16404
|
+
}
|
|
16405
|
+
/**
|
|
16329
16406
|
* Detaches whatever transport is still attached to the underlying SDK Client.
|
|
16330
16407
|
*
|
|
16331
16408
|
* The SDK assigns its internal `_transport` before `transport.start()` and never
|
|
@@ -16663,7 +16740,8 @@ var InternalMastraMCPClient = class extends _mastra_core_base.MastraBase {
|
|
|
16663
16740
|
this.serverImplementation = void 0;
|
|
16664
16741
|
}
|
|
16665
16742
|
this.assertSameLifecycle(generation);
|
|
16666
|
-
|
|
16743
|
+
const callContext = this.operationContextStore.getStore();
|
|
16744
|
+
await (callContext === void 0 ? this.connect(generation) : this.connectAsCall(callContext, () => this.connect(generation)));
|
|
16667
16745
|
this.log("debug", "Successfully reconnected to MCP server");
|
|
16668
16746
|
})();
|
|
16669
16747
|
this.reconnectPromise = reconnectPromise;
|
|
@@ -17156,8 +17234,8 @@ var InternalMastraMCPClient = class extends _mastra_core_base.MastraBase {
|
|
|
17156
17234
|
},
|
|
17157
17235
|
...tool.outputSchema ? { toModelOutput: createStructuredToolToModelOutput() } : {},
|
|
17158
17236
|
execute: async (input, context) => {
|
|
17159
|
-
if (serverMeta.connectFirst) await this.connect();
|
|
17160
17237
|
const operationContext = context?.requestContext ?? null;
|
|
17238
|
+
if (serverMeta.connectFirst) await this.connectAsCall(operationContext, () => this.connect());
|
|
17161
17239
|
return this.operationContextStore.run(operationContext, async () => {
|
|
17162
17240
|
const suspendHost = context?.agent ?? context?.workflow;
|
|
17163
17241
|
const toolCallSpan = context?.tracingContext?.currentSpan;
|