@mastra/mcp-docs-server 1.0.0-beta.10 → 1.0.0-beta.13
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/%40mastra%2Fagent-builder.md +12 -12
- package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +50 -50
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +45 -45
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +109 -109
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +39 -39
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +39 -39
- package/.docs/organized/changelogs/%40mastra%2Fconvex.md +38 -0
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +264 -264
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +25 -25
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +37 -37
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +39 -39
- package/.docs/organized/changelogs/%40mastra%2Ffastembed.md +6 -0
- package/.docs/organized/changelogs/%40mastra%2Flance.md +39 -39
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +45 -45
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +22 -22
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +13 -13
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +39 -39
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +39 -39
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +45 -45
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +104 -104
- package/.docs/organized/changelogs/%40mastra%2Freact.md +66 -0
- package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +6 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +59 -59
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +39 -39
- package/.docs/organized/changelogs/create-mastra.md +31 -31
- package/.docs/organized/changelogs/mastra.md +49 -49
- package/.docs/organized/code-examples/quick-start.md +0 -4
- package/.docs/organized/code-examples/stock-price-tool.md +21 -2
- package/.docs/raw/agents/agent-approval.mdx +136 -2
- package/.docs/raw/agents/agent-memory.mdx +4 -4
- package/.docs/raw/agents/guardrails.mdx +44 -7
- package/.docs/raw/agents/networks.mdx +1 -1
- package/.docs/raw/agents/overview.mdx +2 -2
- package/.docs/raw/agents/processors.mdx +151 -0
- package/.docs/raw/agents/using-tools.mdx +1 -1
- package/.docs/raw/course/01-first-agent/07-creating-your-agent.md +1 -2
- package/.docs/raw/course/01-first-agent/12-connecting-tool-to-agent.md +1 -1
- package/.docs/raw/course/01-first-agent/16-adding-memory-to-agent.md +1 -2
- package/.docs/raw/course/02-agent-tools-mcp/05-updating-your-agent.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/10-updating-agent-instructions-zapier.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/16-updating-agent-instructions-github.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/21-updating-agent-instructions-hackernews.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/27-updating-agent-instructions-filesystem.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/31-enhancing-memory-configuration.md +2 -2
- package/.docs/raw/course/03-agent-memory/04-creating-basic-memory-agent.md +1 -2
- package/.docs/raw/course/03-agent-memory/08-configuring-conversation-history.md +1 -2
- package/.docs/raw/course/03-agent-memory/16-configuring-semantic-recall.md +3 -4
- package/.docs/raw/course/03-agent-memory/21-configuring-working-memory.md +2 -3
- package/.docs/raw/course/03-agent-memory/22-custom-working-memory-templates.md +2 -3
- package/.docs/raw/course/03-agent-memory/25-combining-memory-features.md +1 -2
- package/.docs/raw/course/03-agent-memory/27-creating-learning-assistant.md +2 -3
- package/.docs/raw/course/04-workflows/11-creating-an-ai-agent.md +2 -3
- package/.docs/raw/deployment/cloud-providers.mdx +20 -0
- package/.docs/raw/deployment/{building-mastra.mdx → mastra-server.mdx} +2 -2
- package/.docs/raw/deployment/monorepo.mdx +23 -44
- package/.docs/raw/deployment/overview.mdx +28 -53
- package/.docs/raw/deployment/web-framework.mdx +12 -14
- package/.docs/raw/getting-started/mcp-docs-server.mdx +57 -0
- package/.docs/raw/getting-started/start.mdx +10 -1
- package/.docs/raw/getting-started/studio.mdx +25 -2
- package/.docs/raw/guides/build-your-ui/ai-sdk-ui.mdx +1021 -67
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/aws-lambda.mdx +3 -6
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/azure-app-services.mdx +4 -6
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/cloudflare-deployer.mdx +4 -0
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/digital-ocean.mdx +3 -6
- package/.docs/raw/guides/deployment/index.mdx +32 -0
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/netlify-deployer.mdx +4 -0
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/vercel-deployer.mdx +4 -0
- package/.docs/raw/guides/getting-started/express.mdx +71 -152
- package/.docs/raw/guides/getting-started/hono.mdx +227 -0
- package/.docs/raw/guides/getting-started/next-js.mdx +173 -63
- package/.docs/raw/guides/getting-started/vite-react.mdx +307 -137
- package/.docs/raw/guides/guide/research-assistant.mdx +4 -4
- package/.docs/raw/guides/migrations/upgrade-to-v1/agent.mdx +70 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/client.mdx +17 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/overview.mdx +6 -0
- package/.docs/raw/index.mdx +1 -1
- package/.docs/raw/{deployment/mastra-cloud → mastra-cloud}/dashboard.mdx +2 -6
- package/.docs/raw/{deployment/mastra-cloud → mastra-cloud}/observability.mdx +1 -5
- package/.docs/raw/{deployment/mastra-cloud → mastra-cloud}/overview.mdx +2 -6
- package/.docs/raw/{deployment/mastra-cloud → mastra-cloud}/setting-up.mdx +3 -6
- package/.docs/raw/memory/overview.mdx +1 -1
- package/.docs/raw/memory/storage/memory-with-libsql.mdx +1 -1
- package/.docs/raw/memory/storage/memory-with-mongodb.mdx +1 -1
- package/.docs/raw/memory/storage/memory-with-pg.mdx +1 -1
- package/.docs/raw/memory/storage/memory-with-upstash.mdx +1 -1
- package/.docs/raw/{server-db/storage.mdx → memory/storage/overview.mdx} +2 -2
- package/.docs/raw/observability/logging.mdx +1 -1
- package/.docs/raw/observability/tracing/exporters/cloud.mdx +1 -1
- package/.docs/raw/observability/tracing/exporters/default.mdx +1 -1
- package/.docs/raw/rag/chunking-and-embedding.mdx +12 -25
- package/.docs/raw/rag/graph-rag.mdx +220 -0
- package/.docs/raw/rag/overview.mdx +1 -2
- package/.docs/raw/rag/retrieval.mdx +13 -29
- package/.docs/raw/rag/vector-databases.mdx +7 -3
- package/.docs/raw/reference/agents/agent.mdx +11 -4
- package/.docs/raw/reference/agents/getDefaultGenerateOptions.mdx +1 -1
- package/.docs/raw/reference/agents/getDefaultOptions.mdx +1 -1
- package/.docs/raw/reference/agents/getDefaultStreamOptions.mdx +1 -1
- package/.docs/raw/reference/agents/getInstructions.mdx +1 -1
- package/.docs/raw/reference/agents/getLLM.mdx +1 -1
- package/.docs/raw/reference/agents/getMemory.mdx +1 -1
- package/.docs/raw/reference/agents/getModel.mdx +1 -1
- package/.docs/raw/reference/agents/listScorers.mdx +1 -1
- package/.docs/raw/reference/ai-sdk/chat-route.mdx +1 -1
- package/.docs/raw/reference/ai-sdk/handle-chat-stream.mdx +1 -1
- package/.docs/raw/reference/ai-sdk/handle-network-stream.mdx +1 -1
- package/.docs/raw/reference/ai-sdk/handle-workflow-stream.mdx +1 -1
- package/.docs/raw/reference/ai-sdk/network-route.mdx +1 -1
- package/.docs/raw/reference/ai-sdk/to-ai-sdk-v4-messages.mdx +127 -0
- package/.docs/raw/reference/ai-sdk/to-ai-sdk-v5-messages.mdx +107 -0
- package/.docs/raw/reference/ai-sdk/workflow-route.mdx +1 -1
- package/.docs/raw/reference/auth/auth0.mdx +1 -1
- package/.docs/raw/reference/auth/clerk.mdx +1 -1
- package/.docs/raw/reference/auth/firebase.mdx +1 -1
- package/.docs/raw/reference/auth/jwt.mdx +1 -1
- package/.docs/raw/reference/auth/supabase.mdx +1 -1
- package/.docs/raw/reference/auth/workos.mdx +1 -1
- package/.docs/raw/reference/cli/mastra.mdx +1 -1
- package/.docs/raw/reference/client-js/mastra-client.mdx +1 -1
- package/.docs/raw/reference/client-js/workflows.mdx +20 -0
- package/.docs/raw/reference/core/getServer.mdx +3 -3
- package/.docs/raw/reference/core/getStorage.mdx +1 -1
- package/.docs/raw/reference/core/getStoredAgentById.mdx +1 -1
- package/.docs/raw/reference/core/listStoredAgents.mdx +1 -1
- package/.docs/raw/reference/core/setStorage.mdx +1 -1
- package/.docs/raw/reference/logging/pino-logger.mdx +1 -1
- package/.docs/raw/reference/processors/processor-interface.mdx +314 -13
- package/.docs/raw/reference/rag/database-config.mdx +1 -1
- package/.docs/raw/reference/server/create-route.mdx +1 -1
- package/.docs/raw/reference/server/express-adapter.mdx +4 -4
- package/.docs/raw/reference/server/hono-adapter.mdx +4 -4
- package/.docs/raw/reference/server/mastra-server.mdx +2 -2
- package/.docs/raw/reference/server/routes.mdx +28 -1
- package/.docs/raw/reference/streaming/ChunkType.mdx +23 -2
- package/.docs/raw/reference/streaming/agents/stream.mdx +38 -29
- package/.docs/raw/reference/streaming/workflows/stream.mdx +33 -20
- package/.docs/raw/reference/tools/create-tool.mdx +23 -1
- package/.docs/raw/reference/tools/graph-rag-tool.mdx +3 -3
- package/.docs/raw/reference/tools/vector-query-tool.mdx +3 -3
- package/.docs/raw/reference/workflows/run-methods/startAsync.mdx +143 -0
- package/.docs/raw/reference/workflows/workflow-methods/create-run.mdx +35 -0
- package/.docs/raw/reference/workflows/workflow-methods/foreach.mdx +68 -3
- package/.docs/raw/reference/workflows/workflow.mdx +37 -0
- package/.docs/raw/{auth → server/auth}/auth0.mdx +1 -1
- package/.docs/raw/{auth → server/auth}/clerk.mdx +1 -1
- package/.docs/raw/{auth → server/auth}/firebase.mdx +1 -1
- package/.docs/raw/{auth → server/auth}/index.mdx +6 -6
- package/.docs/raw/{auth → server/auth}/jwt.mdx +1 -1
- package/.docs/raw/{auth → server/auth}/supabase.mdx +1 -1
- package/.docs/raw/{auth → server/auth}/workos.mdx +1 -1
- package/.docs/raw/{server-db → server}/custom-adapters.mdx +3 -3
- package/.docs/raw/{server-db → server}/custom-api-routes.mdx +1 -1
- package/.docs/raw/{server-db → server}/mastra-client.mdx +2 -2
- package/.docs/raw/{server-db → server}/mastra-server.mdx +12 -10
- package/.docs/raw/{server-db → server}/middleware.mdx +2 -2
- package/.docs/raw/{server-db → server}/request-context.mdx +3 -3
- package/.docs/raw/{server-db → server}/server-adapters.mdx +6 -6
- package/.docs/raw/tools-mcp/overview.mdx +2 -2
- package/.docs/raw/workflows/control-flow.mdx +348 -2
- package/.docs/raw/workflows/error-handling.mdx +162 -1
- package/.docs/raw/workflows/overview.mdx +2 -2
- package/CHANGELOG.md +21 -0
- package/package.json +5 -5
- package/.docs/organized/changelogs/%40internal%2Fai-sdk-v4.md +0 -1
- package/.docs/raw/deployment/cloud-providers/index.mdx +0 -55
- /package/.docs/raw/{deployment/cloud-providers → guides/deployment}/amazon-ec2.mdx +0 -0
|
@@ -5,78 +5,53 @@ description: Learn about different deployment options for your Mastra applicatio
|
|
|
5
5
|
|
|
6
6
|
# Deployment Overview
|
|
7
7
|
|
|
8
|
-
Mastra
|
|
8
|
+
Mastra applications can be deployed to any Node.js-compatible environment. You can deploy a Mastra server, integrate with an existing web framework, deploy to cloud providers, or use Mastra Cloud for managed hosting.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Runtime support
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
| ------------------------ | ------------------------------------------------------------- | -------------------------------------------------------------------- |
|
|
14
|
-
| **Mastra Cloud** | Teams wanting to ship quickly without infrastructure concerns | Fully-managed, automatic scaling, built-in observability |
|
|
15
|
-
| **Framework Deployment** | Teams already using Next.js, Astro etc | Simplify deployment with a unified codebase for frontend and backend |
|
|
16
|
-
| **Server Deployment** | Teams needing maximum control and customization | Full control, custom middleware, integrate with existing apps |
|
|
17
|
-
| **Serverless Platforms** | Teams already using Vercel, Netlify, or Cloudflare | Platform integration, simplified deployment, automatic scaling |
|
|
18
|
-
|
|
19
|
-
## Deployment Options
|
|
20
|
-
|
|
21
|
-
### Runtime support
|
|
12
|
+
Mastra can run against any of these runtime environments:
|
|
22
13
|
|
|
23
14
|
- Node.js `v22.13.0` or later
|
|
24
15
|
- Bun
|
|
25
16
|
- Deno
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
### Mastra Cloud
|
|
29
|
-
|
|
30
|
-
Mastra Cloud is a deployment platform that connects to your GitHub repository, automatically deploys on code changes, and provides monitoring tools. It includes:
|
|
17
|
+
- Cloudflare
|
|
31
18
|
|
|
32
|
-
|
|
33
|
-
- Deployment on git push
|
|
34
|
-
- Agent testing interface
|
|
35
|
-
- Comprehensive logs and traces
|
|
36
|
-
- Custom domains for each project
|
|
37
|
-
|
|
38
|
-
[View Mastra Cloud documentation →](./mastra-cloud/overview)
|
|
39
|
-
|
|
40
|
-
### With a Web Framework
|
|
41
|
-
|
|
42
|
-
Mastra can be integrated with a variety of web frameworks. For example, see one of the following for a detailed guide.
|
|
19
|
+
## Deployment Options
|
|
43
20
|
|
|
44
|
-
|
|
45
|
-
- [With Astro](/guides/v1/getting-started/astro)
|
|
21
|
+
### Mastra Server
|
|
46
22
|
|
|
47
|
-
|
|
23
|
+
Mastra provides a [server](/docs/v1/server/mastra-server) powered by Hono that can be deployed independently. Use the `mastra build` command to build your application and deploy the output to your preferred VM, container, or PaaS platform.
|
|
48
24
|
|
|
49
|
-
[
|
|
25
|
+
See the [Mastra server deployment guide](/docs/v1/deployment/mastra-server).
|
|
50
26
|
|
|
51
|
-
###
|
|
27
|
+
### Monorepo
|
|
52
28
|
|
|
53
|
-
|
|
29
|
+
Deploy a Mastra server as part of a monorepo setup, following the same approach as standalone deployment.
|
|
54
30
|
|
|
55
|
-
|
|
56
|
-
- Configurable CORS and authentication
|
|
57
|
-
- Deploy to VMs, containers, or PaaS platforms
|
|
58
|
-
- Ideal for integrating with existing Node.js applications
|
|
31
|
+
Read about [monorepo deployment](/docs/v1/deployment/monorepo).
|
|
59
32
|
|
|
60
|
-
|
|
33
|
+
### Cloud Providers
|
|
61
34
|
|
|
62
|
-
|
|
35
|
+
Mastra applications can be deployed to cloud providers and serverless platforms. Mastra includes optional built-in deployers for Vercel, Netlify, and Cloudflare to automate the build and deployment process.
|
|
63
36
|
|
|
64
|
-
|
|
37
|
+
- [Amazon EC2](/guides/v1/deployment/amazon-ec2)
|
|
38
|
+
- [AWS Lambda](/guides/v1/deployment/aws-lambda)
|
|
39
|
+
- [Azure App Services](/guides/v1/deployment/azure-app-services)
|
|
40
|
+
- [Cloudflare](/guides/v1/deployment/cloudflare-deployer)
|
|
41
|
+
- [Digital Ocean](/guides/v1/deployment/digital-ocean)
|
|
42
|
+
- [Netlify](/guides/v1/deployment/netlify-deployer)
|
|
43
|
+
- [Vercel](/guides/v1/deployment/vercel-deployer)
|
|
65
44
|
|
|
66
|
-
|
|
67
|
-
- Platform-specific optimizations
|
|
68
|
-
- Simplified deployment process
|
|
69
|
-
- Automatic scaling through the platform
|
|
45
|
+
### Web Framework
|
|
70
46
|
|
|
71
|
-
|
|
47
|
+
When Mastra is integrated with a web framework, it deploys alongside your application using the framework's standard deployment process. The guides below cover framework-specific configuration requirements for deployment:
|
|
72
48
|
|
|
73
|
-
|
|
49
|
+
- [With Next.js on Vercel](/docs/v1/deployment/web-framework#with-nextjs-on-vercel)
|
|
50
|
+
- [With Astro on Vercel](/docs/v1/deployment/web-framework#with-astro-on-vercel)
|
|
51
|
+
- [With Astro on Netlify](/docs/v1/deployment/web-framework#with-astro-on-netlify)
|
|
74
52
|
|
|
75
|
-
|
|
53
|
+
### Mastra Cloud
|
|
76
54
|
|
|
77
|
-
|
|
78
|
-
- Authentication and request handling
|
|
79
|
-
- Retries and error handling
|
|
80
|
-
- Support for streaming responses
|
|
55
|
+
We're building Mastra Cloud to be the easiest place to deploy and observe your Mastra agents. It's currently in beta.
|
|
81
56
|
|
|
82
|
-
[
|
|
57
|
+
Learn more in the [Mastra Cloud docs](/docs/v1/mastra-cloud/overview).
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Web Framework
|
|
2
|
+
title: "Deploy with a Web Framework | Deployment"
|
|
3
3
|
description: "Learn how Mastra can be deployed when integrated with a Web Framework"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Web Framework
|
|
6
|
+
# Deploy with a Web Framework
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
When Mastra is integrated with a web framework, it deploys alongside your application using the framework's standard deployment process. Follow the instructions below to ensure your Mastra integration deploys correctly.
|
|
9
|
+
|
|
10
|
+
:::warning
|
|
11
|
+
If you're deploying to a cloud provider, remove any usage of [LibSQLStore](/docs/v1/memory/storage/overview) from your Mastra configuration. LibSQLStore requires filesystem access and is not compatible with serverless platforms.
|
|
12
|
+
:::
|
|
13
|
+
|
|
14
|
+
Integration guides:
|
|
9
15
|
|
|
10
16
|
- [With Next.js](/guides/v1/getting-started/next-js)
|
|
11
17
|
- [With Astro](/guides/v1/getting-started/astro)
|
|
12
18
|
|
|
13
|
-
When integrated with a framework, Mastra typically requires no additional configuration for deployment.
|
|
14
|
-
|
|
15
19
|
## With Next.js on Vercel
|
|
16
20
|
|
|
17
|
-
If you've integrated Mastra with Next.js [by following our guide](/guides/v1/getting-started/next-js) and plan to deploy to Vercel,
|
|
18
|
-
|
|
19
|
-
The only thing to verify is that you've added the following to your `next.config.ts` and removed any usage of [LibSQLStore](/docs/v1/deployment/overview), which is not supported in serverless environments:
|
|
21
|
+
If you've integrated Mastra with Next.js [by following our guide](/guides/v1/getting-started/next-js) and plan to deploy to Vercel, add `serverExternalPackages: ["@mastra/*"]` to your `next.config.ts`:
|
|
20
22
|
|
|
21
23
|
```typescript {4} title="next.config.ts" showLineNumbers copy
|
|
22
24
|
import type { NextConfig } from "next";
|
|
@@ -30,9 +32,7 @@ export default nextConfig;
|
|
|
30
32
|
|
|
31
33
|
## With Astro on Vercel
|
|
32
34
|
|
|
33
|
-
If you've integrated Mastra with Astro [by following our guide](/guides/v1/getting-started/astro) and plan to deploy to Vercel,
|
|
34
|
-
|
|
35
|
-
The only thing to verify is that you've added the following to your `astro.config.mjs` and removed any usage of [LibSQLStore](/docs/v1/deployment/overview), which is not supported in serverless environments:
|
|
35
|
+
If you've integrated Mastra with Astro [by following our guide](/guides/v1/getting-started/astro) and plan to deploy to Vercel, add the Vercel adapter and server output to your `astro.config.mjs`:
|
|
36
36
|
|
|
37
37
|
```javascript {2,6,7} title="astro.config.mjs" showLineNumbers copy
|
|
38
38
|
import { defineConfig } from "astro/config";
|
|
@@ -47,9 +47,7 @@ export default defineConfig({
|
|
|
47
47
|
|
|
48
48
|
## With Astro on Netlify
|
|
49
49
|
|
|
50
|
-
If you've integrated Mastra with Astro [by following our guide](/guides/v1/getting-started/astro) and plan to deploy to Netlify,
|
|
51
|
-
|
|
52
|
-
The only thing to verify is that you've added the following to your `astro.config.mjs` and removed any usage of [LibSQLStore](/docs/v1/deployment/overview), which is not supported in serverless environments:
|
|
50
|
+
If you've integrated Mastra with Astro [by following our guide](/guides/v1/getting-started/astro) and plan to deploy to Netlify, add the Netlify adapter and server output to your `astro.config.mjs`:
|
|
53
51
|
|
|
54
52
|
```javascript {2,6,7} title="astro.config.mjs" showLineNumbers copy
|
|
55
53
|
import { defineConfig } from "astro/config";
|
|
@@ -75,6 +75,63 @@ If you followed the automatic installation, you'll see a popup when you open cur
|
|
|
75
75
|
|
|
76
76
|
[More info on using MCP servers with Cursor](https://cursor.com/de/docs/context/mcp)
|
|
77
77
|
|
|
78
|
+
### Antigravity
|
|
79
|
+
|
|
80
|
+
Google Antigravity is an agent-first development platform that supports MCP servers for accessing external documentation, APIs, and project context.
|
|
81
|
+
|
|
82
|
+
1. Open your Antigravity MCP configuration file:
|
|
83
|
+
- Click on **Agent session** and select the **“…” dropdown** at the top of the editor’s side panel, then select **MCP Servers** to access the **MCP Store**.
|
|
84
|
+
- You can access it through the MCP Store interface in Antigravity
|
|
85
|
+
|
|
86
|
+
<img
|
|
87
|
+
src="/img/antigravity_mcp_server.png"
|
|
88
|
+
alt="Antigravity interface showing configured Mastra MCP server"
|
|
89
|
+
width={800}
|
|
90
|
+
className="rounded-lg"
|
|
91
|
+
/>
|
|
92
|
+
|
|
93
|
+
2. To add a custom MCP server, select **Manage MCP Servers** at the top of the MCP Store and click **View raw config** in the main tab.
|
|
94
|
+
<img
|
|
95
|
+
src="/img/antigravity_managed_mcp.png"
|
|
96
|
+
alt="Antigravity interface showing configured Mastra MCP server"
|
|
97
|
+
width={800}
|
|
98
|
+
className="rounded-lg"
|
|
99
|
+
/>
|
|
100
|
+
|
|
101
|
+
3. Add the Mastra MCP server configuration:
|
|
102
|
+
|
|
103
|
+
```json copy
|
|
104
|
+
{
|
|
105
|
+
"mcpServers": {
|
|
106
|
+
"mastra-docs": {
|
|
107
|
+
"command": "npx",
|
|
108
|
+
"args": [
|
|
109
|
+
"-y",
|
|
110
|
+
"@mastra/mcp-docs-server"
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
4. Save the configuration and restart Antigravity
|
|
118
|
+
<img
|
|
119
|
+
src="/img/antigravity_final_interface_mcp.png"
|
|
120
|
+
alt="Antigravity interface showing configured Mastra MCP server"
|
|
121
|
+
width={800}
|
|
122
|
+
className="rounded-lg"
|
|
123
|
+
/>
|
|
124
|
+
|
|
125
|
+
Once configured, the Mastra MCP server exposes the following to Antigravity agents:
|
|
126
|
+
- Indexed documentation and API schemas for Mastra, enabling programmatic retrieval of relevant context during code generation
|
|
127
|
+
- Access to example code snippets and usage patterns stored in Mastra Docs
|
|
128
|
+
- Structured data for error handling and debugging references in the editor
|
|
129
|
+
- Metadata about current Mastra project patterns for code suggestion and completion
|
|
130
|
+
|
|
131
|
+
The MCP server will appear in Antigravity's MCP Store, where you can manage its connection status and authentication if needed.
|
|
132
|
+
|
|
133
|
+
[More info on using MCP servers with Antigravity](https://antigravity.google)
|
|
134
|
+
|
|
78
135
|
### Visual Studio Code
|
|
79
136
|
|
|
80
137
|
1. Create a `.vscode/mcp.json` file in your workspace
|
|
@@ -6,6 +6,7 @@ description: Choose how to get started with Mastra - quickstart, framework integ
|
|
|
6
6
|
import { CardGrid, CardGridItem } from "@site/src/components/cards/card-grid";
|
|
7
7
|
|
|
8
8
|
# Start
|
|
9
|
+
|
|
9
10
|
Create a new Mastra project, or integrate Mastra with your preferred framework to start building.
|
|
10
11
|
|
|
11
12
|
## New project
|
|
@@ -62,11 +63,19 @@ Integrate Mastra with SvelteKit
|
|
|
62
63
|
href="/guides/v1/getting-started/express"
|
|
63
64
|
logo={<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 861.6297 500" width="32" height="32"><path d="M822.05434 464.78529c-23.57102 8.91305-50.08664-1.16881-61.78139-23.49073l-112.4692-155.53981-16.30803-21.72701-130.51543 177.49688c-11.00437 21.35391-36.14786 31.22309-58.7396 23.05618l168.14149-225.57746L453.94772 35.178469c23.20955-8.38407 49.07747.715704 61.98587 21.727011l116.55901 157.4569L749.74175 57.518928c11.0937-21.002063 36.16603-30.356097 58.30506-21.752557l-60.70782 80.543289-82.23033 107.02469c-9.6735 8.63851-9.6735 23.77308 0 32.41158l156.61338 209.03936ZM39.626477 236.19163l13.700796-67.66046C90.953337 34.743916 244.32044-20.928337 349.83703 61.941017 411.61839 110.45615 427.0318 179.1902 424.01558 256.64057H75.94892C70.325459 394.9777 170.14188 478.51165 297.82 435.87559c42.0737-15.33669 73.74401-50.3044 84.17297-93.75842 6.74816-21.72701 17.89283-25.45896 38.29067-19.1709-6.89256 53.65922-37.9963 101.20027-84.40304 129.00732-77.62638 42.45286-173.75024 30.1679-238.204672-30.44338-31.082401-34.94215-49.844311-79.11186-53.49956-125.76104 0-7.66837-2.556118-14.82549-4.345401-21.727-.170408-12.89987-.255612-25.51006-.255612-37.83054zm36.756986-9.35539H391.14389c-1.96821-100.27654-65.2577-171.413323-149.66074-172.077907C147.52023 53.480264 80.294322 123.05782 76.153409 226.40169Z" fill="currentColor"/></svg>}
|
|
64
65
|
>
|
|
65
|
-
|
|
66
|
+
Integrate Mastra with the Express server adapter
|
|
67
|
+
</CardGridItem>
|
|
68
|
+
<CardGridItem
|
|
69
|
+
title="Hono"
|
|
70
|
+
href="/guides/v1/getting-started/hono"
|
|
71
|
+
logo={<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 76 98" width="32" height="32"><path fill="url(#a)" d="m11 25 7 9s9-18 22-34c17 20 36 48 36 64 0 20-19 34-37 34C17 98 0 81 0 61c0-6 3-24 11-36Z"/><path fill="#F95" d="M39 21c47 51 14 66 0 66-11 0-51-11 0-66Z"/><defs><linearGradient id="a" x2="0%" y2="100%"><stop stop-color="#F84"/><stop offset="100%" stop-color="#F30"/></linearGradient></defs></svg>}
|
|
72
|
+
>
|
|
73
|
+
Integrate Mastra with the Hono server adapter
|
|
66
74
|
</CardGridItem>
|
|
67
75
|
</CardGrid>
|
|
68
76
|
|
|
69
77
|
Mastra works great with agentic UI frameworks like [AI SDK UI](/guides/v1/build-your-ui/ai-sdk-ui), [CopilotKit](/guides/v1/build-your-ui/copilotkit), and [Assistant UI](/guides/v1/build-your-ui/assistant-ui). Use them with any of the frontend frameworks above to stream agent responses, render tools, and build chat interfaces.
|
|
70
78
|
|
|
71
79
|
## Start from a template
|
|
80
|
+
|
|
72
81
|
Have a use case in mind? Start with a pre-built [template](https://mastra.ai/templates) from Mastra or our community.
|
|
@@ -101,7 +101,7 @@ The Scorers tab displays the results of your agent's scorers as they run. When m
|
|
|
101
101
|
|
|
102
102
|
## REST API
|
|
103
103
|
|
|
104
|
-
The local development server exposes a complete set of REST API routes, allowing you to programmatically interact with your agents, workflows, and tools during development. This is particularly helpful if you plan to deploy the Mastra server, since the local development server uses the exact same API routes as the [Mastra Server](/docs/v1/server
|
|
104
|
+
The local development server exposes a complete set of REST API routes, allowing you to programmatically interact with your agents, workflows, and tools during development. This is particularly helpful if you plan to deploy the Mastra server, since the local development server uses the exact same API routes as the [Mastra Server](/docs/v1/server/mastra-server), allowing you to develop and test against it with full parity.
|
|
105
105
|
|
|
106
106
|
You can explore all available endpoints in the OpenAPI specification at http://localhost:4111/openapi.json, which details every endpoint and its request and response schemas.
|
|
107
107
|
|
|
@@ -113,7 +113,7 @@ The OpenAPI and Swagger endpoints are disabled in production by default. To enab
|
|
|
113
113
|
|
|
114
114
|
## Configuration
|
|
115
115
|
|
|
116
|
-
### Port
|
|
116
|
+
### Port and Host
|
|
117
117
|
|
|
118
118
|
By default, the development server runs at http://localhost:4111. You can change the `host` and `port` in the Mastra server configuration:
|
|
119
119
|
|
|
@@ -128,6 +128,29 @@ export const mastra = new Mastra({
|
|
|
128
128
|
});
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
+
### Sub-path Hosting
|
|
132
|
+
|
|
133
|
+
You can host the Mastra Studio on a sub-path of your existing application using the `studioBase` configuration:
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
import { Mastra } from "@mastra/core";
|
|
137
|
+
|
|
138
|
+
export const mastra = new Mastra({
|
|
139
|
+
server: {
|
|
140
|
+
studioBase: "/my-mastra-studio",
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
This is particularly useful when:
|
|
146
|
+
- Integrating with existing applications
|
|
147
|
+
- Using authentication tools like Cloudflare Zero Trust that benefit from shared domains
|
|
148
|
+
- Managing multiple services under a single domain
|
|
149
|
+
|
|
150
|
+
**Example URLs:**
|
|
151
|
+
- Default: `http://localhost:4111/` (studio at root)
|
|
152
|
+
- With `studioBase`: `http://localhost:4111/my-mastra-studio/` (studio at sub-path)
|
|
153
|
+
|
|
131
154
|
### Local HTTPS
|
|
132
155
|
|
|
133
156
|
Mastra supports local HTTPS development through the [`--https`](/reference/v1/cli/mastra#--https) flag, which automatically creates and manages certificates for your project. When you run `mastra dev --https`, a private key and certificate are generated for localhost (or your configured host). For custom certificate management, you can provide your own key and certificate files through the server configuration:
|