@mastra/mcp 1.5.1 → 1.5.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/index.js CHANGED
@@ -8,10 +8,9 @@ import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/
8
8
  import { DEFAULT_REQUEST_TIMEOUT_MSEC } from '@modelcontextprotocol/sdk/shared/protocol.js';
9
9
  import { LoggingMessageNotificationSchema, ListRootsRequestSchema, ListResourcesResultSchema, ReadResourceResultSchema, EmptyResultSchema, ListResourceTemplatesResultSchema, ListPromptsResultSchema, GetPromptResultSchema, PromptListChangedNotificationSchema, ResourceUpdatedNotificationSchema, ResourceListChangedNotificationSchema, ElicitRequestSchema, ProgressNotificationSchema, ListToolsRequestSchema, CallToolRequestSchema, SetLevelRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, ListResourceTemplatesRequestSchema, SubscribeRequestSchema, UnsubscribeRequestSchema, ListPromptsRequestSchema, PromptSchema, GetPromptRequestSchema, CallToolResultSchema, ErrorCode, JSONRPCMessageSchema } from '@modelcontextprotocol/sdk/types.js';
10
10
  import { asyncExitHook, gracefulExit } from 'exit-hook';
11
+ import { createHash, randomUUID } from 'crypto';
11
12
  import { MastraError, ErrorCategory, ErrorDomain } from '@mastra/core/error';
12
13
  import equal from 'fast-deep-equal';
13
- import { v5 } from 'uuid';
14
- import { randomUUID } from 'crypto';
15
14
  import { MCPServerBase } from '@mastra/core/mcp';
16
15
  import { RequestContext } from '@mastra/core/request-context';
17
16
  import { isStandardSchemaWithJSON, standardSchemaToJSONSchema } from '@mastra/core/schema';
@@ -1589,8 +1588,7 @@ To fix this you have three different options:
1589
1588
  }
1590
1589
  makeId() {
1591
1590
  const text = JSON.stringify(this.serverConfigs).normalize("NFKC");
1592
- const idNamespace = v5(`MCPClient`, v5.DNS);
1593
- return v5(text, idNamespace);
1591
+ return createHash("sha256").update("MCPClient").update(text).digest("hex");
1594
1592
  }
1595
1593
  /**
1596
1594
  * Disconnects from all MCP servers and cleans up resources.