@mastra/mcp 0.10.10-alpha.0 → 0.10.10

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/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.");