@mastra/mcp-docs-server 0.13.5-alpha.0 → 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 (93) 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 +211 -211
  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 +185 -185
  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 +235 -235
  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 +75 -75
  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 +38 -38
  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 +73 -73
  26. package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +24 -0
  27. package/.docs/organized/changelogs/%40mastra%2Fserver.md +211 -211
  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 +126 -126
  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 +21 -33
  46. package/.docs/raw/community/licensing.mdx +27 -19
  47. package/.docs/raw/deployment/cloud-providers/amazon-ec2.mdx +60 -26
  48. package/.docs/raw/deployment/cloud-providers/digital-ocean.mdx +1 -1
  49. package/.docs/raw/deployment/cloud-providers/index.mdx +44 -9
  50. package/.docs/raw/deployment/server-deployment.mdx +56 -0
  51. package/.docs/raw/deployment/serverless-platforms/cloudflare-deployer.mdx +9 -30
  52. package/.docs/raw/deployment/serverless-platforms/index.mdx +13 -13
  53. package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +291 -216
  54. package/.docs/raw/frameworks/agentic-uis/assistant-ui.mdx +0 -34
  55. package/.docs/raw/frameworks/agentic-uis/copilotkit.mdx +162 -181
  56. package/.docs/raw/frameworks/servers/express.mdx +1 -1
  57. package/.docs/raw/frameworks/web-frameworks/astro.mdx +2 -2
  58. package/.docs/raw/frameworks/web-frameworks/next-js.mdx +1 -1
  59. package/.docs/raw/frameworks/web-frameworks/sveltekit.mdx +4 -4
  60. package/.docs/raw/frameworks/web-frameworks/vite-react.mdx +1 -1
  61. package/.docs/raw/getting-started/installation.mdx +10 -7
  62. package/.docs/raw/getting-started/model-capability.mdx +1 -1
  63. package/.docs/raw/memory/overview.mdx +8 -0
  64. package/.docs/raw/memory/semantic-recall.mdx +6 -0
  65. package/.docs/raw/observability/tracing.mdx +30 -0
  66. package/.docs/raw/rag/retrieval.mdx +24 -5
  67. package/.docs/raw/reference/agents/agent.mdx +2 -2
  68. package/.docs/raw/reference/cli/create-mastra.mdx +7 -0
  69. package/.docs/raw/reference/cli/dev.mdx +4 -3
  70. package/.docs/raw/reference/client-js/agents.mdx +8 -0
  71. package/.docs/raw/reference/memory/query.mdx +35 -14
  72. package/.docs/raw/reference/observability/providers/keywordsai.mdx +73 -0
  73. package/.docs/raw/reference/rag/rerankWithScorer.mdx +213 -0
  74. package/.docs/raw/reference/storage/mssql.mdx +108 -0
  75. package/.docs/raw/server-db/custom-api-routes.mdx +67 -0
  76. package/.docs/raw/server-db/production-server.mdx +66 -0
  77. package/.docs/raw/tools-mcp/mcp-overview.mdx +28 -7
  78. package/.docs/raw/workflows/control-flow.mdx +91 -93
  79. package/.docs/raw/workflows/input-data-mapping.mdx +31 -43
  80. package/.docs/raw/workflows/overview.mdx +22 -12
  81. package/.docs/raw/workflows/pausing-execution.mdx +49 -4
  82. package/.docs/raw/workflows/suspend-and-resume.mdx +17 -16
  83. package/.docs/raw/workflows/using-with-agents-and-tools.mdx +16 -13
  84. package/.docs/raw/workflows-legacy/overview.mdx +11 -0
  85. package/LICENSE.md +11 -42
  86. package/package.json +7 -9
  87. package/.docs/raw/deployment/custom-api-routes.mdx +0 -55
  88. package/.docs/raw/deployment/server.mdx +0 -116
  89. package/.docs/raw/frameworks/ai-sdk-v5.mdx +0 -91
  90. /package/.docs/raw/{local-dev/mastra-dev.mdx → server-db/local-dev-playground.mdx} +0 -0
  91. /package/.docs/raw/{client-js/overview.mdx → server-db/mastra-client.mdx} +0 -0
  92. /package/.docs/raw/{deployment → server-db}/middleware.mdx +0 -0
  93. /package/.docs/raw/{storage/overview.mdx → server-db/storage.mdx} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "0.13.5-alpha.0",
