@mastra/mcp-docs-server 0.13.5 → 0.13.7-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 (135) hide show
  1. package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +84 -84
  2. package/.docs/organized/changelogs/%40mastra%2Fastra.md +8 -8
  3. package/.docs/organized/changelogs/%40mastra%2Fchroma.md +8 -8
  4. package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +61 -61
  5. package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +210 -210
  6. package/.docs/organized/changelogs/%40mastra%2Fcloud.md +8 -8
  7. package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +99 -99
  8. package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +98 -98
  9. package/.docs/organized/changelogs/%40mastra%2Fcore.md +189 -189
  10. package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +8 -8
  11. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +241 -241
  12. package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +170 -170
  13. package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +170 -170
  14. package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +236 -236
  15. package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +109 -109
  16. package/.docs/organized/changelogs/%40mastra%2Fevals.md +80 -80
  17. package/.docs/organized/changelogs/%40mastra%2Ffastembed.md +7 -0
  18. package/.docs/organized/changelogs/%40mastra%2Ffirecrawl.md +90 -90
  19. package/.docs/organized/changelogs/%40mastra%2Fgithub.md +8 -8
  20. package/.docs/organized/changelogs/%40mastra%2Flance.md +62 -0
  21. package/.docs/organized/changelogs/%40mastra%2Flibsql.md +83 -83
  22. package/.docs/organized/changelogs/%40mastra%2Floggers.md +8 -8
  23. package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +50 -50
  24. package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +8 -8
  25. package/.docs/organized/changelogs/%40mastra%2Fmcp.md +32 -32
  26. package/.docs/organized/changelogs/%40mastra%2Fmem0.md +26 -26
  27. package/.docs/organized/changelogs/%40mastra%2Fmemory.md +145 -145
  28. package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +83 -83
  29. package/.docs/organized/changelogs/%40mastra%2Fmssql.md +76 -0
  30. package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +8 -8
  31. package/.docs/organized/changelogs/%40mastra%2Fpg.md +126 -126
  32. package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +8 -8
  33. package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +245 -245
  34. package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +8 -8
  35. package/.docs/organized/changelogs/%40mastra%2Frag.md +87 -87
  36. package/.docs/organized/changelogs/%40mastra%2Fragie.md +8 -8
  37. package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +18 -0
  38. package/.docs/organized/changelogs/%40mastra%2Fserver.md +208 -208
  39. package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +8 -8
  40. package/.docs/organized/changelogs/%40mastra%2Fupstash.md +101 -101
  41. package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +8 -8
  42. package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +26 -26
  43. package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +8 -8
  44. package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +8 -8
  45. package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +8 -8
  46. package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +8 -8
  47. package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +8 -8
  48. package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +71 -71
  49. package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +26 -26
  50. package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +8 -8
  51. package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +8 -8
  52. package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +8 -8
  53. package/.docs/organized/changelogs/create-mastra.md +127 -127
  54. package/.docs/organized/changelogs/mastra.md +250 -250
  55. package/.docs/organized/code-examples/a2a.md +1 -1
  56. package/.docs/organized/code-examples/agent.md +6 -0
  57. package/.docs/organized/code-examples/agui.md +5 -5
  58. package/.docs/organized/code-examples/ai-sdk-useChat.md +3 -3
  59. package/.docs/organized/code-examples/ai-sdk-v5.md +201 -0
  60. package/.docs/organized/code-examples/assistant-ui.md +3 -3
  61. package/.docs/organized/code-examples/bird-checker-with-express.md +1 -1
  62. package/.docs/organized/code-examples/bird-checker-with-nextjs-and-eval.md +3 -3
  63. package/.docs/organized/code-examples/bird-checker-with-nextjs.md +3 -3
  64. package/.docs/organized/code-examples/client-side-tools.md +3 -3
  65. package/.docs/organized/code-examples/crypto-chatbot.md +6 -6
  66. package/.docs/organized/code-examples/fireworks-r1.md +1 -1
  67. package/.docs/organized/code-examples/memory-with-mem0.md +1 -1
  68. package/.docs/organized/code-examples/memory-with-pg.md +1 -0
  69. package/.docs/organized/code-examples/openapi-spec-writer.md +3 -3
  70. package/.docs/organized/code-examples/quick-start.md +1 -1
  71. package/.docs/organized/code-examples/workflow-ai-recruiter.md +1 -1
  72. package/.docs/organized/code-examples/workflow-with-inline-steps.md +1 -1
  73. package/.docs/organized/code-examples/workflow-with-memory.md +1 -1
  74. package/.docs/organized/code-examples/workflow-with-separate-steps.md +1 -1
  75. package/.docs/organized/code-examples/workflow-with-suspend-resume.md +181 -0
  76. package/.docs/raw/agents/agent-memory.mdx +126 -0
  77. package/.docs/raw/agents/dynamic-agents.mdx +34 -2
  78. package/.docs/raw/agents/overview.mdx +5 -0
  79. package/.docs/raw/agents/runtime-variables.mdx +1 -1
  80. package/.docs/raw/auth/index.mdx +24 -0
  81. package/.docs/raw/auth/jwt.mdx +99 -0
  82. package/.docs/raw/deployment/cloud-providers/amazon-ec2.mdx +60 -26
  83. package/.docs/raw/deployment/cloud-providers/azure-app-services.mdx +6 -5
  84. package/.docs/raw/deployment/cloud-providers/digital-ocean.mdx +84 -14
  85. package/.docs/raw/deployment/cloud-providers/index.mdx +44 -9
  86. package/.docs/raw/deployment/serverless-platforms/cloudflare-deployer.mdx +9 -30
  87. package/.docs/raw/deployment/serverless-platforms/index.mdx +13 -13
  88. package/.docs/raw/evals/custom-eval.mdx +12 -12
  89. package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +291 -216
  90. package/.docs/raw/frameworks/agentic-uis/assistant-ui.mdx +0 -34
  91. package/.docs/raw/frameworks/agentic-uis/copilotkit.mdx +162 -181
  92. package/.docs/raw/frameworks/servers/express.mdx +1 -1
  93. package/.docs/raw/frameworks/web-frameworks/astro.mdx +2 -2
  94. package/.docs/raw/frameworks/web-frameworks/next-js.mdx +1 -1
  95. package/.docs/raw/frameworks/web-frameworks/sveltekit.mdx +4 -4
  96. package/.docs/raw/frameworks/web-frameworks/vite-react.mdx +1 -1
  97. package/.docs/raw/getting-started/installation.mdx +10 -7
  98. package/.docs/raw/getting-started/model-capability.mdx +1 -1
  99. package/.docs/raw/index.mdx +2 -2
  100. package/.docs/raw/memory/overview.mdx +8 -0
  101. package/.docs/raw/memory/semantic-recall.mdx +6 -0
  102. package/.docs/raw/observability/tracing.mdx +30 -0
  103. package/.docs/raw/reference/agents/agent.mdx +2 -2
  104. package/.docs/raw/reference/auth/jwt.mdx +42 -0
  105. package/.docs/raw/reference/cli/create-mastra.mdx +7 -0
  106. package/.docs/raw/reference/cli/dev.mdx +4 -3
  107. package/.docs/raw/reference/client-js/agents.mdx +10 -10
  108. package/.docs/raw/reference/client-js/error-handling.mdx +1 -21
  109. package/.docs/raw/reference/client-js/logs.mdx +2 -10
  110. package/.docs/raw/reference/client-js/mastra-client.mdx +141 -0
  111. package/.docs/raw/reference/client-js/memory.mdx +6 -18
  112. package/.docs/raw/reference/client-js/telemetry.mdx +1 -9
  113. package/.docs/raw/reference/client-js/tools.mdx +2 -10
  114. package/.docs/raw/reference/client-js/vectors.mdx +1 -9
  115. package/.docs/raw/reference/client-js/workflows-legacy.mdx +3 -11
  116. package/.docs/raw/reference/client-js/workflows.mdx +5 -13
  117. package/.docs/raw/reference/core/mastra-class.mdx +6 -0
  118. package/.docs/raw/reference/memory/query.mdx +35 -14
  119. package/.docs/raw/reference/observability/providers/dash0.mdx +2 -2
  120. package/.docs/raw/reference/observability/providers/keywordsai.mdx +73 -0
  121. package/.docs/raw/reference/storage/mssql.mdx +108 -0
  122. package/.docs/raw/reference/tools/vector-query-tool.mdx +29 -0
  123. package/.docs/raw/server-db/custom-api-routes.mdx +38 -26
  124. package/.docs/raw/tools-mcp/mcp-overview.mdx +24 -1
  125. package/.docs/raw/tools-mcp/overview.mdx +1 -1
  126. package/.docs/raw/workflows/control-flow.mdx +85 -87
  127. package/.docs/raw/workflows/input-data-mapping.mdx +31 -43
  128. package/.docs/raw/workflows/overview.mdx +22 -12
  129. package/.docs/raw/workflows/pausing-execution.mdx +49 -4
  130. package/.docs/raw/workflows/suspend-and-resume.mdx +17 -16
  131. package/.docs/raw/workflows/using-with-agents-and-tools.mdx +16 -13
  132. package/.docs/raw/workflows-legacy/overview.mdx +11 -0
  133. package/package.json +7 -9
  134. package/.docs/organized/changelogs/%40mastra%2Fagui.md +0 -302
  135. package/.docs/raw/frameworks/ai-sdk-v5.mdx +0 -91
