@mastra/mcp 0.11.3-alpha.0 → 0.11.3-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.
Files changed (45) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/index.cjs +7 -4
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.js +7 -4
  5. package/dist/index.js.map +1 -1
  6. package/dist/server/server.d.ts.map +1 -1
  7. package/package.json +19 -6
  8. package/.turbo/turbo-build.log +0 -4
  9. package/eslint.config.js +0 -11
  10. package/integration-tests/node_modules/.bin/tsc +0 -21
  11. package/integration-tests/node_modules/.bin/tsserver +0 -21
  12. package/integration-tests/node_modules/.bin/vitest +0 -21
  13. package/integration-tests/package.json +0 -29
  14. package/integration-tests/src/mastra/agents/weather.ts +0 -34
  15. package/integration-tests/src/mastra/index.ts +0 -15
  16. package/integration-tests/src/mastra/mcp/index.ts +0 -46
  17. package/integration-tests/src/mastra/tools/weather.ts +0 -13
  18. package/integration-tests/src/server.test.ts +0 -238
  19. package/integration-tests/tsconfig.json +0 -13
  20. package/integration-tests/vitest.config.ts +0 -14
  21. package/src/__fixtures__/fire-crawl-complex-schema.ts +0 -1013
  22. package/src/__fixtures__/server-weather.ts +0 -16
  23. package/src/__fixtures__/stock-price.ts +0 -128
  24. package/src/__fixtures__/tools.ts +0 -94
  25. package/src/__fixtures__/weather.ts +0 -269
  26. package/src/client/client.test.ts +0 -585
  27. package/src/client/client.ts +0 -628
  28. package/src/client/configuration.test.ts +0 -856
  29. package/src/client/configuration.ts +0 -468
  30. package/src/client/elicitationActions.ts +0 -26
  31. package/src/client/index.ts +0 -3
  32. package/src/client/promptActions.ts +0 -70
  33. package/src/client/resourceActions.ts +0 -119
  34. package/src/index.ts +0 -2
  35. package/src/server/index.ts +0 -2
  36. package/src/server/promptActions.ts +0 -48
  37. package/src/server/resourceActions.ts +0 -90
  38. package/src/server/server-logging.test.ts +0 -181
  39. package/src/server/server.test.ts +0 -2142
  40. package/src/server/server.ts +0 -1442
  41. package/src/server/types.ts +0 -59
  42. package/tsconfig.build.json +0 -9
  43. package/tsconfig.json +0 -5
  44. package/tsup.config.ts +0 -17
  45. package/vitest.config.ts +0 -8
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @mastra/mcp
2
2
 