3
+ "version": "0.13.6",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "keywords": [],
24
24
  "author": "",
25
- "license": "Elastic-2.0",
25
+ "license": "Apache-2.0",
26
26
  "dependencies": {
27
27
  "@modelcontextprotocol/sdk": "^1.13.0",
28
28
  "date-fns": "^4.1.0",
@@ -32,7 +32,8 @@
32
32
  "uuid": "^11.1.0",
33
33
  "zod": "^3.25.67",
34
34
  "zod-to-json-schema": "^3.24.5",
35
- "@mastra/mcp": "^0.10.6-alpha.0"
35
+ "@mastra/core": "0.11.1",
36
+ "@mastra/mcp": "^0.10.7"
36
37
  },
37
38
  "devDependencies": {
38
39
  "@hono/node-server": "^1.14.4",
@@ -41,17 +42,14 @@
41
42
  "@types/turndown": "^5.0.5",
42
43
  "@wong2/mcp-cli": "^1.10.0",
43
44
  "cross-env": "^7.0.3",
44
- "eslint": "^9.29.0",
45
+ "eslint": "^9.30.1",
45
46
  "hono": "^4.8.4",
46
47
  "tsup": "^8.5.0",
47
48
  "tsx": "^4.19.4",
48
49
  "typescript": "^5.8.3",
49
50
  "vitest": "^3.2.4",
50
- "@internal/lint": "0.0.17",
51
- "@mastra/core": "0.10.11-alpha.2"
52
- },
53
- "peerDependencies": {
54
- "@mastra/core": "^0.10.0-alpha.0"
51
+ "@internal/lint": "0.0.22",
52
+ "@mastra/core": "0.11.1"
55
53
  },