@@ -1,17 +1,52 @@
1
1
  ---
2
2
  title: "Cloud Providers"
3
3
  description: "Deploy your Mastra applications to popular cloud providers."
4
- asIndexPage: true
5
4
  ---
6
5
 
7
- import { CardGrid, CardGridItem } from "@/components/cards/card-grid";
8
-
9
6
  ## Cloud Providers
10
7
 
11
- Deploy your Mastra applicaitons to popular cloud providers.
8
+ Standalone Mastra applications can be deployed to popular cloud providers, see one of the following guides for more information:
9
+
10
+ - [Amazon EC2](/docs/deployment/cloud-providers/amazon-ec2)
11
+ - [AWS Lambda](/docs/deployment/cloud-providers/aws-lambda)
12
+ - [Digital Ocean](/docs/deployment/cloud-providers/digital-ocean)
13
+ - [Azure App Services](/docs/deployment/cloud-providers/azure-app-services)
14
+
15
+ For self-hosted Node.js server deployment, see the [Creating A Mastra Server](/docs/deployment/server) guide.
16
+
17
+ ## Prerequisites
18
+
19
+ Before deploying to a cloud provider, ensure you have:
20
+
21
+ - A [Mastra application](/docs/getting-started/installation)
22
+ - Node.js `v20.0` or higher
23
+ - A GitHub repository for your application (required for most CI/CD setups)
24
+ - Domain name management access (for SSL and HTTPS)
25
+ - Basic familiarity with server setup (e.g. Nginx, environment variables)
26
+
27
+ ## LibSQLStore
28
+
29
+ `LibSQLStore` writes to the local filesystem, which is not supported in cloud environments that use ephemeral file systems. If you're deploying to platforms like **AWS Lambda**, **Azure App Services**, or **Digital Ocean App Platform**, you **must remove** all usage of `LibSQLStore`.
30
+
31
+ Specifically, ensure you've removed it from both `src/mastra/index.ts` and `src/mastra/agents/weather-agent.ts`:
32
+
33
+ ```typescript filename="src/mastra/index.ts" showLineNumbers
34
+ export const mastra = new Mastra({
35
+ // ...
36
+ storage: new LibSQLStore({ // [!code --]
37
+ // stores telemetry, evals, ... into memory storage, if it needs to persist, change to file:../mastra.db // [!code --]
38
+ url: ":memory:", // [!code --]
39
+ })//[!code --]
40
+ });
41
+ ```
12
42
 
