@mastra/mcp-docs-server 1.0.0-beta.1 → 1.0.0-beta.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 (30) hide show
  1. package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +10 -10
  2. package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +9 -9
  3. package/.docs/organized/changelogs/%40mastra%2Fcodemod.md +8 -0
  4. package/.docs/organized/changelogs/%40mastra%2Fcore.md +10 -10
  5. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +9 -9
  6. package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +9 -9
  7. package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +11 -11
  8. package/.docs/organized/changelogs/%40mastra%2Fmcp.md +12 -12
  9. package/.docs/organized/changelogs/%40mastra%2Fmssql.md +16 -16
  10. package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +15 -15
  11. package/.docs/organized/changelogs/%40mastra%2Freact.md +8 -8
  12. package/.docs/organized/changelogs/%40mastra%2Fserver.md +8 -8
  13. package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +4 -0
  14. package/.docs/raw/guides/migrations/upgrade-to-v1/agent.mdx +11 -1
  15. package/.docs/raw/guides/migrations/upgrade-to-v1/client.mdx +42 -2
  16. package/.docs/raw/guides/migrations/upgrade-to-v1/evals.mdx +31 -1
  17. package/.docs/raw/guides/migrations/upgrade-to-v1/mastra.mdx +26 -2
  18. package/.docs/raw/guides/migrations/upgrade-to-v1/mcp.mdx +1 -1
  19. package/.docs/raw/guides/migrations/upgrade-to-v1/memory.mdx +28 -0
  20. package/.docs/raw/guides/migrations/upgrade-to-v1/overview.mdx +16 -2
  21. package/.docs/raw/guides/migrations/upgrade-to-v1/storage.mdx +80 -0
  22. package/.docs/raw/guides/migrations/upgrade-to-v1/vectors.mdx +25 -1
  23. package/.docs/raw/guides/migrations/upgrade-to-v1/workflows.mdx +31 -1
  24. package/.docs/raw/memory/overview.mdx +1 -1
  25. package/.docs/raw/memory/semantic-recall.mdx +1 -1
  26. package/.docs/raw/memory/storage/memory-with-mongodb.mdx +152 -0
  27. package/.docs/raw/reference/tools/mcp-server.mdx +49 -0
  28. package/CHANGELOG.md +10 -0
  29. package/dist/stdio.js +10 -14
  30. package/package.json +4 -4
@@ -1,5 +1,14 @@
1
1
  # @mastra/ai-sdk
2
2
 