56
54
  "scripts": {
57
55
  "prepare-docs": "cross-env PREPARE=true node dist/prepare-docs/prepare.js",
@@ -1,55 +0,0 @@
1
- ---
2
- title: "Custom API Routes"
3
- description: "Expose additional HTTP endpoints from your Mastra server."
4
- ---
5
-
6
- # Custom API Routes
7
-
8
- By default Mastra automatically exposes registered agents and workflows via the
9
- server. For additional behaviour you can define your own HTTP routes.
10
-
11
- Routes are provided with a helper `registerApiRoute` from `@mastra/core/server`.
12
- Routes can live in the same file as the `Mastra` instance but separating them
13
- helps keep configuration concise.
14
-
15
- ```typescript copy showLineNumbers
16
- import { Mastra } from "@mastra/core";
17
- import { registerApiRoute } from "@mastra/core/server";
18
-
19
- export const mastra = new Mastra({
20
- server: {
21
- apiRoutes: [
22
- registerApiRoute("/my-custom-route", {
23
- method: "GET",
24
- handler: async (c) => {
25
- const mastra = c.get("mastra");
26
- const agents = await mastra.getAgent("my-agent");
27
-
28
- return c.json({ message: "Hello, world!" });
29
- },
30
- }),
31
- ],
32
- },
33
- });
34
- ```
35
-
36
- Each route's handler receives the Hono `Context`. Within the handler you can
37
- access the `Mastra` instance to fetch or call agents and workflows.
38
-
39
- To add route-specific middleware pass a `middleware` array when calling
40
- `registerApiRoute`.
41
-
42
- ```typescript copy showLineNumbers
43
- registerApiRoute("/my-custom-route", {
44
- method: "GET",
45
- middleware: [
46
- async (c, next) => {
47
- console.log(`${c.req.method} ${c.req.url}`);
48
- await next();
49
- },
50
- ],
51
- handler: async (c) => {
52
- return c.json({ message: "My route with custom middleware" });
53
- },
54
- });
55
- ```
@@ -1,116 +0,0 @@
1
- ---
2
- title: "Creating A Mastra Server"
3
- description: "Configure and customize the Mastra server with middleware and other options"
4
- ---
5
-
6
- # Creating A Mastra Server
7
-
8
- While developing or when you deploy a Mastra application, it runs as an HTTP server that exposes your agents, workflows, and other functionality as API endpoints. This page explains how to configure and customize the server behavior.
9
-
10
- ## Server Architecture
11
-
12
- Mastra uses [Hono](https://hono.dev) as its underlying HTTP server framework. When you build a Mastra application using `mastra build`, it generates a Hono-based HTTP server in the `.mastra` directory.
13
-
14
- The server provides:
15
-
16
- - API endpoints for all registered agents
17
- - API endpoints for all registered workflows
18
- - Custom api route supports
19
- - Custom middleware support
20
- - Configuration of timeout
21
- - Configuration of port
22
- - Configuration of body limit
23
-
24
- See the [Middleware](/docs/deployment/middleware) and
25
- [Custom API Routes](/docs/deployment/custom-api-routes) pages for details on
26
- adding additional server behaviour.
27
-
28
- ## Server configuration
29
-
30
- You can configure server `port` and `timeout` in the Mastra instance.
31
-
32
- ```typescript copy showLineNumbers
33
- import { Mastra } from "@mastra/core";
34
-
35
- export const mastra = new Mastra({
36
- server: {
37
- port: 3000, // Defaults to 4111
38
- timeout: 10000, // Defaults to 30000 (30s)
39
- },
40
- });
41
- ```
42
-
43
- The `method` option can be one of `"GET"`, `"POST"`, `"PUT"`,
44
- `"DELETE"` or `"ALL"`. Using `"ALL"` will cause the handler to be
45
- invoked for any HTTP method that matches the path.
46
-
47
- ## Custom CORS Config
48
-
49
- Mastra allows you to configure CORS (Cross-Origin Resource Sharing) settings for your server.
50
-
51
- ```typescript copy showLineNumbers
52
- import { Mastra } from "@mastra/core";
53
-
54
- export const mastra = new Mastra({
55
- server: {
56
- cors: {
57
- origin: ["https://example.com"], // Allow specific origins or '*' for all
58
- allowMethods: ["GET", "POST", "PUT", "DELETE", "OPTIONS"],
59
- allowHeaders: ["Content-Type", "Authorization"],
60
- credentials: false,
61
- },
62
- },
63
- });
64
- ```
65
-
66
- ## Deployment
67
-
68
- Since Mastra builds to a standard Node.js server, you can deploy to any platform that runs Node.js applications:
69
-
70
- - Cloud VMs (AWS EC2, DigitalOcean Droplets, GCP Compute Engine)
71
- - Container platforms (Docker, Kubernetes)
72
- - Platform as a Service (Heroku, Railway)
73
- - Self-hosted servers
74
-
75
- ### Building
76
-
77
- Build the application:
78
-
79
- ```bash copy
80
- # Build from current directory
81
- mastra build
82
-
83
- # Or specify a directory
84
- mastra build --dir ./my-project
85
- ```
86
-
87
- The build process:
88
-
89
- 1. Locates entry file (`src/mastra/index.ts` or `src/mastra/index.js`)
90
- 2. Creates `.mastra` output directory
91
- 3. Bundles code using Rollup with tree shaking and source maps
92
- 4. Generates [Hono](https://hono.dev) HTTP server
93
-
94
- See [`mastra build`](/reference/cli/build) for all options.
95
-
96
- ### Running the Server
97
-
98
- Start the HTTP server:
99
-
100
- ```bash copy
101
- node .mastra/output/index.mjs
102
- ```
103
-
104
- ### Enable Telemetry for build output
105
-
106
- Load instrumentation for the build output like so:
107
-
108
- ```bash copy
109
- node --import=./.mastra/output/instrumentation.mjs .mastra/output/index.mjs
110
- ```
111
-
112
- ## Serverless Deployment
113
-
114
- Mastra also supports serverless deployment on Cloudflare Workers, Vercel, and Netlify.
115
-
116
- See our [Serverless Deployment](/docs/deployment/deployment) guide for setup instructions.
@@ -1,91 +0,0 @@
1
- # AI SDK v5 (beta) Migration Guide
2
-
3
- This guide covers Mastra-specific considerations when migrating from AI SDK v4 to v5 beta.
4
-
5
- Please add any feedback or bug reports to the [AI SDK v5 mega issue in Github.](https://github.com/mastra-ai/mastra/issues/5470)
6
-
7
- ## Official Migration Guide
8
-
9
- **Follow the official [AI SDK v5 Migration Guide](https://v5.ai-sdk.dev/docs/migration-guides/migration-guide-5-0)** for all AI SDK core breaking changes, package updates, and API changes.
10
-
11
- This guide covers only the Mastra-specific aspects of the migration.
12
-
13
- ## Warnings
14
-
15
- - **Data compatibility**: New data stored in v5 format will no longer work if you downgrade from the beta
16
- - **Backup recommendation**: Keep DB backups from before you upgrade to v5 beta
17
- - **Production use**: Wait for the AI SDK v5 stable release before using in production applications
18
- - **Prerelease status**: The Mastra `ai-v5` tag is a prerelease version and may have bugs
19
-
20
- ## Memory Storage
21
-
22
- Your existing AI SDK v4 data will run through our internal `MessageList` class which handles converting to/from various message formats.
23
- This includes converting from AI SDK v4->v5. This means you don't need to run any DB migrations and your data will be translated on the fly and will just work when you upgrade.
24
-
25
-
26
- ## Migration Strategy
27
-
28
- Migrating to AI SDK v5 with Mastra involves updating both your **backend** (Mastra server) and **frontend**.
29
- We provide a compatibility mode to handle stream format conversion during the transition.
30
-
31
- ### Backend Upgrade
32
-
33
- Bump Mastra to the new `ai-v5` prerelease version for all Mastra packages:
34
-
35
- ```bash npm2yarn copy
36
- npm i mastra@ai-v5 @mastra/core@ai-v5 @mastra/memory@ai-v5 [etc]
37
- ```
38
-
39
- Then configure your Mastra instance with v4 compatibility so your existing frontend will continue to work:
40
-
41
- ```typescript
42
- import { Mastra } from '@mastra/core';
43
-
44
- export const mastra = new Mastra({
45
- agents: { myAgent },
46
- aiSdkCompat: 'v4', // <- add this for compatibility
47
- });
48
- ```
49
-
50
- #### Dependencies
51
-
52
- You will need to upgrade all AI SDK dependencies to use the new v5 beta versions in your backend when you bump to the Mastra `ai-v5` prerelease tag.
53
-
54
- In most cases this will only involve bumping your model provider packages. For example: `npm i @ai-sdk/openai@2.0.0-beta.1` - refer to the [AI SDK v5 documentation](https://v5.ai-sdk.dev/docs/migration-guides/migration-guide-5-0) for more info. Some model providers do not yet have V5 versions (Openrouter for example).
55
-
56
- Also note that you need to bump all your Mastra dependencies to the new `ai-v5` tag, and you must upgrade `zod` to the latest version if you have it installed.
57
-
58
- #### Using Stream Compatibility Manually
59
-
60
- If you have a frontend that calls Mastra agents in an endpoint, you can wrap the new `response.toUIMessageStreamResponse()` manually.
61
-
62
- ```ts
63
- import { mastra } from "@/src/mastra";
64
- import { createV4CompatibleResponse } from "@mastra/core/agent";
65
-
66
- const myAgent = mastra.getAgent("weatherAgent");
67
- export async function POST(req: Request) {
68
- const { messages } = await req.json();
69
- const stream = await myAgent.stream(messages);
70
-
71
- return createV4CompatibleResponse(stream.toUIMessageStreamResponse().body!);
72
- }
73
- ```
74
-
75
- ### Using Mastra Playground
76
-
77
- Currently playground is still an AI SDK v4 frontend. For now you need to set `aiSdkCompat: 'v4'` for it to work.
78
- We'll handle this automatically for you soon.
79
-
80
- ### Frontend Upgrade
81
-
82
- When you're ready, remove the compatibility flag and upgrade your frontend:
83
-
84
- 1. Remove `aiSdkCompat: 'v4'` from your Mastra configuration
85
- 2. Follow the AI SDK guide on upgrading your frontend dependencies
86
- 3. Update your frontend code for v5 breaking changes
87
-
88
- ## Discussion and Bug Reports
89
-
90
- Please add any feedback or bug reports to the [AI SDK v5 mega issue in Github.](https://github.com/mastra-ai/mastra/issues/5470)
91
-