13
- <CardGrid>
14
- <CardGridItem title="Digital Ocean" description="Deploy your Mastra applications to Digital Ocean" href="./cloud-providers/digital-ocean" />
15
- <CardGridItem title="Amazon EC2" description="Deploy your Mastra applications to Amazon EC2" href="./cloud-providers/amazon-ec2" />
16
- <CardGridItem title="Azure App Services" description="Deploy your Mastra applications to Azure App Services" href="./cloud-providers/azure-app-services" />
17
- </CardGrid>
43
+ ```typescript filename="src/mastra/agents/weather-agent.ts" showLineNumbers
44
+ export const weatherAgent = new Agent({
45
+ // ..
46
+ memory: new Memory({ // [!code --]
47
+ storage: new LibSQLStore({ // [!code --]
48
+ url: "file:../mastra.db" // path is relative to the .mastra/output directory // [!code --]
49
+ }) // [!code --]
50
+ })// [!code --]
51
+ });
52
+ ```
@@ -24,6 +24,7 @@ import { CloudflareDeployer } from "@mastra/deployer-cloudflare";
24
24
  export const mastra = new Mastra({
25
25
  // ...
26
26
  deployer: new CloudflareDeployer({
27
+ scope: "your-account-id",
27
28
  projectName: "hello-mastra",
28
29
  scope: "",
29
30
  auth: {
@@ -36,44 +37,23 @@ export const mastra = new Mastra({
36
37
 
37
38
  > See the [CloudflareDeployer](/reference/deployer/cloudflare) API reference for all available configuration options.
38
39
 
39
- ### Cloudflare API token
40
-
41
- In your Cloudflare dashboard, navigate to **Profile** > **API Tokens**, then select **Edit Cloudflare Workers** and click **Use template** to create a token for the `CloudflareDeployer`.
42
-
43
- > To learn how to create a Cloudflare API token, see [Create API token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/) in the Cloudflare docs.
44
-
45
- ## Continuous integration
46
- In the Cloudflare dashboard, navigate to **Workers** > **Import a repository**. After importing your Mastra project's Git repository, create an application and configure the build settings with:
47
-
48
- - **Build command**: `npm run build`
49
- - **Deploy command**: `cd .mastra/output && npx wrangler deploy`
50
-
51
- - **Build command**: `npm run build` (optional)
52
-
53
40
  ## Manual deployment
54
41
 
55
42
  Manual deployments are also possible using the [Cloudflare Wrangler CLI](https://developers.cloudflare.com/workers/wrangler/install-and-update/). With the Wrangler CLI installed run the following from your project root to deploy your application.
56
43
 
44
+ With the Wrangler CLI installed, login and authenticate with your Cloudflare logins:
45
+
57
46
  ```bash copy
58
- npm run build && wrangler deploy --config .mastra/output/wrangler.json
47
+ npx wrangler login
59
48
  ```
60
49
 
61
- > You can also run `wrangler dev --config .mastra/output/wrangler.json` from your project root to test your Mastra application locally.
62
-
63
- ## Cloudflare secrets
64
-
65
- To add secrets to your Cloudflare Workers application, use the Wrangler CLI. Secrets are environment variables that are encrypted and stored securely.
66
-
67
-
68
- For example, to add an API key:
50
+ Run the following to build and deploy your application to Cloudflare
69
51
 
70
52
  ```bash copy
71
- npx wrangler secret put OPENAI_API_KEY
53
+ npm run build && wrangler deploy --config .mastra/output/wrangler.json
72
54
  ```
73
55
 
74
- When prompted, enter the secret value. The secret will be encrypted and stored securely in your Cloudflare account.
75
-
76
- > For more details on managing secrets, see [Environment Variables and Secrets](https://developers.cloudflare.com/workers/configuration/secrets/) in the Cloudflare documentation.
56
+ > You can also run `wrangler dev --config .mastra/output/wrangler.json` from your project root to test your Mastra application locally.
77
57
 
78
58
  ## Build output
79
59
 
@@ -99,13 +79,12 @@ The `CloudflareDeployer` automatically generates a `wrangler.json` configuration
99
79
  "compatibility_flags": ["nodejs_compat", "nodejs_compat_populate_process_env"],
100
80
  "observability": { "logs": { "enabled": true } },
101
81
  "vars": {
102
- "OPENAI_API_KEY": "..",
82
+ "OPENAI_API_KEY": "...",
103
83
  "CLOUDFLARE_API_TOKEN": "..."
104
84
  }
105
85
  }
106
- ```
107
-
108
86
 
87
+ ```
109
88
  ## Next steps
110
89
 
111
90
  - [Mastra Client SDK](/docs/client-js/overview)
@@ -19,7 +19,7 @@ For self-hosted Node.js server deployment, see the [Creating A Mastra Server](/d
19
19
 
20
20
  Before you begin, ensure you have:
21
21
 
22
- - **Node.js** installed (version 18 or higher is recommended)
22
+ - Node.js `v20.0` or higher
23
23
  - If using a platform-specific deployer:
24
24
  - An account with your chosen platform
25
25
  - Required API keys or credentials
@@ -30,23 +30,23 @@ Before you begin, ensure you have:
30
30
 
31
31
  Specifically, ensure you've removed it from both `src/mastra/index.ts` and `src/mastra/agents/weather-agent.ts`:
32
32
 
33
- ```diff filename="src/mastra/index.ts" showLineNumbers
33
+ ```typescript filename="src/mastra/index.ts" showLineNumbers
34
34
  export const mastra = new Mastra({
35
35
  // ...
36
- - storage: new LibSQLStore({
37
- - // stores telemetry, evals, ... into memory storage, if it needs to persist, change to file:../mastra.db
38
- - url: ":memory:",
39
- - })
36
+ storage: new LibSQLStore({ // [!code --]
37
+ // stores telemetry, evals, ... into memory storage, if it needs to persist, change to file:../mastra.db // [!code --]
38
+ url: ":memory:", // [!code --]
39
+ })//[!code --]
40
40
  });
41
41
  ```
42
42
 
43
- ``` diff filename="src/mastra/agents/weather-agent.ts" showLineNumbers
43
+ ```typescript filename="src/mastra/agents/weather-agent.ts" showLineNumbers
44
44
  export const weatherAgent = new Agent({
45
- // ..
46
- - memory: new Memory({
47
- - storage: new LibSQLStore({
48
- - url: "file:../mastra.db" // path is relative to the .mastra/output directory
49
- - })
50
- - })
45
+ // ..
46
+ memory: new Memory({ // [!code --]
47
+ storage: new LibSQLStore({ // [!code --]
48
+ url: "file:../mastra.db" // path is relative to the .mastra/output directory // [!code --]
49
+ }) // [!code --]
50
+ })// [!code --]
51
51
  });
52
52
  ```
@@ -1,22 +1,22 @@
1
1
  ---
2
- title: "Create your own Eval"
3
- description: "Mastra allows so create your own evals, here is how."
2
+ title: "Create a custom eval"
3
+ description: "Mastra allows you to create your own evals, here is how."
4
4
  ---
5
5
 
6
- # Create your own Eval
6
+ # Create a Custom Eval
7
7
 
8
- Creating your own eval is as easy as creating a new function. You simply create a class that extends the `Metric` class and implement the `measure` method.
8
+ Create a custom eval by extending the `Metric` class and implementing the `measure` method. This gives you full control over how scores are calculated and what information is returned. For LLM-based evaluations, extend the `MastraAgentJudge` class to define how the model reasons and scores output.
9
9
 
10
- ## Basic example
10
+ ## Native JavaScript evaluation
11
11
 
12
- For a simple example of creating a custom metric that checks if the output contains certain words, see our [Word Inclusion example](/examples/evals/word-inclusion).
12
+ You can write lightweight custom metrics using plain JavaScript/TypeScript. These are ideal for simple string comparisons, pattern checks, or other rule-based logic.
13
13
 
14
- ## Creating a custom LLM-Judge
14
+ See our [Word Inclusion example](/examples/evals/custom-native-javascript-eval.mdx), which scores responses based on the number of reference words found in the output.
15
15
 
16
- A custom LLM judge helps evaluate specific aspects of your AI's responses. Think of it like having an expert reviewer for your particular use case:
16
+ ## LLM as a judge evaluation
17
+
18
+ For more complex evaluations, you can build a judge powered by an LLM. This lets you capture more nuanced criteria, like factual accuracy, tone, or reasoning.
19
+
20
+ See the [Real World Countries example](/examples/evals/custom-llm-judge-eval.mdx) for a complete walkthrough of building a custom judge and metric that evaluates real-world factual accuracy.
17
21
 
18
- - Medical Q&A → Judge checks for medical accuracy and safety
19
- - Customer Service → Judge evaluates tone and helpfulness
20
- - Code Generation → Judge verifies code correctness and style
21
22
 
22
- For a practical example, see how we evaluate [Chef Michel's](/docs/guides/chef-michel) recipes for gluten content in our [Gluten Checker example](/examples/evals/custom-eval).