@mastra/mcp 0.10.9 → 0.10.10-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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +21 -0
- package/README.md +38 -1
- package/dist/__fixtures__/weather.d.ts +1 -1
- package/dist/client/client.d.ts +5 -3
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/configuration.d.ts +1 -1
- package/dist/client/elicitationActions.d.ts +3 -3
- package/dist/client/index.d.ts +3 -3
- package/dist/client/promptActions.d.ts +3 -3
- package/dist/client/resourceActions.d.ts +3 -3
- package/dist/index.cjs +8 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/dist/server/index.d.ts +2 -2
- package/dist/server/server.d.ts +3 -3
- package/integration-tests/package.json +1 -1
- package/package.json +8 -7
- package/src/client/client.test.ts +66 -0
- package/src/client/client.ts +5 -2
- package/tsup.config.ts +2 -7
- package/integration-tests/node_modules/.bin/mastra +0 -21
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './client';
|
|
2
|
-
export * from './server';
|
|
1
|
+
export * from './client/index.js';
|
|
2
|
+
export * from './server/index.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -305,7 +305,7 @@ var InternalMastraMCPClient = class extends MastraBase {
|
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
async connectHttp(url) {
|
|
308
|
-
const { requestInit, eventSourceInit } = this.serverConfig;
|
|
308
|
+
const { requestInit, eventSourceInit, authProvider } = this.serverConfig;
|
|
309
309
|
this.log("debug", `Attempting to connect to URL: ${url}`);
|
|
310
310
|
let shouldTrySSE = url.pathname.endsWith(`/sse`);
|
|
311
311
|
if (!shouldTrySSE) {
|
|
@@ -313,7 +313,8 @@ var InternalMastraMCPClient = class extends MastraBase {
|
|
|
313
313
|
this.log("debug", "Trying Streamable HTTP transport...");
|
|
314
314
|
const streamableTransport = new StreamableHTTPClientTransport(url, {
|
|
315
315
|
requestInit,
|
|
316
|
-
reconnectionOptions: this.serverConfig.reconnectionOptions
|
|
316
|
+
reconnectionOptions: this.serverConfig.reconnectionOptions,
|
|
317
|
+
authProvider
|
|
317
318
|
});
|
|
318
319
|
await this.client.connect(streamableTransport, {
|
|
319
320
|
timeout: (
|
|
@@ -331,7 +332,7 @@ var InternalMastraMCPClient = class extends MastraBase {
|
|
|
331
332
|
if (shouldTrySSE) {
|
|
332
333
|
this.log("debug", "Falling back to deprecated HTTP+SSE transport...");
|
|
333
334
|
try {
|
|
334
|
-
const sseTransport = new SSEClientTransport(url, { requestInit, eventSourceInit });
|
|
335
|
+
const sseTransport = new SSEClientTransport(url, { requestInit, eventSourceInit, authProvider });
|
|
335
336
|
await this.client.connect(sseTransport, { timeout: this.serverConfig.timeout ?? this.timeout });
|
|
336
337
|
this.transport = sseTransport;
|
|
337
338
|
this.log("debug", "Successfully connected using deprecated HTTP+SSE transport.");
|
|
@@ -1015,7 +1016,7 @@ var MCPConfiguration = class extends MCPClient {
|
|
|
1015
1016
|
}
|
|
1016
1017
|
};
|
|
1017
1018
|
|
|
1018
|
-
// ../../node_modules/.pnpm/hono@4.8.
|
|
1019
|
+
// ../../node_modules/.pnpm/hono@4.8.12/node_modules/hono/dist/utils/stream.js
|
|
1019
1020
|
var StreamingApi = class {
|
|
1020
1021
|
writer;
|
|
1021
1022
|
encoder;
|
|
@@ -1082,7 +1083,7 @@ var StreamingApi = class {
|
|
|
1082
1083
|
}
|
|
1083
1084
|
};
|
|
1084
1085
|
|
|
1085
|
-
// ../../node_modules/.pnpm/hono@4.8.
|
|
1086
|
+
// ../../node_modules/.pnpm/hono@4.8.12/node_modules/hono/dist/helper/streaming/utils.js
|
|
1086
1087
|
var isOldBunVersion = () => {
|
|
1087
1088
|
const version = typeof Bun !== "undefined" ? Bun.version : void 0;
|
|
1088
1089
|
if (version === void 0) {
|
|
@@ -1093,7 +1094,7 @@ var isOldBunVersion = () => {
|
|
|
1093
1094
|
return result;
|
|
1094
1095
|
};
|
|
1095
1096
|
|
|
1096
|
-
// ../../node_modules/.pnpm/hono@4.8.
|
|
1097
|
+
// ../../node_modules/.pnpm/hono@4.8.12/node_modules/hono/dist/utils/html.js
|
|
1097
1098
|
var HtmlEscapedCallbackPhase = {
|
|
1098
1099
|
Stringify: 1};
|
|
1099
1100
|
var resolveCallback = async (str, phase, preserveCallbacks, context, buffer) => {
|
|
@@ -1124,7 +1125,7 @@ var resolveCallback = async (str, phase, preserveCallbacks, context, buffer) =>
|
|
|
1124
1125
|
}
|
|
1125
1126
|
};
|
|
1126
1127
|
|
|
1127
|
-
// ../../node_modules/.pnpm/hono@4.8.
|
|
1128
|
+
// ../../node_modules/.pnpm/hono@4.8.12/node_modules/hono/dist/helper/streaming/sse.js
|
|
1128
1129
|
var SSEStreamingApi = class extends StreamingApi {
|
|
1129
1130
|
constructor(writable, readable) {
|
|
1130
1131
|
super(writable, readable);
|