@mastra/mcp 0.4.1-alpha.2 → 0.4.1-alpha.4

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.
@@ -2,7 +2,7 @@ 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
4
  import type { LogMessage } from './client';
5
- import { MCPConfiguration } from './configuration';
5
+ import { MCPClient } from './configuration';
6
6
 
7
7
  // Increase test timeout for server operations
8
8
  vi.setConfig({ testTimeout: 80000, hookTimeout: 80000 });
@@ -58,7 +58,7 @@ describe('MCP Server Logging', () => {
58
58
  const weatherLogHandler = vi.fn();
59
59
  const stockLogHandler = vi.fn();
60
60
 
61
- const config = new MCPConfiguration({
61
+ const config = new MCPClient({
62
62
  id: 'server-log-test',
63
63
  servers: {
64
64
  weather: {
@@ -116,7 +116,7 @@ describe('MCP Server Logging', () => {
116
116
  });
117
117
 
118
118
  // Intentionally use a non-existent command to generate errors
119
- const config = new MCPConfiguration({
119
+ const config = new MCPClient({
120
120
  id: 'error-log-test',
121
121
  servers: {
122
122
  badServer: {
@@ -153,7 +153,7 @@ describe('MCP Server Logging', () => {
153
153
  console.log(formatted);
154
154
  };
155
155
 
156
- const config = new MCPConfiguration({
156
+ const config = new MCPClient({
157
157
  id: 'console-log-test',
158
158
  servers: {
159
159
  echoServer: {
@@ -3,7 +3,7 @@ import path from 'path';
3
3
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
4
  import { describe, it, expect, beforeAll, afterAll, afterEach, vi } from 'vitest';
5
5
  import { weatherTool } from './__fixtures__/tools';
6
- import { MCPConfiguration } from './configuration';
6
+ import { MCPClient } from './configuration';
7
7
  import { MCPServer } from './server';
8
8
 
9
9
  const PORT = 9100 + Math.floor(Math.random() * 1000);
@@ -94,7 +94,7 @@ describe('MCPServer', () => {
94
94
  expect(server.getStdioTransport()).toBeInstanceOf(StdioServerTransport);
95
95
  });
96
96
  it('should use stdio transport to get tools', async () => {
97
- const existingConfig = new MCPConfiguration({
97
+ const existingConfig = new MCPClient({
98
98
  servers: {
99
99
  weather: {
100
100
  command: 'npx',