@mastra/mcp-docs-server 0.13.5 → 0.13.6

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 (80) hide show
  1. package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +76 -76
  2. package/.docs/organized/changelogs/%40mastra%2Fagui.md +61 -61
  3. package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +54 -54
  4. package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +194 -194
  5. package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +75 -75
  6. package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +91 -91
  7. package/.docs/organized/changelogs/%40mastra%2Fcore.md +171 -171
  8. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +237 -237
  9. package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +143 -143
  10. package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +143 -143
  11. package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +233 -233
  12. package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +84 -84
  13. package/.docs/organized/changelogs/%40mastra%2Fevals.md +56 -56
  14. package/.docs/organized/changelogs/%40mastra%2Ffastembed.md +7 -0
  15. package/.docs/organized/changelogs/%40mastra%2Ffirecrawl.md +62 -62
  16. package/.docs/organized/changelogs/%40mastra%2Flance.md +55 -0
  17. package/.docs/organized/changelogs/%40mastra%2Flibsql.md +56 -56
  18. package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +25 -25
  19. package/.docs/organized/changelogs/%40mastra%2Fmcp.md +25 -25
  20. package/.docs/organized/changelogs/%40mastra%2Fmemory.md +119 -119
  21. package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +58 -58
  22. package/.docs/organized/changelogs/%40mastra%2Fmssql.md +69 -0
  23. package/.docs/organized/changelogs/%40mastra%2Fpg.md +119 -119
  24. package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +244 -244
  25. package/.docs/organized/changelogs/%40mastra%2Frag.md +61 -61
  26. package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +18 -0
  27. package/.docs/organized/changelogs/%40mastra%2Fserver.md +195 -195
  28. package/.docs/organized/changelogs/%40mastra%2Fupstash.md +76 -76
  29. package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +44 -44
  30. package/.docs/organized/changelogs/create-mastra.md +119 -119
  31. package/.docs/organized/changelogs/mastra.md +256 -256
  32. package/.docs/organized/code-examples/agent.md +6 -0
  33. package/.docs/organized/code-examples/agui.md +3 -3
  34. package/.docs/organized/code-examples/ai-sdk-useChat.md +2 -2
  35. package/.docs/organized/code-examples/ai-sdk-v5.md +201 -0
  36. package/.docs/organized/code-examples/assistant-ui.md +2 -2
  37. package/.docs/organized/code-examples/bird-checker-with-nextjs-and-eval.md +2 -2
  38. package/.docs/organized/code-examples/bird-checker-with-nextjs.md +2 -2
  39. package/.docs/organized/code-examples/client-side-tools.md +1 -1
  40. package/.docs/organized/code-examples/crypto-chatbot.md +5 -5
  41. package/.docs/organized/code-examples/openapi-spec-writer.md +2 -2
  42. package/.docs/organized/code-examples/workflow-with-suspend-resume.md +181 -0
  43. package/.docs/raw/agents/agent-memory.mdx +126 -0
  44. package/.docs/raw/agents/dynamic-agents.mdx +34 -2
  45. package/.docs/raw/agents/overview.mdx +5 -0
  46. package/.docs/raw/deployment/cloud-providers/amazon-ec2.mdx +60 -26
  47. package/.docs/raw/deployment/cloud-providers/index.mdx +44 -9
  48. package/.docs/raw/deployment/serverless-platforms/cloudflare-deployer.mdx +9 -30
  49. package/.docs/raw/deployment/serverless-platforms/index.mdx +13 -13
  50. package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +291 -216
  51. package/.docs/raw/frameworks/agentic-uis/assistant-ui.mdx +0 -34
  52. package/.docs/raw/frameworks/agentic-uis/copilotkit.mdx +162 -181
  53. package/.docs/raw/frameworks/servers/express.mdx +1 -1
  54. package/.docs/raw/frameworks/web-frameworks/astro.mdx +2 -2
  55. package/.docs/raw/frameworks/web-frameworks/next-js.mdx +1 -1
  56. package/.docs/raw/frameworks/web-frameworks/sveltekit.mdx +4 -4
  57. package/.docs/raw/frameworks/web-frameworks/vite-react.mdx +1 -1
  58. package/.docs/raw/getting-started/installation.mdx +10 -7
  59. package/.docs/raw/getting-started/model-capability.mdx +1 -1
  60. package/.docs/raw/memory/overview.mdx +8 -0
  61. package/.docs/raw/memory/semantic-recall.mdx +6 -0
  62. package/.docs/raw/observability/tracing.mdx +30 -0
  63. package/.docs/raw/reference/agents/agent.mdx +2 -2
  64. package/.docs/raw/reference/cli/create-mastra.mdx +7 -0
  65. package/.docs/raw/reference/cli/dev.mdx +4 -3
  66. package/.docs/raw/reference/client-js/agents.mdx +8 -0
  67. package/.docs/raw/reference/memory/query.mdx +35 -14
  68. package/.docs/raw/reference/observability/providers/keywordsai.mdx +73 -0
  69. package/.docs/raw/reference/storage/mssql.mdx +108 -0
  70. package/.docs/raw/server-db/custom-api-routes.mdx +38 -26
  71. package/.docs/raw/tools-mcp/mcp-overview.mdx +24 -1
  72. package/.docs/raw/workflows/control-flow.mdx +85 -87
  73. package/.docs/raw/workflows/input-data-mapping.mdx +31 -43
  74. package/.docs/raw/workflows/overview.mdx +22 -12
  75. package/.docs/raw/workflows/pausing-execution.mdx +49 -4
  76. package/.docs/raw/workflows/suspend-and-resume.mdx +17 -16
  77. package/.docs/raw/workflows/using-with-agents-and-tools.mdx +16 -13
  78. package/.docs/raw/workflows-legacy/overview.mdx +11 -0
  79. package/package.json +6 -8
  80. package/.docs/raw/frameworks/ai-sdk-v5.mdx +0 -91
