@mastra/mcp-docs-server 0.13.12-alpha.3 → 0.13.12-alpha.4

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 (27) hide show
  1. package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +24 -24
  2. package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +25 -25
  3. package/.docs/organized/changelogs/%40mastra%2Fcore.md +21 -21
  4. package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +33 -33
  5. package/.docs/organized/changelogs/%40mastra%2Ffirecrawl.md +23 -23
  6. package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +24 -24
  7. package/.docs/organized/changelogs/%40mastra%2Fmcp.md +24 -24
  8. package/.docs/organized/changelogs/%40mastra%2Fmemory.md +27 -27
  9. package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +27 -27
  10. package/.docs/organized/changelogs/%40mastra%2Frag.md +23 -23
  11. package/.docs/organized/changelogs/%40mastra%2Fserver.md +25 -25
  12. package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +24 -24
  13. package/.docs/organized/changelogs/create-mastra.md +3 -3
  14. package/.docs/organized/changelogs/mastra.md +30 -30
  15. package/.docs/organized/code-examples/agent.md +63 -2
  16. package/.docs/raw/deployment/server-deployment.mdx +57 -27
  17. package/.docs/raw/deployment/serverless-platforms/cloudflare-deployer.mdx +4 -7
  18. package/.docs/raw/frameworks/servers/express.mdx +135 -143
  19. package/.docs/raw/reference/agents/agent.mdx +1 -1
  20. package/.docs/raw/reference/agents/getDefaultVNextStreamOptions.mdx +1 -1
  21. package/.docs/raw/reference/agents/streamVNext.mdx +1 -1
  22. package/.docs/raw/reference/deployer/cloudflare.mdx +20 -131
  23. package/.docs/raw/reference/memory/Memory.mdx +1 -1
  24. package/.docs/raw/reference/voice/google-gemini-live.mdx +629 -0
  25. package/.docs/raw/voice/overview.mdx +21 -33
  26. package/.docs/raw/workflows/suspend-and-resume.mdx +2 -2
  27. package/package.json +4 -4
@@ -1,5 +1,28 @@
1
1
  # @mastra/voice-google
2
2
 