3
+ ## 0.11.3-alpha.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#7343](https://github.com/mastra-ai/mastra/pull/7343) [`de3cbc6`](https://github.com/mastra-ai/mastra/commit/de3cbc61079211431bd30487982ea3653517278e) Thanks [@LekoArts](https://github.com/LekoArts)! - Update the `package.json` file to include additional fields like `repository`, `homepage` or `files`.
8
+
9
+ - Updated dependencies [[`85ef90b`](https://github.com/mastra-ai/mastra/commit/85ef90bb2cd4ae4df855c7ac175f7d392c55c1bf), [`de3cbc6`](https://github.com/mastra-ai/mastra/commit/de3cbc61079211431bd30487982ea3653517278e)]:
10
+ - @mastra/core@0.15.3-alpha.5
11
+
12
+ ## 0.11.3-alpha.1
13
+
14
+ ### Patch Changes
15
+
16
+ - [#7274](https://github.com/mastra-ai/mastra/pull/7274) [`ad78bfc`](https://github.com/mastra-ai/mastra/commit/ad78bfc4ea6a1fff140432bf4f638e01af7af668) Thanks [@epinzur](https://github.com/epinzur)! - "piped tracingContext through inngest and mcp packages"
17
+
18
+ - Updated dependencies [[`ab48c97`](https://github.com/mastra-ai/mastra/commit/ab48c979098ea571faf998a55d3a00e7acd7a715), [`ff89505`](https://github.com/mastra-ai/mastra/commit/ff895057c8c7e91a5535faef46c5e5391085ddfa), [`183dc95`](https://github.com/mastra-ai/mastra/commit/183dc95596f391b977bd1a2c050b8498dac74891), [`a1111e2`](https://github.com/mastra-ai/mastra/commit/a1111e24e705488adfe5e0a6f20c53bddf26cb22), [`61debef`](https://github.com/mastra-ai/mastra/commit/61debefd80ad3a7ed5737e19df6a23d40091689a), [`9beaeff`](https://github.com/mastra-ai/mastra/commit/9beaeffa4a97b1d5fd01a7f8af8708b16067f67c), [`9eee594`](https://github.com/mastra-ai/mastra/commit/9eee594e35e0ca2a650fcc33fa82009a142b9ed0), [`979912c`](https://github.com/mastra-ai/mastra/commit/979912cfd180aad53287cda08af771df26454e2c), [`7dcf4c0`](https://github.com/mastra-ai/mastra/commit/7dcf4c04f44d9345b1f8bc5d41eae3f11ac61611), [`ad78bfc`](https://github.com/mastra-ai/mastra/commit/ad78bfc4ea6a1fff140432bf4f638e01af7af668), [`0ce418a`](https://github.com/mastra-ai/mastra/commit/0ce418a1ccaa5e125d4483a9651b635046152569), [`8387952`](https://github.com/mastra-ai/mastra/commit/838795227b4edf758c84a2adf6f7fba206c27719), [`5eca5d2`](https://github.com/mastra-ai/mastra/commit/5eca5d2655788863ea0442a46c9ef5d3c6dbe0a8)]:
19
+ - @mastra/core@0.15.3-alpha.4
20
+
3
21
  ## 0.11.3-alpha.0
4
22
 
5
23
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1862,12 +1862,12 @@ Provided arguments: ${JSON.stringify(request.params.arguments, null, 2)}`
1862
1862
  inputSchema: zod.z.object({
1863
1863
  message: zod.z.string().describe("The question or input for the agent.")
1864
1864
  }),
1865
- execute: async ({ context, runtimeContext }) => {
1865
+ execute: async ({ context, runtimeContext, tracingContext }) => {
1866
1866
  this.logger.debug(
1867
1867
  `Executing agent tool '${agentToolName}' for agent '${agent.name}' with message: "${context.message}"`
1868
1868
  );
1869
1869
  try {
1870
- const response = await agent.generate(context.message, { runtimeContext });
1870
+ const response = await agent.generate(context.message, { runtimeContext, tracingContext });
1871
1871
  return response;
1872
1872
  } catch (error) {
1873
1873
  this.logger.error(`Error executing agent tool '${agentToolName}' for agent '${agent.name}':`, error);
@@ -1880,6 +1880,7 @@ Provided arguments: ${JSON.stringify(request.params.arguments, null, 2)}`
1880
1880
  logger: this.logger,
1881
1881
  mastra: this.mastra,
1882
1882
  runtimeContext: new runtimeContext.RuntimeContext(),
1883
+ tracingContext: {},
1883
1884
  description: agentToolDefinition.description
1884
1885
  };
1885
1886
  const coreTool = utils.makeCoreTool(agentToolDefinition, options);
@@ -1924,14 +1925,14 @@ Provided arguments: ${JSON.stringify(request.params.arguments, null, 2)}`
1924
1925
  id: workflowToolName,
1925
1926
  description: `Run workflow '${workflowKey}'. Workflow description: ${workflowDescription}`,
1926
1927
  inputSchema: workflow.inputSchema,
1927
- execute: async ({ context, runtimeContext }) => {
1928
+ execute: async ({ context, runtimeContext, tracingContext }) => {
1928
1929
  this.logger.debug(
1929
1930
  `Executing workflow tool '${workflowToolName}' for workflow '${workflow.id}' with input:`,
1930
1931
  context
1931
1932
  );
1932
1933
  try {
1933
1934
  const run2 = workflow.createRun({ runId: runtimeContext?.get("runId") });
1934
- const response = await run2.start({ inputData: context, runtimeContext });
1935
+ const response = await run2.start({ inputData: context, runtimeContext, tracingContext });
1935
1936
  return response;
1936
1937
  } catch (error) {
1937
1938
  this.logger.error(
@@ -1947,6 +1948,7 @@ Provided arguments: ${JSON.stringify(request.params.arguments, null, 2)}`
1947
1948
  logger: this.logger,
1948
1949
  mastra: this.mastra,
1949
1950
  runtimeContext: new runtimeContext.RuntimeContext(),
1951
+ tracingContext: {},
1950
1952
  description: workflowToolDefinition.description
1951
1953
  };
1952
1954
  const coreTool = utils.makeCoreTool(workflowToolDefinition, options);
@@ -1985,6 +1987,7 @@ Provided arguments: ${JSON.stringify(request.params.arguments, null, 2)}`
1985
1987
  const options = {
1986
1988
  name: toolName,
1987
1989
  runtimeContext: new runtimeContext.RuntimeContext(),
1990
+ tracingContext: {},
1988
1991
  mastra: this.mastra,
1989
1992
  logger: this.logger,
1990
1993
  description: toolInstance?.description