@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.
- package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +84 -84
- package/.docs/organized/changelogs/%40mastra%2Fastra.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +61 -61
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +210 -210
- package/.docs/organized/changelogs/%40mastra%2Fcloud.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +99 -99
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +98 -98
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +189 -189
- package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +241 -241
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +170 -170
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +170 -170
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +236 -236
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +109 -109
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +80 -80
- package/.docs/organized/changelogs/%40mastra%2Ffastembed.md +7 -0
- package/.docs/organized/changelogs/%40mastra%2Ffirecrawl.md +90 -90
- package/.docs/organized/changelogs/%40mastra%2Fgithub.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Flance.md +62 -0
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +83 -83
- package/.docs/organized/changelogs/%40mastra%2Floggers.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +50 -50
- package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +32 -32
- package/.docs/organized/changelogs/%40mastra%2Fmem0.md +26 -26
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +145 -145
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +83 -83
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +76 -0
- package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +126 -126
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +245 -245
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Frag.md +87 -87
- package/.docs/organized/changelogs/%40mastra%2Fragie.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +18 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +208 -208
- package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +101 -101
- package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +26 -26
- package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +71 -71
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +26 -26
- package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +8 -8
- package/.docs/organized/changelogs/create-mastra.md +127 -127
- package/.docs/organized/changelogs/mastra.md +250 -250
- package/.docs/organized/code-examples/a2a.md +1 -1
- package/.docs/organized/code-examples/agent.md +6 -0
- package/.docs/organized/code-examples/agui.md +5 -5
- package/.docs/organized/code-examples/ai-sdk-useChat.md +3 -3
- package/.docs/organized/code-examples/ai-sdk-v5.md +201 -0
- package/.docs/organized/code-examples/assistant-ui.md +3 -3
- package/.docs/organized/code-examples/bird-checker-with-express.md +1 -1
- package/.docs/organized/code-examples/bird-checker-with-nextjs-and-eval.md +3 -3
- package/.docs/organized/code-examples/bird-checker-with-nextjs.md +3 -3
- package/.docs/organized/code-examples/client-side-tools.md +3 -3
- package/.docs/organized/code-examples/crypto-chatbot.md +6 -6
- package/.docs/organized/code-examples/fireworks-r1.md +1 -1
- package/.docs/organized/code-examples/memory-with-mem0.md +1 -1
- package/.docs/organized/code-examples/memory-with-pg.md +1 -0
- package/.docs/organized/code-examples/openapi-spec-writer.md +3 -3
- package/.docs/organized/code-examples/quick-start.md +1 -1
- package/.docs/organized/code-examples/workflow-ai-recruiter.md +1 -1
- package/.docs/organized/code-examples/workflow-with-inline-steps.md +1 -1
- package/.docs/organized/code-examples/workflow-with-memory.md +1 -1
- package/.docs/organized/code-examples/workflow-with-separate-steps.md +1 -1
- package/.docs/organized/code-examples/workflow-with-suspend-resume.md +181 -0
- package/.docs/raw/agents/agent-memory.mdx +126 -0
- package/.docs/raw/agents/dynamic-agents.mdx +34 -2
- package/.docs/raw/agents/overview.mdx +5 -0
- package/.docs/raw/agents/runtime-variables.mdx +1 -1
- package/.docs/raw/auth/index.mdx +24 -0
- package/.docs/raw/auth/jwt.mdx +99 -0
- package/.docs/raw/deployment/cloud-providers/amazon-ec2.mdx +60 -26
- package/.docs/raw/deployment/cloud-providers/azure-app-services.mdx +6 -5
- package/.docs/raw/deployment/cloud-providers/digital-ocean.mdx +84 -14
- package/.docs/raw/deployment/cloud-providers/index.mdx +44 -9
- package/.docs/raw/deployment/serverless-platforms/cloudflare-deployer.mdx +9 -30
- package/.docs/raw/deployment/serverless-platforms/index.mdx +13 -13
- package/.docs/raw/evals/custom-eval.mdx +12 -12
- package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +291 -216
- package/.docs/raw/frameworks/agentic-uis/assistant-ui.mdx +0 -34
- package/.docs/raw/frameworks/agentic-uis/copilotkit.mdx +162 -181
- package/.docs/raw/frameworks/servers/express.mdx +1 -1
- package/.docs/raw/frameworks/web-frameworks/astro.mdx +2 -2
- package/.docs/raw/frameworks/web-frameworks/next-js.mdx +1 -1
- package/.docs/raw/frameworks/web-frameworks/sveltekit.mdx +4 -4
- package/.docs/raw/frameworks/web-frameworks/vite-react.mdx +1 -1
- package/.docs/raw/getting-started/installation.mdx +10 -7
- package/.docs/raw/getting-started/model-capability.mdx +1 -1
- package/.docs/raw/index.mdx +2 -2
- package/.docs/raw/memory/overview.mdx +8 -0
- package/.docs/raw/memory/semantic-recall.mdx +6 -0
- package/.docs/raw/observability/tracing.mdx +30 -0
- package/.docs/raw/reference/agents/agent.mdx +2 -2
- package/.docs/raw/reference/auth/jwt.mdx +42 -0
- package/.docs/raw/reference/cli/create-mastra.mdx +7 -0
- package/.docs/raw/reference/cli/dev.mdx +4 -3
- package/.docs/raw/reference/client-js/agents.mdx +10 -10
- package/.docs/raw/reference/client-js/error-handling.mdx +1 -21
- package/.docs/raw/reference/client-js/logs.mdx +2 -10
- package/.docs/raw/reference/client-js/mastra-client.mdx +141 -0
- package/.docs/raw/reference/client-js/memory.mdx +6 -18
- package/.docs/raw/reference/client-js/telemetry.mdx +1 -9
- package/.docs/raw/reference/client-js/tools.mdx +2 -10
- package/.docs/raw/reference/client-js/vectors.mdx +1 -9
- package/.docs/raw/reference/client-js/workflows-legacy.mdx +3 -11
- package/.docs/raw/reference/client-js/workflows.mdx +5 -13
- package/.docs/raw/reference/core/mastra-class.mdx +6 -0
- package/.docs/raw/reference/memory/query.mdx +35 -14
- package/.docs/raw/reference/observability/providers/dash0.mdx +2 -2
- package/.docs/raw/reference/observability/providers/keywordsai.mdx +73 -0
- package/.docs/raw/reference/storage/mssql.mdx +108 -0
- package/.docs/raw/reference/tools/vector-query-tool.mdx +29 -0
- package/.docs/raw/server-db/custom-api-routes.mdx +38 -26
- package/.docs/raw/tools-mcp/mcp-overview.mdx +24 -1
- package/.docs/raw/tools-mcp/overview.mdx +1 -1
- package/.docs/raw/workflows/control-flow.mdx +85 -87
- package/.docs/raw/workflows/input-data-mapping.mdx +31 -43
- package/.docs/raw/workflows/overview.mdx +22 -12
- package/.docs/raw/workflows/pausing-execution.mdx +49 -4
- package/.docs/raw/workflows/suspend-and-resume.mdx +17 -16
- package/.docs/raw/workflows/using-with-agents-and-tools.mdx +16 -13
- package/.docs/raw/workflows-legacy/overview.mdx +11 -0
- package/package.json +7 -9
- package/.docs/organized/changelogs/%40mastra%2Fagui.md +0 -302
- 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
|
-
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
47
|
+
npx wrangler login
|
|
59
48
|
```
|
|
60
49
|
|
|
61
|
-
|
|
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
|
-
|
|
53
|
+
npm run build && wrangler deploy --config .mastra/output/wrangler.json
|
|
72
54
|
```
|
|
73
55
|
|
|
74
|
-
|
|
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
|
-
-
|
|
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
|
-
```
|
|
33
|
+
```typescript filename="src/mastra/index.ts" showLineNumbers
|
|
34
34
|
export const mastra = new Mastra({
|
|
35
35
|
// ...
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
```
|
|
43
|
+
```typescript filename="src/mastra/agents/weather-agent.ts" showLineNumbers
|
|
44
44
|
export const weatherAgent = new Agent({
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
|
3
|
-
description: "Mastra allows
|
|
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
|
|
6
|
+
# Create a Custom Eval
|
|
7
7
|
|
|
8
|
-
|
|
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
|
-
##
|
|
10
|
+
## Native JavaScript evaluation
|
|
11
11
|
|
|
12
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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).
|