3
+ ## 0.10.8-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 50210fc: dependencies updates:
8
+ - Updated dependency [`@google-cloud/text-to-speech@^6.2.0` ↗︎](https://www.npmjs.com/package/@google-cloud/text-to-speech/v/6.2.0) (from `^6.1.0`, in `dependencies`)
9
+ - Updated dependencies [0a7f675]
10
+ - Updated dependencies [12cae67]
11
+ - Updated dependencies [5a37d0c]
12
+ - Updated dependencies [4bde0cb]
13
+ - Updated dependencies [1a80071]
14
+ - Updated dependencies [36a3be8]
15
+ - Updated dependencies [361757b]
16
+ - Updated dependencies [2bb9955]
17
+ - Updated dependencies [2454423]
18
+ - Updated dependencies [a44d91e]
19
+ - Updated dependencies [dfb91e9]
20
+ - Updated dependencies [a741dde]
21
+ - Updated dependencies [7cb3fc0]
22
+ - Updated dependencies [195eabb]
23
+ - Updated dependencies [b78b95b]
24
+ - @mastra/core@0.14.0-alpha.4
25
+
3
26
  ## 0.10.7
4
27
 
5
28
  ### Patch Changes
@@ -275,28 +298,5 @@
275
298
  - Updated dependencies [344f453]
276
299
  - Updated dependencies [0a3ae6d]
277
300
  - Updated dependencies [95911be]
278
- - Updated dependencies [5eb5a99]
279
- - Updated dependencies [7e632c5]
280
- - Updated dependencies [1e9fbfa]
281
- - Updated dependencies [b2ae5aa]
282
- - Updated dependencies [a7292b0]
283
- - Updated dependencies [0dcb9f0]
284
- - @mastra/core@0.10.0-alpha.1
285
-
286
- ## 0.1.19-alpha.0
287
-
288
- ### Patch Changes
289
-
290
- - Updated dependencies [f53a6ac]
291
- - Updated dependencies [eabdcd9]
292
- - Updated dependencies [90be034]
293
- - Updated dependencies [99f050a]
294
- - Updated dependencies [d0ee3c6]
295
- - Updated dependencies [23f258c]
296
- - Updated dependencies [2672a05]
297
- - @mastra/core@0.9.5-alpha.0
298
-
299
- ## 0.1.18
300
-
301
301
 
302
- ... 1073 more lines hidden. See full changelog in package directory.
302
+ ... 1096 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,7 @@
1
1
  # create-mastra
2
2
 
3
+ ## 0.10.22-alpha.3
4
+
3
5
  ## 0.10.22-alpha.2
4
6
 
5
7
  ### Patch Changes
@@ -297,6 +299,4 @@
297
299
 
298
300
  ## 0.10.6
299
301
 
300
- ### Patch Changes
301
-
302
- ... 1212 more lines hidden. See full changelog in package directory.
302
+ ... 1214 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,34 @@
1
1
  # mastra
2
2
 
3
+ ## 0.10.22-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 1d59515: Add options to playground based on modelVersion
8
+ - Updated dependencies [0a7f675]
9
+ - Updated dependencies [12cae67]
10
+ - Updated dependencies [96518cc]
11
+ - Updated dependencies [5a37d0c]
12
+ - Updated dependencies [4bde0cb]
13
+ - Updated dependencies [e1aed55]
14
+ - Updated dependencies [1a80071]
15
+ - Updated dependencies [36a3be8]
16
+ - Updated dependencies [c712849]
17
+ - Updated dependencies [361757b]
18
+ - Updated dependencies [2bb9955]
19
+ - Updated dependencies [2454423]
20
+ - Updated dependencies [a44d91e]
21
+ - Updated dependencies [dfb91e9]
22
+ - Updated dependencies [a741dde]
23
+ - Updated dependencies [95e1330]
24
+ - Updated dependencies [7cb3fc0]
25
+ - Updated dependencies [195eabb]
26
+ - Updated dependencies [33eb340]
27
+ - Updated dependencies [b78b95b]
28
+ - @mastra/core@0.14.0-alpha.4
29
+ - @mastra/deployer@0.14.0-alpha.4
30
+ - @mastra/mcp@0.10.12-alpha.1
31
+
3
32
  ## 0.10.22-alpha.2
4
33
 
5
34
  ### Patch Changes
@@ -269,34 +298,5 @@
269
298
  - Updated dependencies [b4a8df0]
270
299
  - @mastra/core@0.12.1-alpha.0
271
300
  - @mastra/mcp@0.10.9-alpha.0
272
- - @mastra/deployer@0.12.1-alpha.0
273
-
274
- ## 0.10.16
275
-
276
- ### Patch Changes
277
301
 
278
- - bc6b44a: Extract tools import from `createHonoServer`; the function now receives tools via a prop on the `options` parameter.
279
- - f442224: speech to text using voice config
280
- - 7a7754f: Fast follow scorers fixing input types, improve llm scorer reliability, fix ui to display scores that are 0
281
- - d8dec5e: add a cta to invite to deploy to cloud
282
- - 6336993: Fix workflow input form overflow
283
- - d5cc460: This change implements a fix to sourcemap mappings being off due to `removeDeployer` Babel plugin missing source map config.
284
- - f42c4c2: update peer deps for packages to latest core range
285
- - a5681f2: fix: pagination breaks trace grouping
286
- - 89d2f4e: add TTS to the playground
287
- - Updated dependencies [510e2c8]
288
- - Updated dependencies [2f72fb2]
289
- - Updated dependencies [27cc97a]
290
- - Updated dependencies [832691b]
291
- - Updated dependencies [557bb9d]
292
- - Updated dependencies [27cc97a]
293
- - Updated dependencies [3f89307]
294
- - Updated dependencies [9eda7d4]
295
- - Updated dependencies [9d49408]
296
- - Updated dependencies [bc6b44a]
297
- - Updated dependencies [41daa63]
298
- - Updated dependencies [ad0a58b]
299
- - Updated dependencies [254a36b]
300
- - Updated dependencies [2ecf658]
301
-
302
- ... 4924 more lines hidden. See full changelog in package directory.
302
+ ... 4953 more lines hidden. See full changelog in package directory.
@@ -5,6 +5,7 @@
5
5
  "dependencies": {
6
6
  "@ai-sdk/google": "^1.2.22",
7
7
  "@ai-sdk/openai": "^1.3.23",
8
+ "@ai-sdk/openai-v5": "npm:@ai-sdk/openai@2.0.0",
8
9
  "@mastra/client-js": "latest",
9
10
  "@mastra/core": "latest",
10
11
  "@mastra/evals": "latest",
@@ -14,6 +15,7 @@
14
15
  "@mastra/memory": "latest",
15
16
  "@mastra/voice-openai": "latest",
16
17
  "ai": "^4.3.16",
18
+ "ai-v5": "npm:ai@^5.0.0",
17
19
  "fetch-to-node": "^2.1.0",
18
20
  "mastra": "latest",
19
21
  "typescript": "^5.8.3",
@@ -474,7 +476,6 @@ import { Agent, InputProcessor } from '@mastra/core/agent';
474
476
  import { cookingTool } from '../tools/index.js';
475
477
  import { myWorkflow } from '../workflows/index.js';
476
478
  import { PIIDetector, LanguageDetector, PromptInjectionDetector, ModerationProcessor } from '@mastra/core/processors';
477
- import { MCPClient } from '@mastra/mcp';
478
479
  import { createAnswerRelevancyScorer } from '@mastra/evals/scorers/llm';
479
480
 
480
481
  const memory = new Memory();
@@ -696,6 +697,58 @@ export const evalAgent = new Agent({
696
697
 
697
698
  ```
698
699
 
700
+ ### mastra/agents/model-v2-agent.ts
701
+ ```typescript
702
+ import { Agent } from '@mastra/core/agent';
703
+ import { openai as openai_v5 } from '@ai-sdk/openai-v5';
704
+ import { createTool } from '@mastra/core/tools';
705
+ import { z } from 'zod';
706
+ import { cookingTool } from '../tools';
707
+ import { myWorkflow } from '../workflows';
708
+ import { Memory } from '@mastra/memory';
709
+
710
+ export const weatherInfo = createTool({
711
+ id: 'weather-info',
712
+ description: 'Fetches the current weather information for a given city',
713
+ inputSchema: z.object({
714
+ city: z.string(),
715
+ }),
716
+ execute: async ({ context }) => {
717
+ return {
718
+ city: context.city,
719
+ weather: 'sunny',
720
+ temperature_celsius: 19,
721
+ temperature_fahrenheit: 66,
722
+ humidity: 50,
723
+ wind: '10 mph',
724
+ };
725
+ },
726
+ });
727
+
728
+ const memory = new Memory();
729
+
730
+ export const chefModelV2Agent = new Agent({
731
+ name: 'Chef Agent V2 Model',
732
+ description: 'A chef agent that can help you cook great meals with whatever ingredients you have available.',
733
+ instructions: `
734
+ YOU MUST USE THE TOOL cooking-tool
735
+ You are Michel, a practical and experienced home chef who helps people cook great meals with whatever
736
+ ingredients they have available. Your first priority is understanding what ingredients and equipment the user has access to, then suggesting achievable recipes.
737
+ You explain cooking steps clearly and offer substitutions when needed, maintaining a friendly and encouraging tone throughout.
738
+ `,
739
+ model: openai_v5('gpt-4o-mini'),
740
+ tools: {
741
+ cookingTool,
742
+ weatherInfo,
743
+ },
744
+ workflows: {
745
+ myWorkflow,
746
+ },
747
+ memory,
748
+ });
749
+
750
+ ```
751
+
699
752
  ### mastra/index.ts
700
753
  ```typescript
701
754
  import { Mastra } from '@mastra/core';
@@ -705,13 +758,21 @@ import { LibSQLStore } from '@mastra/libsql';
705
758
  import { agentThatHarassesYou, chefAgent, chefAgentResponses, dynamicAgent, evalAgent } from './agents/index';
706
759
  import { myMcpServer, myMcpServerTwo } from './mcp/server';
707
760
  import { myWorkflow } from './workflows';
761
+ import { chefModelV2Agent } from './agents/model-v2-agent';
708
762
 
709
763
  const storage = new LibSQLStore({
710
764
  url: 'file:./mastra.db',
711
765
  });
712
766
 
713
767
  export const mastra = new Mastra({
714
- agents: { chefAgent, chefAgentResponses, dynamicAgent, agentThatHarassesYou, evalAgent },
768
+ agents: {
769
+ chefAgent,
770
+ chefAgentResponses,
771
+ dynamicAgent,
772
+ agentThatHarassesYou,
773
+ evalAgent,
774
+ chefModelV2Agent,
775
+ },
715
776
  logger: new PinoLogger({ name: 'Chef', level: 'debug' }),
716
777
  storage,
717
778
  mcpServers: {
@@ -1,41 +1,75 @@
1
1
  ---
2
- title: "Deploy A Mastra Server"
3
- description: "Deploy a Mastra server with middleware and other options"
2
+ title: "Deploy a Mastra Server"
3
+ description: "Learn how to deploy a Mastra server with build settings and deployment options."
4
4
  ---
5
5
 
6
- # Deploy A Mastra Server
6
+ import { FileTree } from "nextra/components";
7
7
 
8
- Mastra builds to a standard Node.js server, so you can deploy it to any platform that supports Node.js applications.
8
+ # Deploy a Mastra Server
9
9
 
10
- - Cloud VMs (AWS EC2, DigitalOcean Droplets, GCP Compute Engine)
11
- - Container platforms (Docker, Kubernetes)
12
- - Platform as a Service (Heroku, Railway)
13
- - Self-hosted servers
10
+ Mastra runs as a standard Node.js server and can be deployed across a wide range of environments.
14
11
 
15
- See the [Cloud Providers](/docs/deployment/cloud-providers/) for more information.
12
+ ## Default project structure
16
13
 
17
- ### Building
14
+ The [getting started guide](/docs/getting-started/installation) scaffolds a project with sensible defaults to help you begin quickly. By default, the CLI organizes application files under the `src/mastra/` directory, resulting in a structure similar to the following:
18
15
 
19
- Build the application:
16
+ <FileTree>
17
+ <FileTree.Folder name="src" defaultOpen>
18
+ <FileTree.Folder name="mastra" defaultOpen>
19
+ <FileTree.Folder name="agents" />
20
+ <FileTree.Folder name="tools" />
21
+ <FileTree.Folder name="workflows" />
22
+ <FileTree.File name="index.ts" />
23
+ </FileTree.Folder>
24
+ </FileTree.Folder>
25
+ <FileTree.File name="package.json" />
26
+ <FileTree.File name="tsconfig.json" />
27
+ </FileTree>
28
+
29
+ ## Building
30
+
31
+ The `mastra build` command starts the build process:
20
32
 
21
33
  ```bash copy
22
- # Build from current directory
23
34
  mastra build
35
+ ```
36
+
37
+ ### Customizing the input directory
24
38
 
25
- # Or specify a directory
26
- mastra build --dir ./my-project
39
+ If your Mastra files are located elsewhere, use the `--dir` flag to specify the custom location. The `--dir` flag tells Mastra where to find your entry point file (`index.ts` or `index.js`) and related directories.
40
+
41
+ ```bash copy
42
+ mastra build --dir ./my-project/mastra
27
43
  ```
28
44
 
29
- The build process:
45
+ ## Build process
46
+
47
+ The build process follows these steps:
30
48
 
31
- 1. Locates entry file (`src/mastra/index.ts` or `src/mastra/index.js`)
32
- 2. Creates `.mastra` output directory
33
- 3. Bundles code using Rollup with tree shaking and source maps
34
- 4. Generates [Hono](https://hono.dev) HTTP server
49
+ 1. **Locates entry file**: Finds `index.ts` or `index.js` in your specified directory (default: `src/mastra/`).
50
+ 2. **Creates build directory**: Generates a `.mastra/` directory containing:
51
+ - **`.build`**: Contains dependency analysis, bundled dependencies, and build configuration files.
52
+ - **`output`**: Contains the production-ready application bundle with `index.mjs`, `instrumentation.mjs`, and project-specific files.
53
+ 3. **Copies static assets**: Copies the `public/` folder contents to the `output` directory for serving static files.
54
+ 4. **Bundles code**: Uses Rollup with tree shaking and source maps for optimization.
55
+ 5. **Generates server**: Creates a [Hono](https://hono.dev) HTTP server ready for deployment.
35
56
 
36
- See [`mastra build`](/reference/cli/build) for all options.
57
+ ### Build output structure
37
58
 
38
- ### Running the Server
59
+ After building, Mastra creates a `.mastra/` directory with the following structure:
60
+
61
+ <FileTree>
62
+ <FileTree.Folder name=".mastra" defaultOpen>
63
+ <FileTree.Folder name=".build" />
64
+ <FileTree.Folder name="output" />
65
+ </FileTree.Folder>
66
+ </FileTree>
67
+
68
+ ### `public` folder
69
+
70
+ If a `public` folder exists in `src/mastra`, its contents are copied into the `.build/output` directory during the build process.
71
+
72
+ ## Running the Server
39
73
 
40
74
  Start the HTTP server:
41
75
 
@@ -43,14 +77,10 @@ Start the HTTP server:
43
77
  node .mastra/output/index.mjs
44
78
  ```
45
79
 
46
- ### Enable Telemetry for build output
80
+ ## Enable Telemetry
47
81
 
48
- Load instrumentation for the build output like so:
82
+ To enable telemetry and observability, load the instrumentation file:
49
83
 
50
84
  ```bash copy
51
85
  node --import=./.mastra/output/instrumentation.mjs .mastra/output/index.mjs
52
86
  ```
53
-
54
- ## Serverless Deployment
55
-
56
- Mastra also supports serverless deployment on Cloudflare Workers, Vercel, and Netlify. See [Serverless Platforms](/docs/deployment/serverless-platforms/) for more information.
@@ -24,14 +24,11 @@ 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",
28
27
  projectName: "hello-mastra",
29
- scope: "",
30
- auth: {
31
- apiToken: process.env.CLOUDFLARE_API_TOKEN!,
32
- apiEmail: "name@email.com"
33
- }
34
- })
28
+ env: {
29
+ NODE_ENV: "production",
30
+ },
31
+ }),
35
32
  });
36
33
  ```
37
34