@mastra/mcp-docs-server 0.13.2 → 0.13.3-alpha.0

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 (114) hide show
  1. package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +33 -0
  2. package/.docs/organized/changelogs/%40mastra%2Fagui.md +48 -0
  3. package/.docs/organized/changelogs/%40mastra%2Fastra.md +30 -30
  4. package/.docs/organized/changelogs/%40mastra%2Fchroma.md +30 -30
  5. package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +33 -33
  6. package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +85 -85
  7. package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +34 -34
  8. package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +35 -35
  9. package/.docs/organized/changelogs/%40mastra%2Fcore.md +70 -70
  10. package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +29 -29
  11. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +92 -92
  12. package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +94 -94
  13. package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +92 -92
  14. package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +104 -104
  15. package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +35 -35
  16. package/.docs/organized/changelogs/%40mastra%2Fevals.md +26 -26
  17. package/.docs/organized/changelogs/%40mastra%2Ffirecrawl.md +29 -29
  18. package/.docs/organized/changelogs/%40mastra%2Fgithub.md +26 -26
  19. package/.docs/organized/changelogs/%40mastra%2Flance.md +32 -0
  20. package/.docs/organized/changelogs/%40mastra%2Flibsql.md +35 -35
  21. package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +59 -59
  22. package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +29 -29
  23. package/.docs/organized/changelogs/%40mastra%2Fmcp.md +31 -31
  24. package/.docs/organized/changelogs/%40mastra%2Fmem0.md +26 -26
  25. package/.docs/organized/changelogs/%40mastra%2Fmemory.md +56 -56
  26. package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +37 -37
  27. package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +30 -17
  28. package/.docs/organized/changelogs/%40mastra%2Fpg.md +57 -57
  29. package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +29 -29
  30. package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +108 -108
  31. package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +29 -29
  32. package/.docs/organized/changelogs/%40mastra%2Frag.md +27 -27
  33. package/.docs/organized/changelogs/%40mastra%2Fragie.md +26 -26
  34. package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +7 -0
  35. package/.docs/organized/changelogs/%40mastra%2Fserver.md +82 -82
  36. package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +29 -29
  37. package/.docs/organized/changelogs/%40mastra%2Fupstash.md +33 -33
  38. package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +31 -31
  39. package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +28 -28
  40. package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +26 -26
  41. package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +26 -26
  42. package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +25 -0
  43. package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +26 -26
  44. package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +26 -26
  45. package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +23 -23
  46. package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +26 -26
  47. package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +26 -26
  48. package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +26 -26
  49. package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +26 -26
  50. package/.docs/organized/changelogs/create-mastra.md +37 -37
  51. package/.docs/organized/changelogs/mastra.md +115 -115
  52. package/.docs/organized/code-examples/a2a.md +1 -30
  53. package/.docs/organized/code-examples/agent-network.md +26 -115
  54. package/.docs/organized/code-examples/agent.md +1 -29
  55. package/.docs/organized/code-examples/agui.md +0 -22
  56. package/.docs/organized/code-examples/ai-sdk-useChat.md +1 -16
  57. package/.docs/organized/code-examples/assistant-ui.md +1 -16
  58. package/.docs/organized/code-examples/bird-checker-with-express.md +1 -19
  59. package/.docs/organized/code-examples/bird-checker-with-nextjs-and-eval.md +1 -20
  60. package/.docs/organized/code-examples/bird-checker-with-nextjs.md +1 -18
  61. package/.docs/organized/code-examples/client-side-tools.md +1 -18
  62. package/.docs/organized/code-examples/crypto-chatbot.md +4 -25
  63. package/.docs/organized/code-examples/experimental-auth-weather-agent.md +1 -26
  64. package/.docs/organized/code-examples/fireworks-r1.md +1 -21
  65. package/.docs/organized/code-examples/mcp-configuration.md +1 -24
  66. package/.docs/organized/code-examples/mcp-registry-registry.md +1 -22
  67. package/.docs/organized/code-examples/memory-per-resource-example.md +0 -14
  68. package/.docs/organized/code-examples/memory-todo-agent.md +1 -20
  69. package/.docs/organized/code-examples/memory-with-context.md +1 -20
  70. package/.docs/organized/code-examples/memory-with-libsql.md +1 -21
  71. package/.docs/organized/code-examples/memory-with-mem0.md +1 -21
  72. package/.docs/organized/code-examples/memory-with-pg.md +1 -22
  73. package/.docs/organized/code-examples/memory-with-processors.md +1 -17
  74. package/.docs/organized/code-examples/memory-with-upstash.md +1 -24
  75. package/.docs/organized/code-examples/openapi-spec-writer.md +1 -21
  76. package/.docs/organized/code-examples/quick-start.md +1 -21
  77. package/.docs/organized/code-examples/stock-price-tool.md +1 -21
  78. package/.docs/organized/code-examples/weather-agent.md +1 -20
  79. package/.docs/organized/code-examples/workflow-ai-recruiter.md +1 -22
  80. package/.docs/organized/code-examples/workflow-with-inline-steps.md +1 -20
  81. package/.docs/organized/code-examples/workflow-with-memory.md +1 -21
  82. package/.docs/organized/code-examples/workflow-with-separate-steps.md +1 -22
  83. package/.docs/raw/course/01-first-agent/11-creating-transactions-tool.md +1 -1
  84. package/.docs/raw/course/03-agent-memory/24-working-memory-in-practice.md +0 -3
  85. package/.docs/raw/course/03-agent-memory/29-memory-best-practices.md +0 -6
  86. package/.docs/raw/deployment/cloud-providers/amazon-ec2.mdx +81 -0
  87. package/.docs/raw/deployment/cloud-providers/azure-app-services.mdx +136 -0
  88. package/.docs/raw/deployment/cloud-providers/index.mdx +2 -0
  89. package/.docs/raw/deployment/serverless-platforms/cloudflare-deployer.mdx +111 -0
  90. package/.docs/raw/deployment/{deployment.mdx → serverless-platforms/index.mdx} +5 -10
  91. package/.docs/raw/deployment/serverless-platforms/netlify-deployer.mdx +94 -0
  92. package/.docs/raw/deployment/serverless-platforms/vercel-deployer.mdx +91 -0
  93. package/.docs/raw/frameworks/ai-sdk-v5.mdx +91 -0
  94. package/.docs/raw/frameworks/web-frameworks/next-js.mdx +56 -18
  95. package/.docs/raw/frameworks/web-frameworks/sveltekit.mdx +456 -0
  96. package/.docs/raw/frameworks/web-frameworks/vite-react.mdx +28 -9
  97. package/.docs/raw/getting-started/model-providers.mdx +118 -127
  98. package/.docs/raw/memory/overview.mdx +30 -0
  99. package/.docs/raw/reference/agents/generate.mdx +3 -3
  100. package/.docs/raw/reference/agents/getModel.mdx +1 -1
  101. package/.docs/raw/reference/agents/stream.mdx +3 -3
  102. package/.docs/raw/reference/deployer/cloudflare.mdx +4 -119
  103. package/.docs/raw/reference/deployer/netlify.mdx +4 -83
  104. package/.docs/raw/reference/deployer/vercel.mdx +4 -51
  105. package/.docs/raw/reference/memory/Memory.mdx +71 -2
  106. package/.docs/raw/reference/observability/logger.mdx +70 -0
  107. package/.docs/raw/reference/rag/pg.mdx +15 -0
  108. package/.docs/raw/reference/storage/postgresql.mdx +17 -0
  109. package/.docs/raw/reference/workflows/step.mdx +8 -1
  110. package/.docs/raw/workflows/overview.mdx +1 -1
  111. package/dist/{chunk-P5AHYMUI.js → chunk-7QXT2IEP.js} +48 -11
  112. package/dist/prepare-docs/prepare.js +1 -1
  113. package/dist/stdio.js +1 -1
  114. package/package.json +5 -5
