@mastra/mcp-docs-server 0.13.1 → 0.13.2-alpha.1
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 +21 -0
- package/.docs/organized/changelogs/%40mastra%2Fagui.md +37 -0
- package/.docs/organized/changelogs/%40mastra%2Fastra.md +25 -25
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +48 -48
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +71 -71
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +62 -62
- package/.docs/organized/changelogs/%40mastra%2Fcloud.md +25 -25
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +68 -68
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +37 -37
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +64 -64
- package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +37 -31
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +80 -80
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +77 -77
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +73 -73
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +94 -94
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +80 -41
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +36 -36
- package/.docs/organized/changelogs/%40mastra%2Ffirecrawl.md +42 -42
- package/.docs/organized/changelogs/%40mastra%2Fgithub.md +36 -36
- package/.docs/organized/changelogs/%40mastra%2Flance.md +59 -0
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +62 -62
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +65 -65
- package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +45 -45
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +56 -56
- package/.docs/organized/changelogs/%40mastra%2Fmem0.md +36 -36
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +58 -58
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +74 -74
- package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +47 -0
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +75 -75
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +14 -14
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +107 -107
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +37 -37
- package/.docs/organized/changelogs/%40mastra%2Frag.md +41 -41
- package/.docs/organized/changelogs/%40mastra%2Fragie.md +36 -36
- package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +6 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +61 -61
- package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +37 -37
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +75 -75
- package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +14 -14
- package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +24 -24
- package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +36 -36
- package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +36 -36
- package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +36 -36
- package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +34 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +36 -36
- package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +37 -37
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +25 -25
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +36 -36
- package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +36 -36
- package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +36 -36
- package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +36 -36
- package/.docs/organized/changelogs/create-mastra.md +35 -35
- package/.docs/organized/changelogs/mastra.md +116 -116
- package/.docs/organized/code-examples/a2a.md +1 -1
- package/.docs/organized/code-examples/agent-network.md +125 -7
- package/.docs/organized/code-examples/agent.md +1 -1
- package/.docs/organized/code-examples/agui.md +4 -4
- package/.docs/organized/code-examples/ai-sdk-useChat.md +6 -6
- package/.docs/organized/code-examples/assistant-ui.md +5 -5
- package/.docs/organized/code-examples/bird-checker-with-express.md +1 -1
- package/.docs/organized/code-examples/bird-checker-with-nextjs-and-eval.md +5 -5
- package/.docs/organized/code-examples/bird-checker-with-nextjs.md +5 -5
- package/.docs/organized/code-examples/client-side-tools.md +6 -6
- package/.docs/organized/code-examples/crypto-chatbot.md +4 -4
- package/.docs/organized/code-examples/experimental-auth-weather-agent.md +1 -1
- package/.docs/organized/code-examples/fireworks-r1.md +1 -1
- package/.docs/organized/code-examples/mcp-configuration.md +2 -2
- package/.docs/organized/code-examples/mcp-registry-registry.md +1 -1
- package/.docs/organized/code-examples/memory-per-resource-example.md +236 -0
- package/.docs/organized/code-examples/memory-with-mem0.md +1 -1
- package/.docs/organized/code-examples/memory-with-processors.md +1 -1
- package/.docs/organized/code-examples/openapi-spec-writer.md +5 -5
- package/.docs/organized/code-examples/quick-start.md +1 -1
- package/.docs/organized/code-examples/stock-price-tool.md +1 -1
- package/.docs/organized/code-examples/weather-agent.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/raw/frameworks/agentic-uis/copilotkit.mdx +53 -10
- package/.docs/raw/local-dev/mastra-dev.mdx +103 -105
- package/.docs/raw/mastra-cloud/dashboard.mdx +100 -0
- package/.docs/raw/mastra-cloud/observability.mdx +24 -138
- package/.docs/raw/mastra-cloud/overview.mdx +50 -42
- package/.docs/raw/mastra-cloud/setting-up.mdx +51 -87
- package/.docs/raw/memory/overview.mdx +4 -0
- package/.docs/raw/memory/working-memory.mdx +88 -1
- package/.docs/raw/observability/nextjs-tracing.mdx +2 -2
- package/.docs/raw/reference/storage/libsql.mdx +1 -0
- package/.docs/raw/reference/tools/vector-query-tool.mdx +1 -0
- package/.docs/raw/reference/workflows/sleep.mdx +43 -0
- package/.docs/raw/reference/workflows/sleepUntil.mdx +43 -0
- package/.docs/raw/reference/workflows/waitForEvent.mdx +49 -0
- package/.docs/raw/storage/overview.mdx +50 -1
- package/.docs/raw/tools-mcp/mcp-overview.mdx +52 -0
- package/.docs/raw/workflows/inngest-workflow.mdx +1 -1
- package/.docs/raw/workflows/input-data-mapping.mdx +4 -4
- package/.docs/raw/workflows/pausing-execution.mdx +60 -0
- package/package.json +6 -6
- package/.docs/raw/local-dev/add-to-existing-project.mdx +0 -43
- package/.docs/raw/local-dev/creating-a-new-project.mdx +0 -53
- package/.docs/raw/mastra-cloud/deploying.mdx +0 -142
|
@@ -309,4 +309,56 @@ const server = new MCPServer({
|
|
|
309
309
|
For an agent to be exposed as a tool, it must have a non-empty `description` string. Similarly, for a workflow to be exposed, its `description` must also be a non-empty string. If the description is missing or empty for either, `MCPServer` will throw an error during initialization.
|
|
310
310
|
Workflows will use their `inputSchema` for the tool's input.
|
|
311
311
|
|
|
312
|
+
### Tools with Structured Outputs
|
|
313
|
+
|
|
314
|
+
You can define an `outputSchema` for your tools to enforce a specific structure for the tool's output. This is useful for ensuring that the tool returns data in a consistent and predictable format, which can then be validated by the client.
|
|
315
|
+
|
|
316
|
+
When a tool includes an `outputSchema`, its `execute` function **must** return an object containing a `structuredContent` property. The value of `structuredContent` must conform to the `outputSchema`. Mastra will automatically validate this output on both the server and client sides.
|
|
317
|
+
|
|
318
|
+
Here's an example of a tool with an `outputSchema`:
|
|
319
|
+
|
|
320
|
+
```typescript filename="src/tools/structured-tool.ts"
|
|
321
|
+
import { createTool } from '@mastra/core';
|
|
322
|
+
import { z } from 'zod';
|
|
323
|
+
|
|
324
|
+
export const structuredTool = createTool({
|
|
325
|
+
description: 'A test tool that returns structured data.',
|
|
326
|
+
parameters: z.object({
|
|
327
|
+
input: z.string().describe('Some input string.'),
|
|
328
|
+
}),
|
|
329
|
+
outputSchema: z.object({
|
|
330
|
+
processedInput: z.string().describe('The processed input string.'),
|
|
331
|
+
timestamp: z.string().describe('An ISO timestamp.'),
|
|
332
|
+
}),
|
|
333
|
+
execute: async ({ input }) => {
|
|
334
|
+
// When outputSchema is defined, you must return a structuredContent object
|
|
335
|
+
return {
|
|
336
|
+
structuredContent: {
|
|
337
|
+
processedInput: `processed: ${input}`,
|
|
338
|
+
timestamp: new Date().toISOString(),
|
|
339
|
+
},
|
|
340
|
+
};
|
|
341
|
+
},
|
|
342
|
+
});
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
When this tool is called, the MCP client will receive both the structured data and a text representation of it.
|
|
346
|
+
|
|
347
|
+
```
|
|
348
|
+
Tool result
|
|
349
|
+
|
|
350
|
+
{
|
|
351
|
+
"content": [
|
|
352
|
+
{
|
|
353
|
+
"type": "text",
|
|
354
|
+
"text": "{\"processedInput\": \"hello\", \"timestamp\": \"2025-06-19T16:53:16.472Z\"}"
|
|
355
|
+
}
|
|
356
|
+
],
|
|
357
|
+
"structuredContent": {
|
|
358
|
+
"processedInput": "processed: hello",
|
|
359
|
+
"timestamp": "2025-06-19T16:53:16.472Z",
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
```
|
|
363
|
+
|
|
312
364
|
For detailed usage and examples, see the [`MCPServer` reference documentation](/reference/tools/mcp-server).
|
|
@@ -163,7 +163,7 @@ export const mastra = new Mastra({
|
|
|
163
163
|
```sh
|
|
164
164
|
docker run --rm -p 8288:8288 \
|
|
165
165
|
inngest/inngest \
|
|
166
|
-
inngest dev -u http://host.docker.internal:4111/inngest
|
|
166
|
+
inngest dev -u http://host.docker.internal:4111/api/inngest
|
|
167
167
|
```
|
|
168
168
|
|
|
169
169
|
> **Note:** The URL after `-u` tells the Inngest dev server where to find your Mastra `/api/inngest` endpoint.
|
|
@@ -85,10 +85,10 @@ You can rename step outputs using the object syntax in `.map()`. In the example
|
|
|
85
85
|
```typescript {3} showLineNumbers
|
|
86
86
|
.then(step)
|
|
87
87
|
.map({
|
|
88
|
-
details: {
|
|
88
|
+
details: mapVariable({
|
|
89
89
|
step: step,
|
|
90
90
|
path: "value"
|
|
91
|
-
}
|
|
91
|
+
})
|
|
92
92
|
})
|
|
93
93
|
```
|
|
94
94
|
|
|
@@ -111,9 +111,9 @@ export const testWorkflow = createWorkflow({
|
|
|
111
111
|
testWorkflow
|
|
112
112
|
.then(cityCoordinatesStep)
|
|
113
113
|
.map({
|
|
114
|
-
details: {
|
|
114
|
+
details: mapVariable({
|
|
115
115
|
initData: testWorkflow,
|
|
116
116
|
path: "value"
|
|
117
|
-
}
|
|
117
|
+
})
|
|
118
118
|
})
|
|
119
119
|
```
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Pausing Execution | Mastra Docs"
|
|
3
|
+
description: "Pausing execution in Mastra workflows allows you to pause execution while waiting for external input or resources via .sleep(), .sleepUntil() and .waitForEvent()."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Sleep & Events
|
|
7
|
+
|
|
8
|
+
Pausing execution in Mastra workflows allows you to pause execution while waiting for external input or resources via `sleep()`, `sleepUntil()` and `waitForEvent()`.
|
|
9
|
+
|
|
10
|
+
This sets the workflow status to `waiting`.
|
|
11
|
+
|
|
12
|
+
## sleep()
|
|
13
|
+
|
|
14
|
+
`sleep()` pauses execution for a specified number of milliseconds.
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
workflow
|
|
18
|
+
.then(step1)
|
|
19
|
+
.sleep(1000)
|
|
20
|
+
.then(step2)
|
|
21
|
+
.commit();
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## sleepUntil()
|
|
25
|
+
|
|
26
|
+
`sleepUntil()` pauses execution until a specified date.
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
workflow
|
|
30
|
+
.then(step1)
|
|
31
|
+
.sleepUntil(new Date(Date.now() + 1000))
|
|
32
|
+
.then(step2)
|
|
33
|
+
.commit();
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## waitForEvent()
|
|
37
|
+
|
|
38
|
+
`waitForEvent()` pauses execution until an event is received. Events can be sent to the workflow using `run.sendEvent()`. The event name and the step to resume after the event is received are provided as arguments to `waitForEvent()`.
|
|
39
|
+
|
|
40
|
+
`.sendEvent()` takes as arguments the event name and the event data. The event data is optional and can be any JSON-serializable value.
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
43
|
+
workflow
|
|
44
|
+
.then(step1)
|
|
45
|
+
.waitForEvent('my-event-name', step2)
|
|
46
|
+
.then(step3)
|
|
47
|
+
.commit();
|
|
48
|
+
|
|
49
|
+
const run = await workflow.createRun()
|
|
50
|
+
run.start({})
|
|
51
|
+
|
|
52
|
+
setTimeout(() => {
|
|
53
|
+
run.sendEvent('my-event-name', {
|
|
54
|
+
data1: 'hello',
|
|
55
|
+
data2: {
|
|
56
|
+
anyData: 12
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
}, 2e3)
|
|
60
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "0.13.1",
|
|
3
|
+
"version": "0.13.2-alpha.1",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -24,15 +24,15 @@
|
|
|
24
24
|
"author": "",
|
|
25
25
|
"license": "Elastic-2.0",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
27
|
+
"@modelcontextprotocol/sdk": "^1.13.0",
|
|
28
28
|
"date-fns": "^4.1.0",
|
|
29
29
|
"exit-hook": "^4.0.0",
|
|
30
30
|
"jsdom": "^26.1.0",
|
|
31
31
|
"turndown": "^7.2.0",
|
|
32
32
|
"uuid": "^11.1.0",
|
|
33
|
-
"zod": "^3.25.
|
|
33
|
+
"zod": "^3.25.67",
|
|
34
34
|
"zod-to-json-schema": "^3.24.5",
|
|
35
|
-
"@mastra/mcp": "^0.10.
|
|
35
|
+
"@mastra/mcp": "^0.10.5-alpha.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@hono/node-server": "^1.14.4",
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"@types/turndown": "^5.0.5",
|
|
42
42
|
"@wong2/mcp-cli": "^1.10.0",
|
|
43
43
|
"cross-env": "^7.0.3",
|
|
44
|
-
"eslint": "^9.
|
|
44
|
+
"eslint": "^9.29.0",
|
|
45
45
|
"hono": "^4.7.11",
|
|
46
46
|
"tsup": "^8.5.0",
|
|
47
47
|
"tsx": "^4.19.4",
|
|
48
48
|
"typescript": "^5.8.3",
|
|
49
49
|
"vitest": "^3.2.3",
|
|
50
50
|
"@internal/lint": "0.0.13",
|
|
51
|
-
"@mastra/core": "0.10.
|
|
51
|
+
"@mastra/core": "0.10.7-alpha.2"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@mastra/core": "^0.10.0-alpha.0"
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Adding to an Existing Project | Mastra Local Development Docs"
|
|
3
|
-
description: "Add Mastra to your existing Node.js applications"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Adding to an Existing Project
|
|
7
|
-
|
|
8
|
-
You can add Mastra to an existing project using the CLI:
|
|
9
|
-
|
|
10
|
-
```bash npm2yarn copy
|
|
11
|
-
npm install -g mastra@latest
|
|
12
|
-
mastra init
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Changes made to project:
|
|
16
|
-
|
|
17
|
-
1. Creates `src/mastra` directory with entry point
|
|
18
|
-
2. Adds required dependencies
|
|
19
|
-
3. Configures TypeScript compiler options
|
|
20
|
-
|
|
21
|
-
## Interactive Setup
|
|
22
|
-
|
|
23
|
-
Running commands without arguments starts a CLI prompt for:
|
|
24
|
-
|
|
25
|
-
1. Component selection
|
|
26
|
-
2. LLM provider configuration
|
|
27
|
-
3. API key setup
|
|
28
|
-
4. Example code inclusion
|
|
29
|
-
|
|
30
|
-
## Non-Interactive Setup
|
|
31
|
-
|
|
32
|
-
To initialize mastra in non-interactive mode use the following command arguments:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
Arguments:
|
|
36
|
-
--components Specify components: agents, tools, workflows
|
|
37
|
-
--llm LLM provider: openai, anthropic, groq, google or cerebras
|
|
38
|
-
--llm-api-key Provider API key
|
|
39
|
-
--example Include example implementation
|
|
40
|
-
--dir Directory for Mastra files (defaults to src/)
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
For more details, refer to the [mastra init CLI documentation](../../reference/cli/init).
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Creating a new Project | Mastra Local Development Docs"
|
|
3
|
-
description: "Create new Mastra projects or add Mastra to existing Node.js applications using the CLI"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Creating a new project
|
|
7
|
-
|
|
8
|
-
You can create a new project using the `create-mastra` package:
|
|
9
|
-
|
|
10
|
-
```bash npm2yarn copy
|
|
11
|
-
npm create mastra@latest
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
You can also create a new project by using the `mastra` CLI directly:
|
|
15
|
-
|
|
16
|
-
```bash npm2yarn copy
|
|
17
|
-
npm install -g mastra@latest
|
|
18
|
-
mastra create
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Interactive Setup
|
|
22
|
-
|
|
23
|
-
Running commands without arguments starts a CLI prompt for:
|
|
24
|
-
|
|
25
|
-
1. Project name
|
|
26
|
-
1. Component selection
|
|
27
|
-
1. LLM provider configuration
|
|
28
|
-
1. API key setup
|
|
29
|
-
1. Example code inclusion
|
|
30
|
-
|
|
31
|
-
## Non-Interactive Setup
|
|
32
|
-
|
|
33
|
-
To initialize mastra in non-interactive mode use the following command arguments:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
Arguments:
|
|
37
|
-
--components Specify components: agents, tools, workflows
|
|
38
|
-
--llm-provider LLM provider: openai, anthropic, groq, google, or cerebras
|
|
39
|
-
--add-example Include example implementation
|
|
40
|
-
--llm-api-key Provider API key
|
|
41
|
-
--project-name Project name that will be used in package.json and as the project directory name
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Generated project structure:
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
my-project/
|
|
48
|
-
├── src/
|
|
49
|
-
│ └── mastra/
|
|
50
|
-
│ └── index.ts # Mastra entry point
|
|
51
|
-
├── package.json
|
|
52
|
-
└── tsconfig.json
|
|
53
|
-
```
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Deploying to Mastra Cloud
|
|
3
|
-
description: GitHub-based deployment process for Mastra applications
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Deploying to Mastra Cloud
|
|
7
|
-
|
|
8
|
-
> **Beta Notice**
|
|
9
|
-
> Mastra Cloud is currently in **public beta**.
|
|
10
|
-
|
|
11
|
-
This page describes the deployment process for Mastra applications to Mastra Cloud using GitHub integration.
|
|
12
|
-
|
|
13
|
-
## Prerequisites
|
|
14
|
-
|
|
15
|
-
- A GitHub account
|
|
16
|
-
- A GitHub repository containing a Mastra application
|
|
17
|
-
- Access to Mastra Cloud
|
|
18
|
-
|
|
19
|
-
## Deployment Process
|
|
20
|
-
|
|
21
|
-
Mastra Cloud uses a Git-based deployment workflow similar to platforms like Vercel and Netlify:
|
|
22
|
-
|
|
23
|
-
1. **Import GitHub Repository**
|
|
24
|
-
|
|
25
|
-
- From the Projects dashboard, click "Add new"
|
|
26
|
-
- Select the repository containing your Mastra application
|
|
27
|
-
- Click "Import" next to the desired repository
|
|
28
|
-
|
|
29
|
-
2. **Configure Deployment Settings**
|
|
30
|
-
|
|
31
|
-
- Set the project name (defaults to repository name)
|
|
32
|
-
- Select branch to deploy (typically `main`)
|
|
33
|
-
- Configure the Mastra directory path (defaults to `src/mastra`)
|
|
34
|
-
- Add necessary environment variables (like API keys)
|
|
35
|
-
|
|
36
|
-
3. **Deploy from Git**
|
|
37
|
-
- After initial configuration, deployments are triggered by pushes to the selected branch
|
|
38
|
-
- Mastra Cloud automatically builds and deploys your application
|
|
39
|
-
- Each deployment creates an atomic snapshot of your agents and workflows
|
|
40
|
-
|
|
41
|
-
## Automatic Deployments
|
|
42
|
-
|
|
43
|
-
Mastra Cloud follows a Git-driven workflow:
|
|
44
|
-
|
|
45
|
-
1. Make changes to your Mastra application locally
|
|
46
|
-
2. Commit changes to the `main` branch
|
|
47
|
-
3. Push to GitHub
|
|
48
|
-
4. Mastra Cloud automatically detects the push and creates a new deployment
|
|
49
|
-
5. Once the build completes, your application is live
|
|
50
|
-
|
|
51
|
-
## Deployment Domains
|
|
52
|
-
|
|
53
|
-
Each project receives two URLs:
|
|
54
|
-
|
|
55
|
-
1. **Project-specific domain**: `https://[project-name].mastra.cloud`
|
|
56
|
-
|
|
57
|
-
- Example: `https://gray-acoustic-helicopter.mastra.cloud`
|
|
58
|
-
|
|
59
|
-
2. **Deployment-specific domain**: `https://[deployment-id].mastra.cloud`
|
|
60
|
-
- Example: `https://young-loud-caravan-6156280f-ad56-4ec8-9701-6bb5271fd73d.mastra.cloud`
|
|
61
|
-
|
|
62
|
-
These URLs provide direct access to your deployed agents and workflows.
|
|
63
|
-
|
|
64
|
-
## Viewing Deployments
|
|
65
|
-
|
|
66
|
-

|
|
67
|
-
|
|
68
|
-
The deployments section in the dashboard shows:
|
|
69
|
-
|
|
70
|
-
- **Title**: Deployment identifier (based on commit hash)
|
|
71
|
-
- **Status**: Current state (success or archived)
|
|
72
|
-
- **Branch**: The branch used (typically `main`)
|
|
73
|
-
- **Commit**: The Git commit hash
|
|
74
|
-
- **Updated At**: Timestamp of the deployment
|
|
75
|
-
|
|
76
|
-
Each deployment represents an atomic snapshot of your Mastra application at a specific point in time.
|
|
77
|
-
|
|
78
|
-
## Interacting with Agents
|
|
79
|
-
|
|
80
|
-

|
|
81
|
-
|
|
82
|
-
After deployment, interact with your agents:
|
|
83
|
-
|
|
84
|
-
1. Navigate to your project in the dashboard
|
|
85
|
-
2. Go to the Agents section
|
|
86
|
-
3. Select an agent to view its details and interface
|
|
87
|
-
4. Use the Chat tab to communicate with your agent
|
|
88
|
-
5. View the agent's configuration in the right panel:
|
|
89
|
-
- Model information (e.g., OpenAI)
|
|
90
|
-
- Available tools (e.g., getWeather)
|
|
91
|
-
- Complete system prompt
|
|
92
|
-
6. Use suggested prompts (like "What capabilities do you have?") or enter custom messages
|
|
93
|
-
|
|
94
|
-
The interface shows the agent's branch (typically "main") and indicates whether conversation memory is enabled.
|
|
95
|
-
|
|
96
|
-
## Monitoring Logs
|
|
97
|
-
|
|
98
|
-
The Logs section provides detailed information about your application:
|
|
99
|
-
|
|
100
|
-
- **Time**: When the log entry was created
|
|
101
|
-
- **Level**: Log level (info, debug)
|
|
102
|
-
- **Hostname**: Server identification
|
|
103
|
-
- **Message**: Detailed log information, including:
|
|
104
|
-
- API initialization
|
|
105
|
-
- Storage connections
|
|
106
|
-
- Agent and workflow activity
|
|
107
|
-
|
|
108
|
-
These logs help debug and monitor your application's behavior in the production environment.
|
|
109
|
-
|
|
110
|
-
## Workflows
|
|
111
|
-
|
|
112
|
-

|
|
113
|
-
|
|
114
|
-
The Workflows section allows you to view and interact with your deployed workflows:
|
|
115
|
-
|
|
116
|
-
1. View all workflows in your project
|
|
117
|
-
2. Examine workflow structure and steps
|
|
118
|
-
3. Access execution history and performance data
|
|
119
|
-
|
|
120
|
-
## Database Usage
|
|
121
|
-
|
|
122
|
-
Mastra Cloud tracks database utilization metrics:
|
|
123
|
-
|
|
124
|
-
- Number of reads
|
|
125
|
-
- Number of writes
|
|
126
|
-
- Storage used (MB)
|
|
127
|
-
|
|
128
|
-
These metrics appear in the project overview, helping you monitor resource consumption.
|
|
129
|
-
|
|
130
|
-
## Deployment Configuration
|
|
131
|
-
|
|
132
|
-
Configure your deployment through the dashboard:
|
|
133
|
-
|
|
134
|
-
1. Navigate to your project settings
|
|
135
|
-
2. Set environment variables (like `OPENAI_API_KEY`)
|
|
136
|
-
3. Configure project-specific settings
|
|
137
|
-
|
|
138
|
-
Changes to configuration require a new deployment to take effect.
|
|
139
|
-
|
|
140
|
-
## Next Steps
|
|
141
|
-
|
|
142
|
-
After deployment, [trace and monitor execution](./observability.mdx) using the observability tools.
|