@@ -3,8 +3,7 @@ title: "Amazon EC2"
3
3
  description: "Deploy your Mastra applications to Amazon EC2."
4
4
  ---
5
5
 
6
- import { Callout, Steps } from "nextra/components";
7
- import ServerConfig from "@/components/content-blocks/server-config.mdx";
6
+ import { Callout, Steps, Tabs } from "nextra/components";
8
7
 
9
8
  ## Amazon EC2
10
9
 
@@ -17,50 +16,85 @@ Deploy your Mastra applications to Amazon EC2 (Elastic Cloud Compute).
17
16
  refer to our [getting started guide](/docs/getting-started/installation)
18
17
  </Callout>
19
18
 
20
- ### Setting up EC2
19
+ ### Prerequisites
20
+
21
+ - An AWS account with [EC2](https://aws.amazon.com/ec2/) access
22
+ - An EC2 instance running Ubuntu 24+ or Amazon Linux
23
+ - A domain name with an A record pointing to your instance
24
+ - A reverse proxy configured (e.g., using [nginx](https://nginx.org/))
25
+ - SSL certificate configured (e.g., using [Let's Encrypt](https://letsencrypt.org/))
26
+ - Node.js 18+ installed on your instance
27
+
28
+ ### Deployment Steps
21
29
 
22
30
  <Steps>
23
31
 
24
- #### Log into your AWS console
32
+ #### Clone your Mastra application
25
33
 
26
- Navigate to the [AWS Management Console](https://aws.amazon.com/console/) and sign in to your account.
34
+ Connect to your EC2 instance and clone your repository:
27
35
 
28
- #### Navigate to EC2
36
+ <Tabs items={["Public Repository", "Private Repository"]}>
37
+ <Tabs.Tab>
29
38
 
30
- Head over to **All services** in the left side navigation. Under **Compute**, click on **EC2**.
39
+ ```bash copy
40
+ git clone https://github.com/<your-username>/<your-repository>.git
41
+ ```
31
42
 
32
- #### Launch a virtual server instance
43
+ </Tabs.Tab>
33
44
 
34
- Click on **Launch instance** to create a new EC2 instance.
45
+ <Tabs.Tab>
46
+
47
+ ```bash copy
48
+ git clone https://<your-username>:<your-personal-access-token>@github.com/<your-username>/<your-repository>.git
49
+ ```
35
50
 
36
- #### Configure your instance details
51
+ </Tabs.Tab>
52
+ </Tabs>
37
53
 
38
- Add the following details for your instance:
54
+ Navigate to the repository directory:
39
55
 
40
- - **Name**: Give your instance a descriptive name
41
- - **Application and OS Images**: For this example, we'll use the **Amazon Linux** environment
42
- - **Instance type**: Select **t3.micro** (eligible for free tier)
43
- - **Key pair**: Select an existing key pair or create a new one for secure login
44
- - **Network settings**: Ensure to **allow HTTPS and HTTP traffic from the internet** by checking the appropriate boxes
56
+ ```bash copy
57
+ cd "<your-repository>"
58
+ ```
45
59
 
46
- #### Launch your instance
60
+ #### Install dependencies
47
61
 
48
- Review your configuration and click **Launch instance**.
62
+ ```bash copy
63
+ npm install
64
+ ```
49
65
 
50
- #### Connect to your instance
66
+ #### Set up environment variables
51
67
 
52
- You'll be redirected to a next steps page. You can connect to your instance either:
68
+ Create a `.env` file and add your environment variables:
53
69
 
54
- - **Through the browser**: Click the **Connect** button for browser-based access
55
- - **Via SSH**: Use your key pair to SSH into the instance (instructions available when you click **Connect**)
70
+ ```bash copy
71
+ touch .env
72
+ ```
56
73
 
57
- </Steps>
74
+ Edit the `.env` file and add your environment variables:
58
75
 
59
- ### Server Configuration
76
+ ```bash copy
77
+ OPENAI_API_KEY=<your-openai-api-key>
78
+ # Add other required environment variables
79
+ ```
60
80
 
61
- Once you have access to your EC2 instance (either via SSH or browser), follow these steps to set up your server environment:
81
+ #### Build the application
62
82
 
63
- <ServerConfig />
83
+ ```bash copy
84
+ npm run build
85
+ ```
86
+
87
+ #### Run the application
88
+
89
+ ```bash copy
90
+ node --import=./.mastra/output/instrumentation.mjs --env-file=".env" .mastra/output/index.mjs
91
+ ```
92
+
93
+ <Callout>
94
+ Your Mastra application will run on port 4111 by default. Ensure your reverse proxy is configured to forward requests to this port.
95
+ </Callout>
96
+
97
+ </Steps>
64
98
 
65
99
  ### Connect to your Mastra server
66
100
 
@@ -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
  ```