@@ -0,0 +1,91 @@
1
+ ---
2
+ title: "Vercel Deployer"
3
+ description: "Learn how to deploy a Mastra application to Vercel using the Mastra VercelDeployer"
4
+ ---
5
+
6
+ import { FileTree } from "nextra/components";
7
+
8
+ # VercelDeployer
9
+
10
+ The `VercelDeployer` class handles deployment of standalone Mastra applications to Vercel. It manages configuration, deployment, and extends the base [Deployer](/reference/deployer/deployer) class with Vercel specific functionality.
11
+
12
+ ## Installation
13
+
14
+ ```bash copy
15
+ npm install @mastra/deployer-vercel@latest
16
+ ```
17
+
18
+ ## Usage example
19
+
20
+ ```typescript filename="src/mastra/index.ts" showLineNumbers copy
21
+ import { Mastra } from "@mastra/core/mastra";
22
+ import { VercelDeployer } from "@mastra/deployer-vercel";
23
+
24
+ export const mastra = new Mastra({
25
+ // ...
26
+ deployer: new VercelDeployer()
27
+ });
28
+ ```
29
+
30
+ > See the [VercelDeployer](/reference/deployer/vercel) API reference for all available configuration options.
31
+
32
+ ## Continuous integration
33
+
34
+ After connecting your Mastra project’s Git repository to Vercel, update the project settings. In the Vercel dashboard, go to **Settings** > **Build and Deployment**, and under **Framework settings**, set the following:
35
+
36
+ - **Build command**: `npm run build` (optional)
37
+
38
+ ### Environment variables
39
+
40
+ Before your first deployment, make sure to add any environment variables used by your application. For example, if you're using OpenAI as the LLM, you'll need to set `OPENAI_API_KEY` in your Vercel project settings.
41
+
42
+ > See [Environment variables](https://vercel.com/docs/environment-variables) for more details.
43
+
44
+ Your project is now configured with automatic deployments which occur whenever you push to the configured branch of your GitHub repository.
45
+
46
+ ## Manual deployment
47
+
48
+ Manual deployments are also possible using the [Vercel CLI](https://vercel.com/docs/cli). With the Vercel CLI installed run the following from your project root to deploy your application.
49
+
50
+ ```bash copy
51
+ npm run build && vercel --prod --prebuilt --archive=tgz
52
+ ```
53
+
54
+ > You can also run `vercel dev` from your project root to test your Mastra application locally.
55
+
56
+ ## Build output
57
+
58
+ The build output for Mastra applications using the `VercelDeployer` includes all agents, tools, and workflows in your project, along with Mastra specific files required to run your application on Vercel.
59
+
60
+ <FileTree>
61
+ <FileTree.Folder name=".vercel" defaultOpen>
62
+ <FileTree.Folder name="output" defaultOpen>
63
+ <FileTree.Folder name="functions" defaultOpen>
64
+ <FileTree.Folder name="index.func" defaultOpen>
65
+ <FileTree.File name="index.mjs" />
66
+ </FileTree.Folder>
67
+ </FileTree.Folder>
68
+ <FileTree.File name="config.json" />
69
+ </FileTree.Folder>
70
+ </FileTree.Folder>
71
+ <FileTree.File name="package.json" />
72
+ </FileTree>
73
+
74
+
75
+ The `VercelDeployer` automatically generates a `config.json` configuration file in `.vercel/output` with the following settings:
76
+
77
+ ```json
78
+ {
79
+ "version": 3,
80
+ "routes": [
81
+ {
82
+ "src": "/(.*)",
83
+ "dest": "/"
84
+ }
85
+ ]
86
+ }
87
+ ```
88
+
89
+ ## Next steps
90
+
91
+ - [Mastra Client SDK](/docs/client-js/overview)
@@ -0,0 +1,91 @@
1
+ # AI SDK v5 (beta) Migration Guide
2
+
3
+ This guide covers Mastra-specific considerations when migrating from AI SDK v4 to v5 beta.
4
+
5
+ Please add any feedback or bug reports to the [AI SDK v5 mega issue in Github.](https://github.com/mastra-ai/mastra/issues/5470)
6
+
7
+ ## Official Migration Guide
8
+
9
+ **Follow the official [AI SDK v5 Migration Guide](https://v5.ai-sdk.dev/docs/migration-guides/migration-guide-5-0)** for all AI SDK core breaking changes, package updates, and API changes.
10
+
11
+ This guide covers only the Mastra-specific aspects of the migration.
12
+
13
+ ## Warnings
14
+
15
+ - **Data compatibility**: New data stored in v5 format will no longer work if you downgrade from the beta
16
+ - **Backup recommendation**: Keep DB backups from before you upgrade to v5 beta
17
+ - **Production use**: Wait for the AI SDK v5 stable release before using in production applications
18
+ - **Prerelease status**: The Mastra `ai-v5` tag is a prerelease version and may have bugs
19
+
20
+ ## Memory Storage
21
+
22
+ Your existing AI SDK v4 data will run through our internal `MessageList` class which handles converting to/from various message formats.
23
+ This includes converting from AI SDK v4->v5. This means you don't need to run any DB migrations and your data will be translated on the fly and will just work when you upgrade.
24
+
25
+
26
+ ## Migration Strategy
27
+
28
+ Migrating to AI SDK v5 with Mastra involves updating both your **backend** (Mastra server) and **frontend**.
29
+ We provide a compatibility mode to handle stream format conversion during the transition.
30
+
31
+ ### Backend Upgrade
32
+
33
+ Bump Mastra to the new `ai-v5` prerelease version for all Mastra packages:
34
+
35
+ ```bash npm2yarn copy
36
+ npm i mastra@ai-v5 @mastra/core@ai-v5 @mastra/memory@ai-v5 [etc]
37
+ ```
38
+
39
+ Then configure your Mastra instance with v4 compatibility so your existing frontend will continue to work:
40
+
41
+ ```typescript
42
+ import { Mastra } from '@mastra/core';
43
+
44
+ export const mastra = new Mastra({
45
+ agents: { myAgent },
46
+ aiSdkCompat: 'v4', // <- add this for compatibility
47
+ });
48
+ ```
49
+
50
+ #### Dependencies
51
+
52
+ You will need to upgrade all AI SDK dependencies to use the new v5 beta versions in your backend when you bump to the Mastra `ai-v5` prerelease tag.
53
+
54
+ In most cases this will only involve bumping your model provider packages. For example: `npm i @ai-sdk/openai@2.0.0-beta.1` - refer to the [AI SDK v5 documentation](https://v5.ai-sdk.dev/docs/migration-guides/migration-guide-5-0) for more info. Some model providers do not yet have V5 versions (Openrouter for example).
55
+
56
+ Also note that you need to bump all your Mastra dependencies to the new `ai-v5` tag, and you must upgrade `zod` to the latest version if you have it installed.
57
+
58
+ #### Using Stream Compatibility Manually
59
+
60
+ If you have a frontend that calls Mastra agents in an endpoint, you can wrap the new `response.toUIMessageStreamResponse()` manually.
61
+
62
+ ```ts
63
+ import { mastra } from "@/src/mastra";
64
+ import { createV4CompatibleResponse } from "@mastra/core/agent";
65
+
66
+ const myAgent = mastra.getAgent("weatherAgent");
67
+ export async function POST(req: Request) {
68
+ const { messages } = await req.json();
69
+ const stream = await myAgent.stream(messages);
70
+
71
+ return createV4CompatibleResponse(stream.toUIMessageStreamResponse().body!);
72
+ }
73
+ ```
74
+
75
+ ### Using Mastra Playground
76
+
77
+ Currently playground is still an AI SDK v4 frontend. For now you need to set `aiSdkCompat: 'v4'` for it to work.
78
+ We'll handle this automatically for you soon.
79
+
80
+ ### Frontend Upgrade
81
+
82
+ When you're ready, remove the compatibility flag and upgrade your frontend:
83
+
84
+ 1. Remove `aiSdkCompat: 'v4'` from your Mastra configuration
85
+ 2. Follow the AI SDK guide on upgrading your frontend dependencies
86
+ 3. Update your frontend code for v5 breaking changes
87
+
88
+ ## Discussion and Bug Reports
89
+
90
+ Please add any feedback or bug reports to the [AI SDK v5 mega issue in Github.](https://github.com/mastra-ai/mastra/issues/5470)
91
+
@@ -79,17 +79,36 @@ If you prefer to customize the setup, run the `init` command and choose from the
79
79
  npx mastra@latest init
80
80
  ```
81
81
 
82
+ <Callout type="warning">
83
+ By default, `mastra init` suggests `src` as the install location. If you're using the App Router at the root of your project (e.g., `app`, not `src/app`), enter `.` when prompted:
84
+ </Callout>
85
+
82
86
  Add the `dev` and `build` scripts to `package.json`:
83
87
 
84
- ```json filename="package.json"
85
- {
86
- "scripts": {
87
- ...
88
- "dev:mastra": "mastra dev --dir mastra",
89
- "build:mastra": "mastra build --dir mastra"
90
- }
91
- }
92
- ```
88
+ <Tabs items={["app", "src/app"]}>
89
+ <Tabs.Tab>
90
+ ```json filename="package.json"
91
+ {
92
+ "scripts": {
93
+ ...
94
+ "dev:mastra": "mastra dev --dir mastra",
95
+ "build:mastra": "mastra build --dir mastra"
96
+ }
97
+ }
98
+ ```
99
+ </Tabs.Tab>
100
+ <Tabs.Tab>
101
+ ```json filename="package.json"
102
+ {
103
+ "scripts": {
104
+ ...
105
+ "dev:mastra": "mastra dev --dir src/mastra",
106
+ "build:mastra": "mastra build --dir src/mastra"
107
+ }
108
+ }
109
+ ```
110
+ </Tabs.Tab>
111
+ </Tabs>
93
112
 
94
113
  ## Configure TypeScript
95
114
 
@@ -324,17 +343,36 @@ If you prefer to customize the setup, run the `init` command and choose from the
324
343
  npx mastra@latest init
325
344
  ```
326
345
 
346
+ <Callout type="warning">
347
+ By default, `mastra init` suggests `src` as the install location. If you're using the Pages Router at the root of your project (e.g., `pages`, not `src/pages`), enter `.` when prompted:
348
+ </Callout>
349
+
327
350
  Add the `dev` and `build` scripts to `package.json`:
328
351
 
329
- ```json filename="package.json"
330
- {
331
- "scripts": {
332
- ...
333
- "dev:mastra": "mastra dev --dir mastra",
334
- "build:mastra": "mastra build --dir mastra"
335
- }
336
- }
337
- ```
352
+ <Tabs items={["pages", "src/pages"]}>
353
+ <Tabs.Tab>
354
+ ```json filename="package.json"
355
+ {
356
+ "scripts": {
357
+ ...
358
+ "dev:mastra": "mastra dev --dir mastra",
359
+ "build:mastra": "mastra build --dir mastra"
360
+ }
361
+ }
362
+ ```
363
+ </Tabs.Tab>
364
+ <Tabs.Tab>
365
+ ```json filename="package.json"
366
+ {
367
+ "scripts": {
368
+ ...
369
+ "dev:mastra": "mastra dev --dir src/mastra",
370
+ "build:mastra": "mastra build --dir src/mastra"
371
+ }
372
+ }
373
+ ```
374
+ </Tabs.Tab>
375
+ </Tabs>
338
376
 
339
377
  ## Configure TypeScript
340
378