3
+ ## 1.0.0-beta.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Improve ai-sdk transformers, handle custom data from agent sub workflow, sug agent tools ([#9919](https://github.com/mastra-ai/mastra/pull/9919))
8
+
9
+ - Updated dependencies [[`465ac05`](https://github.com/mastra-ai/mastra/commit/465ac0526a91d175542091c675181f1a96c98c46)]:
10
+ - @mastra/core@1.0.0-beta.2
11
+
3
12
  ## 1.0.0-beta.0
4
13
 
5
14
  ### Major Changes
@@ -289,14 +298,5 @@
289
298
  - fix: result object type inference when using structuredOutput and unify output/structuredOutput types with single OUTPUT generic ([#7969](https://github.com/mastra-ai/mastra/pull/7969))
290
299
 
291
300
  - Updated dependencies [[`a61f23f`](https://github.com/mastra-ai/mastra/commit/a61f23fbbca4b88b763d94f1d784c47895ed72d7), [`d1dc606`](https://github.com/mastra-ai/mastra/commit/d1dc6067b0557a71190b68d56ee15b48c26d2411), [`d3bd4d4`](https://github.com/mastra-ai/mastra/commit/d3bd4d482a685bbb67bfa89be91c90dca3fa71ad)]:
292
- - @mastra/core@0.17.2-alpha.0
293
-
294
- ## 0.0.3
295
-
296
- ### Patch Changes
297
-
298
- - Update peerdep of @mastra/core ([#7619](https://github.com/mastra-ai/mastra/pull/7619))
299
-
300
- - Updated dependencies [[`197cbb2`](https://github.com/mastra-ai/mastra/commit/197cbb248fc8cb4bbf61bf70b770f1388b445df2), [`a1bb887`](https://github.com/mastra-ai/mastra/commit/a1bb887e8bfae44230f487648da72e96ef824561), [`6590763`](https://github.com/mastra-ai/mastra/commit/65907630ef4bf4127067cecd1cb21b56f55d5f1b), [`fb84c21`](https://github.com/mastra-ai/mastra/commit/fb84c21859d09bdc8f158bd5412bdc4b5835a61c), [`5802bf5`](https://github.com/mastra-ai/mastra/commit/5802bf57f6182e4b67c28d7d91abed349a8d14f3), [`5bda53a`](https://github.com/mastra-ai/mastra/commit/5bda53a9747bfa7d876d754fc92c83a06e503f62), [`c2eade3`](https://github.com/mastra-ai/mastra/commit/c2eade3508ef309662f065e5f340d7840295dd53), [`f26a8fd`](https://github.com/mastra-ai/mastra/commit/f26a8fd99fcb0497a5d86c28324430d7f6a5fb83), [`222965a`](https://github.com/mastra-ai/mastra/commit/222965a98ce8197b86673ec594244650b5960257), [`6047778`](https://github.com/mastra-ai/mastra/commit/6047778e501df460648f31decddf8e443f36e373), [`a0f5f1c`](https://github.com/mastra-ai/mastra/commit/a0f5f1ca39c3c5c6d26202e9fcab986b4fe14568), [`9d4fc09`](https://github.com/mastra-ai/mastra/commit/9d4fc09b2ad55caa7738c7ceb3a905e454f74cdd), [`05c7abf`](https://github.com/mastra-ai/mastra/commit/05c7abfe105a015b7760c9bf33ff4419727502a0), [`0324ceb`](https://github.com/mastra-ai/mastra/commit/0324ceb8af9d16c12a531f90e575f6aab797ac81), [`d75ccf0`](https://github.com/mastra-ai/mastra/commit/d75ccf06dfd2582b916aa12624e3cd61b279edf1), [`0f9d227`](https://github.com/mastra-ai/mastra/commit/0f9d227890a98db33865abbea39daf407cd55ef7), [`b356f5f`](https://github.com/mastra-ai/mastra/commit/b356f5f7566cb3edb755d91f00b72fc1420b2a37), [`de056a0`](https://github.com/mastra-ai/mastra/commit/de056a02cbb43f6aa0380ab2150ea404af9ec0dd), [`f5ce05f`](https://github.com/mastra-ai/mastra/commit/f5ce05f831d42c69559bf4c0fdb46ccb920fc3a3), [`60c9cec`](https://github.com/mastra-ai/mastra/commit/60c9cec7048a79a87440f7840c383875bd710d93), [`c93532a`](https://github.com/mastra-ai/mastra/commit/c93532a340b80e4dd946d4c138d9381de5f70399), [`6cb1fcb`](https://github.com/mastra-ai/mastra/commit/6cb1fcbc8d0378ffed0d17784c96e68f30cb0272), [`aee4f00`](https://github.com/mastra-ai/mastra/commit/aee4f00e61e1a42e81a6d74ff149dbe69e32695a), [`9f6f30f`](https://github.com/mastra-ai/mastra/commit/9f6f30f04ec6648bbca798ea8aad59317c40d8db), [`547c621`](https://github.com/mastra-ai/mastra/commit/547c62104af3f7a551b3754e9cbdf0a3fbba15e4), [`897995e`](https://github.com/mastra-ai/mastra/commit/897995e630d572fe2891e7ede817938cabb43251), [`0fed8f2`](https://github.com/mastra-ai/mastra/commit/0fed8f2aa84b167b3415ea6f8f70755775132c8d), [`4f9ea8c`](https://github.com/mastra-ai/mastra/commit/4f9ea8c95ea74ba9abbf3b2ab6106c7d7bc45689), [`1a1fbe6`](https://github.com/mastra-ai/mastra/commit/1a1fbe66efb7d94abc373ed0dd9676adb8122454), [`d706fad`](https://github.com/mastra-ai/mastra/commit/d706fad6e6e4b72357b18d229ba38e6c913c0e70), [`87fd07f`](https://github.com/mastra-ai/mastra/commit/87fd07ff35387a38728967163460231b5d33ae3b), [`5c3768f`](https://github.com/mastra-ai/mastra/commit/5c3768fa959454232ad76715c381f4aac00c6881), [`2685a78`](https://github.com/mastra-ai/mastra/commit/2685a78f224b8b04e20d4fab5ac1adb638190071), [`36f39c0`](https://github.com/mastra-ai/mastra/commit/36f39c00dc794952dc3c11aab91c2fa8bca74b11), [`239b5a4`](https://github.com/mastra-ai/mastra/commit/239b5a497aeae2e8b4d764f46217cfff2284788e), [`8a3f5e4`](https://github.com/mastra-ai/mastra/commit/8a3f5e4212ec36b302957deb4bd47005ab598382)]:
301
301
 
302
- ... 103 more lines hidden. See full changelog in package directory.
302
+ ... 112 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,12 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 1.0.0-beta.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`465ac05`](https://github.com/mastra-ai/mastra/commit/465ac0526a91d175542091c675181f1a96c98c46)]:
8
+ - @mastra/core@1.0.0-beta.2
9
+
3
10
  ## 1.0.0-beta.1
4
11
 
5
12
  ### Patch Changes
@@ -291,12 +298,5 @@
291
298
  // context that only an agent would get like toolCallId, messages, suspend, resume, etc
292
299
  if (agent) {
293
300
  doSomething(inputData.something, agent)
294
- // context that only a workflow would get like runId, state, suspend, resume, etc
295
- } else if (workflow) {
296
- doSomething(inputData.something, workflow)
297
- // context that only a workflow would get like "extra", "elicitation"
298
- } else if (mcp) {
299
- doSomething(inputData.something, mcp)
300
- } else {
301
-
302
- ... 3293 more lines hidden. See full changelog in package directory.
301
+
302
+ ... 3300 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,13 @@
1
1
  # @mastra/codemod
2
2
 
3
+ ## 0.1.0-beta.1
4
+
5
+ ### Patch Changes
6
+
7
+ - - Improve existing codemods ([#9959](https://github.com/mastra-ai/mastra/pull/9959))
8
+ - Make package ESM-only
9
+ - Add new codemods
10
+
3
11
  ## 0.1.0-beta.0
4
12
 
5
13
  ### Minor Changes
@@ -1,5 +1,14 @@
1
1
  # @mastra/core
2
2
 
3
+ ## 1.0.0-beta.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Make suspendPayload optional when calling `suspend()` ([#9926](https://github.com/mastra-ai/mastra/pull/9926))
8
+ Save value returned as `suspendOutput` if user returns data still after calling `suspend()`
9
+ Automatically call `commit()` on uncommitted workflows when registering in Mastra instance
10
+ Show actual suspendPayload on Studio in suspend/resume flow
11
+
3
12
  ## 1.0.0-beta.1
4
13
 
5
14
  ### Patch Changes
@@ -289,14 +298,5 @@
289
298
  resourceId: 'user-123',
290
299
  page: 2, // page = Math.floor(offset / limit)
291
300
  perPage: 10,
292
- });
293
-
294
- // Before
295
- await memory.listMessages({
296
- threadId: 'thread-456',
297
- offset: 20,
298
- limit: 10,
299
- });
300
-
301
301
 
302
- ... 5128 more lines hidden. See full changelog in package directory.
302
+ ... 5137 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,13 @@
1
1
  # @mastra/deployer-cloud
2
2
 
3
+ ## 1.0.0-beta.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`465ac05`](https://github.com/mastra-ai/mastra/commit/465ac0526a91d175542091c675181f1a96c98c46)]:
8
+ - @mastra/core@1.0.0-beta.2
9
+ - @mastra/deployer@1.0.0-beta.2
10
+
3
11
  ## 1.0.0-beta.1
4
12
 
5
13
  ### Patch Changes
@@ -291,12 +299,4 @@
291
299
 
292
300
  ## 0.20.0-alpha.0
293
301
 
294
- ### Patch Changes
295
-
296
- - Creates a playground specific auth token ([#8420](https://github.com/mastra-ai/mastra/pull/8420))
297
-
298
- - Breaking change to move the agent.streamVNext/generateVNext implementation to the default stream/generate. The old stream/generate have now been moved to streamLegacy and generateLegacy ([#8097](https://github.com/mastra-ai/mastra/pull/8097))
299
-
300
- - Bump cloud deployer external mastra deps ([#8363](https://github.com/mastra-ai/mastra/pull/8363))
301
-
302
- ... 604 more lines hidden. See full changelog in package directory.
302
+ ... 612 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,13 @@
1
1
  # @mastra/deployer
2
2
 
3
+ ## 1.0.0-beta.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`465ac05`](https://github.com/mastra-ai/mastra/commit/465ac0526a91d175542091c675181f1a96c98c46)]:
8
+ - @mastra/core@1.0.0-beta.2
9
+ - @mastra/server@1.0.0-beta.2
10
+
3
11
  ## 1.0.0-beta.1
4
12
 
5
13
  ### Patch Changes
@@ -291,12 +299,4 @@
291
299
 
292
300
  - Fix undefined runtimeContext using memory from playground ([#9328](https://github.com/mastra-ai/mastra/pull/9328))
293
301
 
294
- - Make step optional in resumeStreamVNext API ([#9453](https://github.com/mastra-ai/mastra/pull/9453))
295
-
296
- - Add readable-streams to global externals, not compatible with CJS compilation ([#9735](https://github.com/mastra-ai/mastra/pull/9735))
297
-
298
- - Remove `waitForEvent` from workflows. `waitForEvent` is now removed, please use suspend & resume flow instead. See https://mastra.ai/en/docs/workflows/suspend-and-resume for more details on suspend & resume flow. ([#9214](https://github.com/mastra-ai/mastra/pull/9214))
299
-
300
- - Add better error handling during `mastra build` for `ERR_MODULE_NOT_FOUND` cases. ([#9127](https://github.com/mastra-ai/mastra/pull/9127))
301
-
302
- ... 5148 more lines hidden. See full changelog in package directory.
302
+ ... 5156 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,15 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 1.0.0-beta.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Clean up mcp docs server migration tool to have a better prompt. ([#9930](https://github.com/mastra-ai/mastra/pull/9930))
8
+
9
+ - Updated dependencies [[`d70e742`](https://github.com/mastra-ai/mastra/commit/d70e74243401d070e167e3bc19c329c1d98d8a5b), [`465ac05`](https://github.com/mastra-ai/mastra/commit/465ac0526a91d175542091c675181f1a96c98c46)]:
10
+ - @mastra/mcp@1.0.0-beta.1
11
+ - @mastra/core@1.0.0-beta.2
12
+
3
13
  ## 1.0.0-beta.1
4
14
 
5
15
  ### Patch Changes
@@ -289,14 +299,4 @@
289
299
  - Updated dependencies [[`4a70ccc`](https://github.com/mastra-ai/mastra/commit/4a70ccc5cfa12ae9c2b36545a5814cd98e5a0ead)]:
290
300
  - @mastra/core@0.19.1-alpha.1
291
301
 
292
- ## 0.13.26-alpha.0
293
-
294
- ### Patch Changes
295
-
296
- - Updated dependencies [[`0992b8b`](https://github.com/mastra-ai/mastra/commit/0992b8bf0f4f1ba7ad9940883ec4bb8d867d3105), [`283bea0`](https://github.com/mastra-ai/mastra/commit/283bea07adbaf04a27fa3ad2df611095e0825195)]:
297
- - @mastra/core@0.19.1-alpha.0
298
-
299
- ## 0.13.25
300
-
301
-
302
- ... 2179 more lines hidden. See full changelog in package directory.
302
+ ... 2189 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,16 @@
1
1
  # @mastra/mcp
2
2
 
3
+ ## 1.0.0-beta.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix MCP auth context propagation to tools called by agents ([#9948](https://github.com/mastra-ai/mastra/pull/9948))
8
+
9
+ Fixes the issue where MCP authentication context wasn't being passed to tools when called by agents. Tools can now access MCP context via `context.requestContext.get('mcp.extra')` when invoked via agents.
10
+
11
+ - Updated dependencies [[`465ac05`](https://github.com/mastra-ai/mastra/commit/465ac0526a91d175542091c675181f1a96c98c46)]:
12
+ - @mastra/core@1.0.0-beta.2
13
+
3
14
  ## 1.0.0-beta.0
4
15
 
5
16
  ### Major Changes
@@ -288,15 +299,4 @@
288
299
 
289
300
  ### Minor Changes
290
301
 
291
- - Update core peerdeps ([#7535](https://github.com/mastra-ai/mastra/pull/7535))
292
-
293
- ### Patch Changes
294
-
295
- - Revert "feat(mcp): add createMCPTool helper for proper execute types" ([#7513](https://github.com/mastra-ai/mastra/pull/7513))
296
-
297
- - Updated dependencies [[`0662d02`](https://github.com/mastra-ai/mastra/commit/0662d02ef16916e67531890639fcd72c69cfb6e2), [`6189844`](https://github.com/mastra-ai/mastra/commit/61898448e65bda02bb814fb15801a89dc6476938), [`d7a8f59`](https://github.com/mastra-ai/mastra/commit/d7a8f59154b0621aec4f41a6b2ea2b3882f03cb7), [`4dda259`](https://github.com/mastra-ai/mastra/commit/4dda2593b6343f9258671de5fb237aeba3ef6bb7), [`defed1c`](https://github.com/mastra-ai/mastra/commit/defed1ca8040cc8d42e645c5a50a1bc52a4918d7), [`6991ced`](https://github.com/mastra-ai/mastra/commit/6991cedcb5a44a49d9fe58ef67926e1f96ba55b1), [`9cb9c42`](https://github.com/mastra-ai/mastra/commit/9cb9c422854ee81074989dd2d8dccc0500ba8d3e), [`8334859`](https://github.com/mastra-ai/mastra/commit/83348594d4f37b311ba4a94d679c5f8721d796d4)]:
298
- - @mastra/core@0.16.1-alpha.0
299
-
300
- ## 0.11.4
301
-
302
- ... 2568 more lines hidden. See full changelog in package directory.
302
+ ... 2579 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,20 @@
1
1
  # @mastra/mssql
2
2
 
3
+ ## 1.0.0-beta.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixes MSSQL store test configuration and pagination issues: ([#9905](https://github.com/mastra-ai/mastra/pull/9905))
8
+
9
+ Adds missing id parameter to test configuration and updates documentation
10
+ Implements page validation to handle negative page numbers
11
+ Fixes sorting and pagination bugs in message listing (improves ORDER BY with seq_id secondary sort and corrects hasMore calculation)
12
+
13
+ - Prevents double stringification for MSSQL jsonb columns by reusing incoming strings that already contain valid JSON while still stringifying other inputs as needed. ([#9901](https://github.com/mastra-ai/mastra/pull/9901))
14
+
15
+ - Updated dependencies [[`465ac05`](https://github.com/mastra-ai/mastra/commit/465ac0526a91d175542091c675181f1a96c98c46)]:
16
+ - @mastra/core@1.0.0-beta.2
17
+
3
18
  ## 1.0.0-beta.0
4
19
 
5
20
  ### Major Changes
@@ -284,19 +299,4 @@
284
299
 
285
300
  - Update peer dependencies to match core package version bump (0.21.0) ([#8626](https://github.com/mastra-ai/mastra/pull/8626))
286
301
 
287
- - Update peer dependencies to match core package version bump (0.21.0) ([#8686](https://github.com/mastra-ai/mastra/pull/8686))
288
-
289
- - Updated dependencies [[`1ed9670`](https://github.com/mastra-ai/mastra/commit/1ed9670d3ca50cb60dc2e517738c5eef3968ed27), [`b5a66b7`](https://github.com/mastra-ai/mastra/commit/b5a66b748a14fc8b3f63b04642ddb9621fbcc9e0), [`f59fc1e`](https://github.com/mastra-ai/mastra/commit/f59fc1e406b8912e692f6bff6cfd4754cc8d165c), [`158381d`](https://github.com/mastra-ai/mastra/commit/158381d39335be934b81ef8a1947bccace492c25), [`a1799bc`](https://github.com/mastra-ai/mastra/commit/a1799bcc1b5a1cdc188f2ac0165f17a1c4ac6f7b), [`6ff6094`](https://github.com/mastra-ai/mastra/commit/6ff60946f4ecfebdeef6e21d2b230c2204f2c9b8), [`fb703b9`](https://github.com/mastra-ai/mastra/commit/fb703b9634eeaff1a6eb2b5531ce0f9e8fb04727), [`37a2314`](https://github.com/mastra-ai/mastra/commit/37a23148e0e5a3b40d4f9f098b194671a8a49faf), [`7b1ef57`](https://github.com/mastra-ai/mastra/commit/7b1ef57fc071c2aa2a2e32905b18cd88719c5a39), [`05a9dee`](https://github.com/mastra-ai/mastra/commit/05a9dee3d355694d28847bfffb6289657fcf7dfa), [`e3c1077`](https://github.com/mastra-ai/mastra/commit/e3c107763aedd1643d3def5df450c235da9ff76c), [`1908ca0`](https://github.com/mastra-ai/mastra/commit/1908ca0521f90e43779cc29ab590173ca560443c), [`1bccdb3`](https://github.com/mastra-ai/mastra/commit/1bccdb33eb90cbeba2dc5ece1c2561fb774b26b6), [`5ef944a`](https://github.com/mastra-ai/mastra/commit/5ef944a3721d93105675cac2b2311432ff8cc393), [`d6b186f`](https://github.com/mastra-ai/mastra/commit/d6b186fb08f1caf1b86f73d3a5ee88fb999ca3be), [`ee68e82`](https://github.com/mastra-ai/mastra/commit/ee68e8289ea4408d29849e899bc6e78b3bd4e843), [`228228b`](https://github.com/mastra-ai/mastra/commit/228228b0b1de9291cb8887587f5cea1a8757ebad), [`ea33930`](https://github.com/mastra-ai/mastra/commit/ea339301e82d6318257720d811b043014ee44064), [`65493b3`](https://github.com/mastra-ai/mastra/commit/65493b31c36f6fdb78f9679f7e1ecf0c250aa5ee), [`a998b8f`](https://github.com/mastra-ai/mastra/commit/a998b8f858091c2ec47683e60766cf12d03001e4), [`b5a66b7`](https://github.com/mastra-ai/mastra/commit/b5a66b748a14fc8b3f63b04642ddb9621fbcc9e0), [`8a37bdd`](https://github.com/mastra-ai/mastra/commit/8a37bddb6d8614a32c5b70303d583d80c620ea61), [`135d6f2`](https://github.com/mastra-ai/mastra/commit/135d6f22a326ed1dffff858700669dff09d2c9eb)]:
290
- - @mastra/core@0.21.0
291
-
292
- ## 0.4.5-alpha.0
293
-
294
- ### Patch Changes
295
-
296
- - Update peer dependencies to match core package version bump (0.21.0) ([#8619](https://github.com/mastra-ai/mastra/pull/8619))
297
-
298
- - Update peer dependencies to match core package version bump (0.21.0) ([#8557](https://github.com/mastra-ai/mastra/pull/8557))
299
-
300
- - Update peer dependencies to match core package version bump (0.21.0) ([#8626](https://github.com/mastra-ai/mastra/pull/8626))
301
-
302
- ... 503 more lines hidden. See full changelog in package directory.
302
+ ... 518 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,19 @@
1
1
  # @mastra/playground-ui
2
2
 
3
+ ## 7.0.0-beta.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Make suspendPayload optional when calling `suspend()` ([#9926](https://github.com/mastra-ai/mastra/pull/9926))
8
+ Save value returned as `suspendOutput` if user returns data still after calling `suspend()`
9
+ Automatically call `commit()` on uncommitted workflows when registering in Mastra instance
10
+ Show actual suspendPayload on Studio in suspend/resume flow
11
+ - Updated dependencies [[`627067b`](https://github.com/mastra-ai/mastra/commit/627067b22eeb26601f65fee3646ba17fc0c91501), [`465ac05`](https://github.com/mastra-ai/mastra/commit/465ac0526a91d175542091c675181f1a96c98c46)]:
12
+ - @mastra/ai-sdk@1.0.0-beta.1
13
+ - @mastra/core@1.0.0-beta.2
14
+ - @mastra/client-js@1.0.0-beta.2
15
+ - @mastra/react@0.1.0-beta.2
16
+
3
17
  ## 7.0.0-beta.1
4
18
 
5
19
  ### Patch Changes
@@ -285,18 +299,4 @@
285
299
  - Fix playground white screen when Zod discriminatedUnion is intersected using `and()`. ([#9692](https://github.com/mastra-ai/mastra/pull/9692))
286
300
  This now works, but zod validation will fail, please use `extend` instead
287
301
 
288
- Instead of
289
-
290
- ```
291
- z.discriminatedUnion('type', [
292
- z.object({ type: z.literal('byCity'), city: z.string() }),
293
- z.object({ type: z.literal('byCoords'), lat: z.number(), lon: z.number() }),
294
- ]).and(
295
- z.object({ order: z.number() })
296
- )
297
- ```
298
-
299
- do
300
-
301
-
302
- ... 4154 more lines hidden. See full changelog in package directory.
302
+ ... 4168 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,12 @@
1
1
  # @mastra/react-hooks
2
2
 
3
+ ## 0.1.0-beta.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @mastra/client-js@1.0.0-beta.2
9
+
3
10
  ## 0.1.0-beta.1
4
11
 
5
12
  ### Patch Changes
@@ -292,11 +299,4 @@
292
299
 
293
300
  ### Patch Changes
294
301
 
295
- - Updated dependencies []:
296
- - @mastra/client-js@0.14.1-alpha.1
297
-
298
- ## 0.0.2-alpha.0
299
-
300
- ### Patch Changes
301
-
302
- ... 29 more lines hidden. See full changelog in package directory.
302
+ ... 36 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,12 @@
1
1
  # @mastra/server
2
2
 
3
+ ## 1.0.0-beta.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`465ac05`](https://github.com/mastra-ai/mastra/commit/465ac0526a91d175542091c675181f1a96c98c46)]:
8
+ - @mastra/core@1.0.0-beta.2
9
+
3
10
  ## 1.0.0-beta.1
4
11
 
5
12
  ### Patch Changes
@@ -292,11 +299,4 @@
292
299
 
293
300
  - Add agent id to the list agent ([#9770](https://github.com/mastra-ai/mastra/pull/9770))
294
301
 
295
- - Update tool execution signature ([#9587](https://github.com/mastra-ai/mastra/pull/9587))
296
-
297
- Consolidated the 3 different execution contexts to one
298
-
299
- ```typescript
300
- // before depending on the context the tool was executed in
301
-
302
- ... 4216 more lines hidden. See full changelog in package directory.
302
+ ... 4223 more lines hidden. See full changelog in package directory.
@@ -138,6 +138,10 @@ const { error, status, sendMessage, messages, regenerate, stop } = useChat({
138
138
  inputData: {
139
139
  city: messages[messages.length - 1].parts[0].text,
140
140
  },
141
+ //Or resumeData for resuming a suspended workflow
142
+ resumeData: {
143
+ confirmation: messages[messages.length - 1].parts[0].text
144
+ }
141
145
  },
142
146
  };
143
147
  },
@@ -25,7 +25,7 @@ To migrate, replace all calls to `mastra.getAgents()` with `mastra.listAgents()`
25
25
  You can use Mastra's codemod CLI to update your code automatically:
26
26
 
27
27
  ```shell
28
- npx @mastra/codemod@beta v1/agent-get-agents .
28
+ npx @mastra/codemod@beta v1/mastra-plural-apis .
29
29
  ```
30
30
 
31
31
  :::
@@ -177,6 +177,16 @@ To migrate, move `abortSignal` from `modelSettings` to the top level.
177
177
  });
178
178
  ```
179
179
 
180
+ :::tip[Codemod]
181
+
182
+ You can use Mastra's codemod CLI to update your code automatically:
183
+
184
+ ```shell
185
+ npx @mastra/codemod@beta v1/agent-abort-signal .
186
+ ```
187
+
188
+ :::
189
+
180
190
  ### `output` to `structuredOutput.schema`
181
191
 
182
192
  The deprecated `output` and `experimental_output` options have been removed. This change consolidates on a single, stable API for structured output.
@@ -28,6 +28,16 @@ To migrate, update type imports to use the new naming pattern.
28
28
  + } from '@mastra/client-js';
29
29
  ```
30
30
 
31
+ :::tip[Codemod]
32
+
33
+ You can use Mastra's codemod CLI to update your code automatically:
34
+
35
+ ```shell
36
+ npx @mastra/codemod@beta v1/client-sdk-types .
37
+ ```
38
+
39
+ :::
40
+
31
41
  ### Pagination parameters from `offset/limit` to `page/perPage`
32
42
 
33
43
  All client SDK methods that used `offset/limit` now use `page/perPage`. This change provides a more intuitive pagination model aligned with web pagination patterns.
@@ -44,6 +54,16 @@ To migrate, update pagination parameters in all client SDK method calls. Example
44
54
  });
45
55
  ```
46
56
 
57
+ :::tip[Codemod]
58
+
59
+ You can use Mastra's codemod CLI to update your code automatically:
60
+
61
+ ```shell
62
+ npx @mastra/codemod@beta v1/client-offset-limit .
63
+ ```
64
+
65
+ :::
66
+
47
67
  ### `getMemoryThread` parameter structure
48
68
 
49
69
  The `getMemoryThread` method parameter structure has been updated. This change provides a more consistent API across memory methods.
@@ -51,10 +71,20 @@ The `getMemoryThread` method parameter structure has been updated. This change p
51
71
  To migrate, update the method call with the new parameter structure. Check the updated API documentation for the specific changes.
52
72
 
53
73
  ```diff
54
- - const thread = await client.memory.getMemoryThread(threadId, agentId);
55
- + const thread = await client.memory.getMemoryThread({ threadId, agentId });
74
+ - const thread = await client.getMemoryThread(threadId, agentId);
75
+ + const thread = await client.getMemoryThread({ threadId, agentId });
56
76
  ```
57
77
 
78
+ :::tip[Codemod]
79
+
80
+ You can use Mastra's codemod CLI to update your code automatically:
81
+
82
+ ```shell
83
+ npx @mastra/codemod@beta v1/client-get-memory-thread .
84
+ ```
85
+
86
+ :::
87
+
58
88
  ## Removed
59
89
 
60
90
  ### `toAISdkFormat` function
@@ -70,6 +100,16 @@ To migrate, use `toAISdkStream()` instead.
70
100
  + const stream = toAISdkStream(agentStream, { from: 'agent' });
71
101
  ```
72
102
 
103
+ :::tip[Codemod]
104
+
105
+ You can use Mastra's codemod CLI to update your code automatically:
106
+
107
+ ```shell
108
+ npx @mastra/codemod@beta v1/client-to-ai-sdk-format .
109
+ ```
110
+
111
+ :::
112
+
73
113
  ### Network memory methods
74
114
 
75
115
  Network memory methods have been removed from `@mastra/client-js`. The `NetworkMemoryThread` class and all network memory-related methods are no longer available. This change simplifies the memory API by removing specialized network memory functionality.
@@ -25,7 +25,7 @@ To migrate, replace all calls to `getScorers()` with `listScorers()`.
25
25
  You can use Mastra's codemod CLI to update your code automatically:
26
26
 
27
27
  ```shell
28
- npx @mastra/codemod@beta v1/evals-get-scorers .
28
+ npx @mastra/codemod@beta v1/mastra-plural-apis .
29
29
  ```
30
30
 
31
31
  :::
@@ -50,6 +50,16 @@ To migrate, update function calls from `runExperiment` to `runEvals`.
50
50
  + const result = await runEvals({ target: myAgent, scorers: [scorer], data: inputs });
51
51
  ```
52
52
 
53
+ :::tip[Codemod]
54
+
55
+ You can use Mastra's codemod CLI to update your code automatically:
56
+
57
+ ```shell
58
+ npx @mastra/codemod@beta v1/evals-run-experiment .
59
+ ```
60
+
61
+ :::
62
+
53
63
  ### `getScorerByName` to `getScorerById`
54
64
 
55
65
  The `getScorerByName()` method has been renamed to `getScorerById()`. Scorers now require an `id` field instead of `name`. This change aligns with the broader API pattern of using `id` for entity identification.
@@ -67,6 +77,16 @@ To migrate, update method calls and scorer configuration to use `id` instead of
67
77
  + const scorer = mastra.getScorerById('helpfulness-scorer');
68
78
  ```
69
79
 
80
+ :::tip[Codemod]
81
+
82
+ You can use Mastra's codemod CLI to update your code automatically:
83
+
84
+ ```shell
85
+ npx @mastra/codemod@beta v1/evals-scorer-by-name .
86
+ ```
87
+
88
+ :::
89
+
70
90
  ### Scorer configuration from `name` to `id`
71
91
 
72
92
  Scorers now require an `id` field instead of `name`. The `name` field is now optional. This change provides consistency with other Mastra entities.
@@ -120,6 +140,16 @@ To migrate, update import statements to use the new `scorers/prebuilt` path.
120
140
  + import { createCompletenessScorer } from '@mastra/evals/scorers/prebuilt';
121
141
  ```
122
142
 
143
+ :::tip[Codemod]
144
+
145
+ You can use Mastra's codemod CLI to update your code automatically:
146
+
147
+ ```shell
148
+ npx @mastra/codemod@beta v1/evals-prebuilt-imports .
149
+ ```
150
+
151
+ :::
152
+
123
153
  ### Scorer message types from `UIMessage` to `MastraDBMessage`
124
154
 
125
155
  Scorer input and output types now use `MastraDBMessage[]` instead of `UIMessage`. This change aligns scorers with the database-persisted message format for consistency across the framework.
@@ -60,9 +60,9 @@ npx @mastra/codemod@beta v1/experimental-auth .
60
60
 
61
61
  ### Required `id` parameter for all mastra primitives
62
62
 
63
- All storage, vector stores, agents, workflows, mcpServers, processors, scorers, tools now require an `id` parameter during initialization. This enables the standardized Mastra API and prevents ID conflicts.
63
+ All storages, vector stores, agents, workflows, mcpServers, processors, scorers, and tools now require an `id` parameter during initialization. This enables the standardized Mastra API and prevents ID conflicts.
64
64
 
65
- All these primitives also now have a `get`, `list`, and `add` functions.
65
+ All these primitives also now have `get`, `list`, and `add` functions.
66
66
 
67
67
  To migrate, add an `id` parameter to all storage and vector store instantiations. When using the same storage/vector class multiple times, ensure each instance has a unique ID.
68
68
 
@@ -105,11 +105,35 @@ When using separate instances for different purposes, use descriptive unique IDs
105
105
 
106
106
  ### Primitive plural APIs changes from `get<primitives>` to `list<primitive>`
107
107
 
108
+ `get*` functions that returned all instances of a primitive have been renamed to `list*` to better reflect their purpose.
109
+
108
110
  ```diff
111
+ - const agents = mastra.getAgents();
112
+ + const agents = mastra.listAgents();
113
+ - const vectors = mastra.getVectors();
114
+ + const vectors = mastra.listVectors();
115
+ - const workflows = mastra.getWorkflows();
116
+ + const workflows = mastra.listWorkflows();
117
+ - const scorers = mastra.getScorers();
118
+ + const scorers = mastra.listScorers();
109
119
  - const mcpServers = mastra.getMCPServers();
110
120
  + const mcpServers = mastra.listMCPServers();
121
+ - const logsByRunId = await mastra.getLogsByRunId({ runId: 'id', transportId: 'id' });
122
+ + const logsByRunId = await mastra.listLogsByRunId({ runId: 'id', transportId: 'id' });
123
+ - const logs = await mastra.getLogs('transportId');
124
+ + const logs = await mastra.listLogs('transportId');
125
+ ```
126
+
127
+ :::tip[Codemod]
128
+
129
+ You can use Mastra's codemod CLI to update your code automatically:
130
+
131
+ ```shell
132
+ npx @mastra/codemod@beta v1/mastra-plural-apis .
111
133
  ```
112
134
 
135
+ :::
136
+
113
137
  ### Each primtive has a `getById` and a `get` function
114
138
 
115
139
  ```typescript
@@ -25,7 +25,7 @@ To migrate, replace all calls to `mastra.getMCPServers()` with `mastra.listMCPSe
25
25
  You can use Mastra's codemod CLI to update your code automatically:
26
26
 
27
27
  ```shell
28
- npx @mastra/codemod@beta v1/mcp-get-mcp-servers .
28
+ npx @mastra/codemod@beta v1/mastra-plural-apis .
29
29
  ```
30
30
 
31
31
  :::
@@ -111,6 +111,16 @@ To migrate, rename `query()` to `recall()` and update code that expects the old
111
111
  + const messages = result.messages;
112
112
  ```
113
113
 
114
+ :::tip[Codemod]
115
+
116
+ You can use Mastra's codemod CLI to update your code automatically:
117
+
118
+ ```shell
119
+ npx @mastra/codemod@beta v1/memory-query-to-recall .
120
+ ```
121
+
122
+ :::
123
+
114
124
  ### `Memory.recall()` parameter changes
115
125
 
116
126
  The `Memory.recall()` method now uses `StorageListMessagesInput` format with pagination, and the `vectorMessageSearch` parameter has been renamed to `vectorSearchString`. These changes align the memory API with the storage pagination API and provide more consistent naming.
@@ -132,6 +142,16 @@ To migrate, update method name, query parameters, and the vector search paramete
132
142
  });
133
143
  ```
134
144
 
145
+ :::tip[Codemod]
146
+
147
+ You can use Mastra's codemod CLI to update your code automatically:
148
+
149
+ ```shell
150
+ npx @mastra/codemod@beta v1/memory-vector-search-param .
151
+ ```
152
+
153
+ :::
154
+
135
155
  ### `MastraMessageV2` type renamed to `MastraDBMessage`
136
156
 
137
157
  The `MastraMessageV2` type has been renamed to `MastraDBMessage` for clarity. This change better describes the purpose of this type as the database message format.
@@ -145,7 +165,15 @@ To migrate, replace all instances of `MastraMessageV2` with `MastraDBMessage`.
145
165
  + function yourCustomFunction(input: MastraDBMessage) {}
146
166
  ```
147
167
 
168
+ :::tip[Codemod]
169
+
170
+ You can use Mastra's codemod CLI to update your code automatically:
171
+
172
+ ```shell
173
+ npx @mastra/codemod@beta v1/memory-message-v2-type .
174
+ ```
148
175
 
176
+ :::
149
177
 
150
178
  ## Removed
151
179
 
@@ -19,7 +19,21 @@ Use your package manager to update your project's versions. Be sure to update **
19
19
 
20
20
  ### Update Node.js version
21
21
 
22
- Mastra v1 requires Node.js 22.13.0 or higher. Update your development and production environments accordingly.
22
+ Mastra v1 requires Node.js **22.13.0** or higher. Update your development and production environments accordingly.
23
+
24
+ ### Go through migration checklist
25
+
26
+ Work through the [migration checklist](#migration-checklist) below to update your codebase. Each item links to a detailed guide for that specific change.
27
+
28
+ :::info[Codemods]
29
+
30
+ We prepared automated [codemods](https://github.com/mastra-ai/mastra/tree/main/packages/codemod) for you. If you want, you can run all v1 codemods at once:
31
+
32
+ ```sh
33
+ npx @mastra/codemod@beta v1
34
+ ```
35
+
36
+ :::
23
37
 
24
38
  ## Breaking Changes by Area
25
39
 
@@ -41,7 +55,7 @@ Mastra v1 requires Node.js 22.13.0 or higher. Update your development and produc
41
55
 
42
56
  Work through this checklist in order, starting with high-impact changes that affect most applications.
43
57
 
44
- :::info[Codemod]
58
+ :::info[Codemods]
45
59
 
46
60
  We prepared automated [codemods](https://github.com/mastra-ai/mastra/tree/main/packages/codemod) for you. Throughout the migration guide you'll find instructions on how to use them for specific changes.
47
61
 
@@ -9,6 +9,26 @@ Storage APIs have been standardized with consistent pagination and naming patter
9
9
 
10
10
  ## Changed
11
11
 
12
+ ### Required `id` property for storage instances
13
+
14
+ Storage instances now require an `id` property. This unique identifier is used for tracking and managing storage instances within Mastra. The `id` should be a descriptive, unique string for each storage instance in your application.
15
+
16
+ To migrate, add an `id` field to your storage constructor.
17
+
18
+ ```diff
19
+ const storage = new PostgresStore({
20
+ + id: 'main-postgres-store',
21
+ connectionString: process.env.POSTGRES_CONNECTION_STRING,
22
+ schemaName: 'public',
23
+ });
24
+
25
+ const upstashStore = new UpstashStore({
26
+ + id: 'upstash-cache-store',
27
+ url: process.env.UPSTASH_REDIS_REST_URL,
28
+ token: process.env.UPSTASH_REDIS_REST_TOKEN,
29
+ });
30
+ ```
31
+
12
32
  ### Pagination from `offset/limit` to `page/perPage`
13
33
 
14
34
  All pagination APIs now use `page` and `perPage` instead of `offset` and `limit`. This change provides a more intuitive pagination model that aligns with common web pagination patterns.
@@ -50,6 +70,16 @@ To migrate, rename the method and update pagination parameters. You can now use
50
70
  + });
51
71
  ```
52
72
 
73
+ :::tip[Codemod]
74
+
75
+ You can use Mastra's codemod CLI to update your code automatically:
76
+
77
+ ```shell
78
+ npx @mastra/codemod@beta v1/storage-get-messages-paginated .
79
+ ```
80
+
81
+ :::
82
+
53
83
  ### `getThreadsByResourceId` to `listThreadsByResourceId`
54
84
 
55
85
  The `getThreadsByResourceId()` method has been renamed to `listThreadsByResourceId()`. This change aligns with the convention that `list*` methods return collections.
@@ -65,6 +95,16 @@ To migrate, rename the method call and update pagination parameters.
65
95
  });
66
96
  ```
67
97
 
98
+ :::tip[Codemod]
99
+
100
+ You can use Mastra's codemod CLI to update your code automatically:
101
+
102
+ ```shell
103
+ npx @mastra/codemod@beta v1/storage-get-threads-by-resource .
104
+ ```
105
+
106
+ :::
107
+
68
108
  ### `getWorkflowRuns` to `listWorkflowRuns`
69
109
 
70
110
  The `getWorkflowRuns()` method has been renamed to `listWorkflowRuns()`. This change aligns with the convention that `list*` methods return collections.
@@ -81,6 +121,16 @@ To migrate, rename the method call and update pagination parameters.
81
121
  });
82
122
  ```
83
123
 
124
+ :::tip[Codemod]
125
+
126
+ You can use Mastra's codemod CLI to update your code automatically:
127
+
128
+ ```shell
129
+ npx @mastra/codemod@beta v1/storage-list-workflow-runs .
130
+ ```
131
+
132
+ :::
133
+
84
134
  ### `getMessagesById` to `listMessagesById`
85
135
 
86
136
  The `getMessagesById()` method has been renamed to `listMessagesById()`. This change aligns with the convention that `list*` methods return collections.
@@ -94,6 +144,16 @@ To migrate, rename the method call.
94
144
  });
95
145
  ```
96
146
 
147
+ :::tip[Codemod]
148
+
149
+ You can use Mastra's codemod CLI to update your code automatically:
150
+
151
+ ```shell
152
+ npx @mastra/codemod@beta v1/storage-list-messages-by-id .
153
+ ```
154
+
155
+ :::
156
+
97
157
  ### Storage `getMessages` and `saveMessages` signatures
98
158
 
99
159
  The `getMessages()` and `saveMessages()` methods have changed signatures and return types. Format overloads have been removed, and the methods now always work with `MastraDBMessage`. This change simplifies the API by removing format variations.
@@ -169,6 +229,16 @@ To migrate, pass the connection string as an object property.
169
229
  + });
170
230
  ```
171
231
 
232
+ :::tip[Codemod]
233
+
234
+ You can use Mastra's codemod CLI to update your code automatically:
235
+
236
+ ```shell
237
+ npx @mastra/codemod@beta v1/vector-pg-constructor .
238
+ ```
239
+
240
+ :::
241
+
172
242
  ### PGVector `defineIndex` to `buildIndex`
173
243
 
174
244
  The `defineIndex()` method has been removed in favor of `buildIndex()`. This change provides clearer naming for the index building operation.
@@ -198,6 +268,16 @@ To migrate, rename the parameter.
198
268
  });
199
269
  ```
200
270
 
271
+ :::tip[Codemod]
272
+
273
+ You can use Mastra's codemod CLI to update your code automatically:
274
+
275
+ ```shell
276
+ npx @mastra/codemod@beta v1/storage-postgres-schema-name .
277
+ ```
278
+
279
+ :::
280
+
201
281
  ### Score storage methods to `listScoresBy*` pattern
202
282
 
203
283
  Score storage APIs have been renamed to follow the `listScoresBy*` pattern. This change provides consistency with the broader API naming conventions.
@@ -5,10 +5,34 @@ description: "Learn how to migrate vector-related changes when upgrading to v1."
5
5
 
6
6
  # Vectors
7
7
 
8
- Vector store methods have been renamed to follow consistent naming conventions.
8
+ Vector store constructors now require an `id` property, and vector store methods have been renamed to follow consistent naming conventions.
9
9
 
10
10
  ## Changed
11
11
 
12
+ ### Required `id` property for vector store instances
13
+
14
+ Vector store instances now require an `id` property. This unique identifier is used for tracking and managing vector store instances within Mastra. The `id` should be a descriptive, unique string for each vector store in your application.
15
+
16
+ To migrate, add an `id` field to your vector store constructor.
17
+
18
+ ```diff
19
+ const vectorStore = new PgVector({
20
+ + id: 'main-vector-store',
21
+ connectionString: process.env.POSTGRES_CONNECTION_STRING,
22
+ });
23
+
24
+ const chromaStore = new ChromaVector({
25
+ + id: 'chroma-embeddings',
26
+ url: process.env.CHROMA_URL,
27
+ });
28
+
29
+ const pineconeStore = new PineconeVector({
30
+ + id: 'pinecone-production',
31
+ apiKey: process.env.PINECONE_API_KEY,
32
+ environment: process.env.PINECONE_ENVIRONMENT,
33
+ });
34
+ ```
35
+
12
36
  ### `getVectors` to `listVectors`
13
37
 
14
38
  The `getVectors()` method has been renamed to `listVectors()`. This change aligns with the naming convention used across the API where plural getter methods use the `list` prefix.
@@ -25,7 +25,7 @@ To migrate, replace all calls to `mastra.getWorkflows()` with `mastra.listWorkfl
25
25
  You can use Mastra's codemod CLI to update your imports automatically:
26
26
 
27
27
  ```shell
28
- npx @mastra/codemod@beta v1/workflows-get-workflows .
28
+ npx @mastra/codemod@beta v1/mastra-plural-apis .
29
29
  ```
30
30
 
31
31
  :::
@@ -68,6 +68,16 @@ To migrate, rename method calls from `createRunAsync` to `createRun`.
68
68
  + await workflow.createRun({ input: { ... } });
69
69
  ```
70
70
 
71
+ :::tip[Codemod]
72
+
73
+ You can use Mastra's codemod CLI to update your code automatically:
74
+
75
+ ```shell
76
+ npx @mastra/codemod@beta v1/workflow-create-run-async .
77
+ ```
78
+
79
+ :::
80
+
71
81
  ### `runCount` to `retryCount` (deprecated)
72
82
 
73
83
  The `runCount` parameter has been deprecated in favor of `retryCount` in workflow step execution. This change provides clearer naming that better describes retry behavior. The old `runCount` still works but shows deprecation warnings.
@@ -83,6 +93,16 @@ To migrate, rename `runCount` to `retryCount` in step execution functions.
83
93
  });
84
94
  ```
85
95
 
96
+ :::tip[Codemod]
97
+
98
+ You can use Mastra's codemod CLI to update your code automatically:
99
+
100
+ ```shell
101
+ npx @mastra/codemod@beta v1/workflow-run-count .
102
+ ```
103
+
104
+ :::
105
+
86
106
  ### `getWorkflowRuns` to `listWorkflowRuns`
87
107
 
88
108
  The `getWorkflowRuns()` method has been renamed to `listWorkflowRuns()`. This change aligns with the convention that `list*` methods return collections.
@@ -94,6 +114,16 @@ To migrate, rename method calls from `getWorkflowRuns` to `listWorkflowRuns`.
94
114
  + const runs = await workflow.listWorkflowRuns({ fromDate, toDate });
95
115
  ```
96
116
 
117
+ :::tip[Codemod]
118
+
119
+ You can use Mastra's codemod CLI to update your code automatically:
120
+
121
+ ```shell
122
+ npx @mastra/codemod@beta v1/workflow-list-runs .
123
+ ```
124
+
125
+ :::
126
+
97
127
  ## Removed
98
128
 
99
129
  ### Legacy workflows export
@@ -69,7 +69,7 @@ All memory types are [resource-scoped](./working-memory#resource-scoped-memory-d
69
69
 
70
70
  To persist and recall information between conversations, memory requires a storage adapter.
71
71
 
72
- Supported options include [LibSQL](/docs/v1/memory/storage/memory-with-libsql), [MongoDB](/examples/v1/memory/memory-with-mongodb), [Postgres](/docs/v1/memory/storage/memory-with-pg), and [Upstash](/docs/v1/memory/storage/memory-with-upstash)
72
+ Supported options include [LibSQL](/docs/v1/memory/storage/memory-with-libsql), [MongoDB](/docs/v1/memory/storage/memory-with-mongodb), [Postgres](/docs/v1/memory/storage/memory-with-pg), and [Upstash](/docs/v1/memory/storage/memory-with-upstash)
73
73
 
74
74
  We use LibSQL out of the box because it is file-based or in-memory, so it is easy to install and works well with Studio.
75
75
 
@@ -94,7 +94,7 @@ const agent = new Agent({
94
94
  **Storage/vector code Examples**:
95
95
 
96
96
  - [LibSQL](/docs/v1/memory/storage/memory-with-libsql)
97
- - [MongoDB](/examples/v1/memory/memory-with-mongodb)
97
+ - [MongoDB](/docs/v1/memory/storage/memory-with-mongodb)
98
98
  - [Postgres](/docs/v1/memory/storage/memory-with-pg)
99
99
  - [Upstash](/docs/v1/memory/storage/memory-with-upstash)
100
100
 
@@ -0,0 +1,152 @@
1
+ ---
2
+ title: "Example: Memory with MongoDB | Memory | Mastra Docs"
3
+ description: Example for how to use Mastra's memory system with MongoDB storage and vector capabilities.
4
+ ---
5
+
6
+ # Memory with MongoDB
7
+
8
+ This example demonstrates how to use Mastra's memory system with MongoDB as the storage backend.
9
+
10
+ ## Prerequisites
11
+
12
+ This example uses the `openai` model and requires a MongoDB database. Make sure to add the following to your `.env` file:
13
+
14
+ ```bash title=".env" copy
15
+ OPENAI_API_KEY=<your-api-key>
16
+ MONGODB_URI=<your-connection-string>
17
+ MONGODB_DB_NAME=<your-db-name>
18
+ ```
19
+
20
+ And install the following package:
21
+
22
+ ```bash copy
23
+ npm install @mastra/mongodb@beta
24
+ ```
25
+
26
+ ## Adding memory to an agent
27
+
28
+ To add MongoDB memory to an agent use the `Memory` class and create a new `storage` key using `MongoDBStore`. The configuration supports both local and remote MongoDB instances.
29
+
30
+ ```typescript title="src/mastra/agents/example-mongodb-agent.ts" showLineNumbers copy
31
+ import { Memory } from "@mastra/memory";
32
+ import { Agent } from "@mastra/core/agent";
33
+ import { openai } from "@ai-sdk/openai";
34
+ import { MongoDBStore } from "@mastra/mongodb";
35
+
36
+ export const mongodbAgent = new Agent({
37
+ id: "mongodb-agent",
38
+ name: "mongodb-agent",
39
+ instructions:
40
+ "You are an AI agent with the ability to automatically recall memories from previous interactions.",
41
+ model: openai("gpt-4o"),
42
+ memory: new Memory({
43
+ storage: new MongoDBStore({
44
+ url: process.env.MONGODB_URI!,
45
+ dbName: process.env.MONGODB_DB_NAME!,
46
+ }),
47
+ options: {
48
+ threads: {
49
+ generateTitle: true,
50
+ },
51
+ },
52
+ }),
53
+ });
54
+ ```
55
+
56
+ ## Vector embeddings with MongoDB
57
+
58
+ Embeddings are numeric vectors used by memory's `semanticRecall` to retrieve related messages by meaning (not keywords).
59
+
60
+ > Note: You must use a deployment hosted on MongoDB Atlas to successfully use the MongoDB Vector database.
61
+
62
+ This setup uses FastEmbed, a local embedding model, to generate vector embeddings.
63
+ To use this, install `@mastra/fastembed`:
64
+
65
+ ```bash copy
66
+ npm install @mastra/fastembed@beta
67
+ ```
68
+
69
+ Add the following to your agent:
70
+
71
+ ```typescript title="src/mastra/agents/example-mongodb-agent.ts" showLineNumbers copy
72
+ import { Memory } from "@mastra/memory";
73
+ import { Agent } from "@mastra/core/agent";
74
+ import { openai } from "@ai-sdk/openai";
75
+ import { MongoDBStore, MongoDBVector } from "@mastra/mongodb";
76
+ import { fastembed } from "@mastra/fastembed";
77
+
78
+ export const mongodbAgent = new Agent({
79
+ id: "mongodb-agent",
80
+ name: "mongodb-agent",
81
+ instructions:
82
+ "You are an AI agent with the ability to automatically recall memories from previous interactions.",
83
+ model: openai("gpt-4o"),
84
+ memory: new Memory({
85
+ storage: new MongoDBStore({
86
+ url: process.env.MONGODB_URI!,
87
+ dbName: process.env.MONGODB_DB_NAME!,
88
+ }),
89
+ vector: new MongoDBVector({
90
+ uri: process.env.MONGODB_URI!,
91
+ dbName: process.env.MONGODB_DB_NAME!,
92
+ }),
93
+ embedder: fastembed,
94
+ options: {
95
+ lastMessages: 10,
96
+ semanticRecall: {
97
+ topK: 3,
98
+ messageRange: 2,
99
+ },
100
+ threads: {
101
+ generateTitle: true, // generates descriptive thread titles automatically
102
+ },
103
+ },
104
+ }),
105
+ });
106
+ ```
107
+
108
+ ## Usage example
109
+
110
+ Use `memoryOptions` to scope recall for this request. Set `lastMessages: 5` to limit recency-based recall, and use `semanticRecall` to fetch the `topK: 3` most relevant messages, including `messageRange: 2` neighboring messages for context around each match.
111
+
112
+ ```typescript title="src/test-mongodb-agent.ts" showLineNumbers copy
113
+ import "dotenv/config";
114
+
115
+ import { mastra } from "./mastra";
116
+
117
+ const threadId = "123";
118
+ const resourceId = "user-456";
119
+
120
+ const agent = mastra.getAgent("mongodbAgent");
121
+
122
+ const message = await agent.stream("My name is Mastra", {
123
+ memory: {
124
+ thread: threadId,
125
+ resource: resourceId,
126
+ },
127
+ });
128
+
129
+ await message.textStream.pipeTo(new WritableStream());
130
+
131
+ const stream = await agent.stream("What's my name?", {
132
+ memory: {
133
+ thread: threadId,
134
+ resource: resourceId,
135
+ },
136
+ memoryOptions: {
137
+ lastMessages: 5,
138
+ semanticRecall: {
139
+ topK: 3,
140
+ messageRange: 2,
141
+ },
142
+ },
143
+ });
144
+
145
+ for await (const chunk of stream.textStream) {
146
+ process.stdout.write(chunk);
147
+ }
148
+ ```
149
+
150
+ ## Related
151
+
152
+ - [Calling Agents](/docs/v1/agents/overview)
@@ -186,6 +186,55 @@ The description for this generated tool will be: "Ask agent `<agent.name>` a que
186
186
 
187
187
  This allows you to quickly expose the generative capabilities of your agents through the MCP, enabling clients to "ask" your agents questions directly.
188
188
 
189
+ ### Accessing MCP Context in Tools
190
+
191
+ Tools exposed through `MCPServer` can access MCP request context (authentication, session IDs, etc.) via two different properties depending on how the tool is invoked:
192
+
193
+ | Call Pattern | Access Method |
194
+ |-------------|---------------|
195
+ | Direct tool call | `context?.mcp?.extra` |
196
+ | Agent tool call | `context?.requestContext?.get("mcp.extra")` |
197
+
198
+ **Universal pattern** (works in both contexts):
199
+ ```typescript
200
+ const mcpExtra = context?.mcp?.extra ?? context?.requestContext?.get("mcp.extra");
201
+ const authInfo = mcpExtra?.authInfo;
202
+ ```
203
+
204
+ #### Example: Tool that works in both contexts
205
+
206
+ ```typescript
207
+ import { createTool } from "@mastra/core/tools";
208
+ import { z } from "zod";
209
+
210
+ const fetchUserData = createTool({
211
+ id: "fetchUserData",
212
+ description: "Fetches user data using authentication from MCP context",
213
+ inputSchema: z.object({
214
+ userId: z.string().describe("The ID of the user to fetch"),
215
+ }),
216
+ execute: async (inputData, context) => {
217
+ // Access MCP authentication context
218
+ // When called directly via MCP: context.mcp.extra
219
+ // When called via agent: context.requestContext.get('mcp.extra')
220
+ const mcpExtra = context?.mcp?.extra || context?.requestContext?.get("mcp.extra");
221
+ const authInfo = mcpExtra?.authInfo;
222
+
223
+ if (!authInfo?.token) {
224
+ throw new Error("Authentication required");
225
+ }
226
+
227
+ const response = await fetch(`https://api.example.com/users/${inputData.userId}`, {
228
+ headers: {
229
+ Authorization: `Bearer ${authInfo.token}`,
230
+ },
231
+ });
232
+
233
+ return response.json();
234
+ },
235
+ });
236
+ ```
237
+
189
238
  ## Methods
190
239
 
191
240
  These are the functions you can call on an `MCPServer` instance to control its behavior and get information.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 1.0.0-beta.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Clean up mcp docs server migration tool to have a better prompt. ([#9930](https://github.com/mastra-ai/mastra/pull/9930))
8
+
9
+ - Updated dependencies [[`d70e742`](https://github.com/mastra-ai/mastra/commit/d70e74243401d070e167e3bc19c329c1d98d8a5b), [`465ac05`](https://github.com/mastra-ai/mastra/commit/465ac0526a91d175542091c675181f1a96c98c46)]:
10
+ - @mastra/mcp@1.0.0-beta.1
11
+ - @mastra/core@1.0.0-beta.2
12
+
3
13
  ## 1.0.0-beta.1
4
14
 
5
15
  ### Patch Changes
package/dist/stdio.js CHANGED
@@ -112,7 +112,7 @@ var migrationPrompts = [
112
112
  arguments: [
113
113
  {
114
114
  name: "area",
115
- description: "Optional: Focus on a specific area (agents, tools, workflows, memory, evals, mcp, vectors, syncs). If not provided, gives an overview of all changes.",
115
+ description: "Optional: Focus on a specific area (e.g., agent, tools, workflows, memory, storage, voice). The tool will check if a migration guide exists for this area and suggest alternatives if not found. If not provided, gives an overview of all changes.",
116
116
  required: false
117
117
  }
118
118
  ]
@@ -141,24 +141,20 @@ var migrationPromptMessages = {
141
141
  };
142
142
  function getUpgradeToV1Messages(area) {
143
143
  if (area) {
144
- const validAreas = ["agents", "tools", "workflows", "memory", "evals", "mcp", "vectors", "syncs"];
145
- if (!validAreas.includes(area.toLowerCase())) {
146
- return [
147
- {
148
- role: "user",
149
- content: {
150
- type: "text",
151
- text: `Invalid area: ${area}. Valid areas are: ${validAreas.join(", ")}`
152
- }
153
- }
154
- ];
155
- }
156
144
  return [
157
145
  {
158
146
  role: "user",
159
147
  content: {
160
148
  type: "text",
161
- text: `I need help migrating my Mastra ${area} code from v0.x to v1.0. Use the mastraMigration tool to get the specific migration guide for "${area}" and walk me through the changes step by step.`
149
+ text: `I need help migrating my Mastra ${area} code from v0.x to v1.0. Use the mastraMigration tool to:
150
+
151
+ 1. First, try to get the specific migration guide for "${area}" using path: "upgrade-to-v1/${area}"
152
+ 2. If that doesn't exist, try the alternate form (singular/plural):
153
+ - If "${area}" ends with 's', try without the 's' (e.g., "agents" \u2192 "agent")
154
+ - If "${area}" doesn't end with 's', try adding 's' (e.g., "agent" \u2192 "agents")
155
+ 3. If the guide exists, walk me through the changes step by step
156
+ 4. If neither form exists, list available migration guides in "upgrade-to-v1/" and suggest which ones might be relevant to "${area}"
157
+ 5. After you find the guide, collect all the codemod calls to run to codemods. These callouts are marked with ":::tip[Codemod]" in the docs. Run the codemods with "npx @mastra/codemod@beta <codemod-name> <path>" to automate all those changes. Afterwards, help me with any remaining manual changes needed.`
162
158
  }
163
159
  }
164
160
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "1.0.0-beta.1",
3
+ "version": "1.0.0-beta.2",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -33,8 +33,8 @@
33
33
  "uuid": "^11.1.0",
34
34
  "zod": "^3.25.76",
35
35
  "zod-to-json-schema": "^3.24.6",
36
- "@mastra/core": "1.0.0-beta.1",
37
- "@mastra/mcp": "^1.0.0-beta.0"
36
+ "@mastra/core": "1.0.0-beta.2",
37
+ "@mastra/mcp": "^1.0.0-beta.1"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@hono/node-server": "^1.19.6",
@@ -50,7 +50,7 @@
50
50
  "typescript": "^5.8.3",
51
51
  "vitest": "^3.2.4",
52
52
  "@internal/lint": "0.0.53",
53
- "@mastra/core": "1.0.0-beta.1"
53
+ "@mastra/core": "1.0.0-beta.2"
54
54
  },
55
55
  "homepage": "https://mastra.ai",
56
56
  "repository": {