@mastra/mcp-docs-server 1.2.17-alpha.20 → 1.2.17-alpha.21

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.
@@ -153,7 +153,7 @@ yarn add @mastra/ai-sdk@latest @ai-sdk/react ai
153
153
  bun add @mastra/ai-sdk@latest @ai-sdk/react ai
154
154
  ```
155
155
 
156
- Next, initialize AI Elements. When prompted, choose the default options:
156
+ Next, initialize AI Elements. When prompted to select a component library, choose **Radix UI**, then accept the defaults for the remaining prompts:
157
157
 
158
158
  **npm**:
159
159
 
@@ -179,6 +179,10 @@ yarn dlx ai-elements@latest
179
179
  bun x ai-elements@latest
180
180
  ```
181
181
 
182
+ > **Note:** The `ai-elements` command runs `shadcn add` against the AI Elements registry, which currently publishes Radix UI components only. Installing them into a Base UI project produces TypeScript errors, tracked in [vercel/ai-elements#383](https://github.com/vercel/ai-elements/issues/383).
183
+ >
184
+ > The component library prompt only appears when your project has no `components.json`. If you already have one, check that its `style` is a Radix option, such as `new-york` or a `radix-*` style, and not a `base-*` style, before running the command.
185
+
182
186
  This downloads the entire AI Elements UI component library into a `@/components/ai-elements` folder.
183
187
 
184
188
  ## Create a chat route
@@ -121,7 +121,7 @@ yarn add @mastra/ai-sdk@latest @ai-sdk/react ai
121
121
  bun add @mastra/ai-sdk@latest @ai-sdk/react ai
122
122
  ```
123
123
 
124
- Next, initialize AI Elements. When prompted, choose the default options:
124
+ Next, initialize AI Elements. When prompted to select a component library, choose **Radix UI**, then accept the defaults for the remaining prompts:
125
125
 
126
126
  **npm**:
127
127
 
@@ -147,6 +147,10 @@ yarn dlx ai-elements@latest
147
147
  bun x ai-elements@latest
148
148
  ```
149
149
 
150
+ > **Note:** The `ai-elements` command runs `shadcn add` against the AI Elements registry, which currently publishes Radix UI components only. Installing them into a Base UI project produces TypeScript errors, tracked in [vercel/ai-elements#383](https://github.com/vercel/ai-elements/issues/383).
151
+ >
152
+ > The component library prompt only appears when your project has no `components.json`. If you already have one, check that its `style` is a Radix option, such as `new-york` or a `radix-*` style, and not a `base-*` style, before running the command.
153
+
150
154
  This downloads the entire AI Elements UI component library into a `@/components/ai-elements` folder.
151
155
 
152
156
  ## Create a chat route
@@ -196,7 +196,7 @@ yarn add @mastra/ai-sdk@latest @ai-sdk/react ai
196
196
  bun add @mastra/ai-sdk@latest @ai-sdk/react ai
197
197
  ```
198
198
 
199
- Next, initialize AI Elements. When prompted, choose the default options:
199
+ Next, initialize AI Elements. When prompted to select a component library, choose **Radix UI**, then accept the defaults for the remaining prompts:
200
200
 
201
201
  **npm**:
202
202
 
@@ -222,6 +222,10 @@ yarn dlx ai-elements@latest
222
222
  bun x ai-elements@latest
223
223
  ```
224
224
 
225
+ > **Note:** The `ai-elements` command runs `shadcn add` against the AI Elements registry, which currently publishes Radix UI components only. Installing them into a Base UI project produces TypeScript errors, tracked in [vercel/ai-elements#383](https://github.com/vercel/ai-elements/issues/383).
226
+ >
227
+ > The component library prompt only appears when your project has no `components.json`. If you already have one, check that its `style` is a Radix option, such as `new-york` or a `radix-*` style, and not a `base-*` style, before running the command.
228
+
225
229
  This downloads the entire AI Elements UI component library into a `@/components/ai-elements` folder.
226
230
 
227
231
  ## Create a chat route
@@ -141,6 +141,15 @@ const sandbox = new RailwaySandbox({
141
141
 
142
142
  `RailwaySandbox` refreshes the checkpoint shortly before the idle timeout. Recovery restores the latest successful checkpoint. It doesn't restore running processes or filesystem writes made after the last checkpoint.
143
143
 
144
+ Set `seedCheckpointName` to provide a boot-only fallback when `checkpointName` doesn't exist yet. Railway restores `checkpointName` first when both checkpoints exist. Later snapshots write only to `checkpointName`, so each sandbox keeps an independent recovery history.
145
+
146
+ ```typescript
147
+ const sandbox = new RailwaySandbox({
148
+ checkpointName: 'project-session-42',
149
+ seedCheckpointName: 'project-base',
150
+ })
151
+ ```
152
+
144
153
  Call `snapshot()` after a filesystem update to capture the configured checkpoint immediately. It resolves without capturing when `checkpointName` isn't configured or the sandbox isn't running.
145
154
 
146
155
  ```typescript
@@ -202,6 +211,8 @@ const result = await sandbox.executeCommand('cat', ['/tmp/state.txt'])
202
211
 
203
212
  **checkpointName** (`string`): Named Railway checkpoint used to seed new sandboxes and preserve the filesystem before idle teardown. Use a unique stable name for each independent filesystem.
204
213
 
214
+ **seedCheckpointName** (`string`): Boot-only fallback checkpoint used when checkpointName has no stored state. Later snapshots continue writing to checkpointName.
215
+
205
216
  **idleTimeoutMinutes** (`number`): How long the sandbox can sit idle (no exec interaction) before Railway destroys it automatically. The valid range and default depend on your Railway plan.
206
217
 
207
218
  **networkIsolation** (`'ISOLATED' | 'PRIVATE'`): Network access mode. 'ISOLATED' allows outbound internet only; 'PRIVATE' joins the environment's private network. (Default: `'ISOLATED'`)
@@ -51,7 +51,7 @@ export const mastra = new Mastra({
51
51
 
52
52
  ## Parameters
53
53
 
54
- **version** (`'v5' | 'v6'`): Selects the AI SDK stream contract to emit. Omit it or pass 'v5' for the existing default behavior. Pass 'v6' when your app is typed against AI SDK v6 response helpers. (Default: `'v5'`)
54
+ **version** (`'v5' | 'v6' | 'v7'`): Selects the AI SDK stream contract to emit. Omit it or pass 'v5' for the existing default behavior. Pass 'v6' when your app is typed against AI SDK v6 response helpers. Pass 'v7' when your app is typed against AI SDK v7. (Default: `'v5'`)
55
55
 
56
56
  **path** (`string`): The route path (e.g., /chat or /chat/:agentId). Include :agentId for dynamic agent routing. (Default: `'/chat/:agentId'`)
57
57
 
@@ -50,7 +50,7 @@ export async function POST(req: Request) {
50
50
 
51
51
  ## Parameters
52
52
 
53
- **version** (`'v5' | 'v6'`): Selects the AI SDK stream contract to emit. Omit it or pass 'v5' for the existing default behavior. Pass 'v6' when your app is typed against AI SDK v6 response helpers. (Default: `'v5'`)
53
+ **version** (`'v5' | 'v6' | 'v7'`): Selects the AI SDK stream contract to emit. Omit it or pass 'v5' for the existing default behavior. Pass 'v6' when your app is typed against AI SDK v6 response helpers. Pass 'v7' when your app is typed against AI SDK v7. (Default: `'v5'`)
54
54
 
55
55
  **mastra** (`Mastra`): The Mastra instance containing registered agents.
56
56
 
@@ -34,7 +34,7 @@ export async function POST(req: Request) {
34
34
 
35
35
  ## Parameters
36
36
 
37
- **version** (`'v5' | 'v6'`): Selects the AI SDK stream contract to emit. Omit it or pass 'v5' for the existing default behavior. Pass 'v6' when your app is typed against AI SDK v6 response helpers. (Default: `'v5'`)
37
+ **version** (`'v5' | 'v6' | 'v7'`): Selects the AI SDK stream contract to emit. Omit it or pass 'v5' for the existing default behavior. Pass 'v6' when your app is typed against AI SDK v6 response helpers. Pass 'v7' when your app is typed against AI SDK v7. (Default: `'v5'`)
38
38
 
39
39
  **mastra** (`Mastra`): The Mastra instance to use for agent lookup and execution.
40
40
 
@@ -36,7 +36,7 @@ export async function POST(req: Request) {
36
36
 
37
37
  ## Parameters
38
38
 
39
- **version** (`'v5' | 'v6'`): Selects the AI SDK stream contract to emit. Omit it or pass 'v5' for the existing default behavior. Pass 'v6' when your app is typed against AI SDK v6 response helpers. (Default: `'v5'`)
39
+ **version** (`'v5' | 'v6' | 'v7'`): Selects the AI SDK stream contract to emit. Omit it or pass 'v5' for the existing default behavior. Pass 'v6' when your app is typed against AI SDK v6 response helpers. Pass 'v7' when your app is typed against AI SDK v7. (Default: `'v5'`)
40
40
 
41
41
  **mastra** (`Mastra`): The Mastra instance containing registered workflows.
42
42
 
@@ -49,7 +49,7 @@ export const mastra = new Mastra({
49
49
 
50
50
  ## Parameters
51
51
 
52
- **version** (`'v5' | 'v6'`): Selects the AI SDK stream contract to emit. Omit it or pass 'v5' for the existing default behavior. Pass 'v6' when your app is typed against AI SDK v6 response helpers. (Default: `'v5'`)
52
+ **version** (`'v5' | 'v6' | 'v7'`): Selects the AI SDK stream contract to emit. Omit it or pass 'v5' for the existing default behavior. Pass 'v6' when your app is typed against AI SDK v6 response helpers. Pass 'v7' when your app is typed against AI SDK v7. (Default: `'v5'`)
53
53
 
54
54
  **path** (`string`): The route path (e.g., /network or /network/:agentId). Include :agentId for dynamic agent routing. (Default: `'/network/:agentId'`)
55
55
 
@@ -44,7 +44,7 @@ export default function Chat() {
44
44
 
45
45
  **messages** (`MessageListInput`): Messages to convert. Can be a string, array of strings, a single message object, or an array of message objects in any supported format.
46
46
 
47
- **options.version** (`'v5' | 'v6'`): Selects the AI SDK message type to return. Omit it or pass 'v5' for the existing default behavior. Pass 'v6' when your app is typed against AI SDK v6 useChat() message types.
47
+ **options.version** (`'v5' | 'v6' | 'v7'`): Selects the AI SDK message type to return. Omit it or pass 'v5' for the existing default behavior. Pass 'v6' when your app is typed against AI SDK v6 useChat() message types. Pass 'v7' when your app is typed against AI SDK v7.
48
48
 
49
49
  ## Returns
50
50
 
@@ -64,7 +64,7 @@ The first parameter is the Mastra stream to convert. It can be one of:
64
64
 
65
65
  The second parameter is an options object:
66
66
 
67
- **version** (`'v5' | 'v6'`): Selects the AI SDK stream contract to emit. Omit it or pass 'v5' for the existing default behavior. Pass 'v6' when your app is typed against AI SDK v6 response helpers. (Default: `'v5'`)
67
+ **version** (`'v5' | 'v6' | 'v7'`): Selects the AI SDK stream contract to emit. Omit it or pass 'v5' for the existing default behavior. Pass 'v6' when your app is typed against AI SDK v6 response helpers. Pass 'v7' when your app is typed against AI SDK v7. (Default: `'v5'`)
68
68
 
69
69
  **from** (`'agent' | 'network' | 'workflow'`): The type of Mastra stream being converted. (Default: `'agent'`)
70
70
 
@@ -51,7 +51,7 @@ export const mastra = new Mastra({
51
51
 
52
52
  ## Parameters
53
53
 
54
- **version** (`'v5' | 'v6'`): Selects the AI SDK stream contract to emit. Omit it or pass 'v5' for the existing default behavior. Pass 'v6' when your app is typed against AI SDK v6 response helpers. (Default: `'v5'`)
54
+ **version** (`'v5' | 'v6' | 'v7'`): Selects the AI SDK stream contract to emit. Omit it or pass 'v5' for the existing default behavior. Pass 'v6' when your app is typed against AI SDK v6 response helpers. Pass 'v7' when your app is typed against AI SDK v7. (Default: `'v5'`)
55
55
 
56
56
  **path** (`string`): The route path (e.g., /workflow or /workflow/:workflowId). Include :workflowId for dynamic workflow routing. (Default: `'/api/workflows/:workflowId/stream'`)
57
57
 
@@ -266,6 +266,23 @@ For detailed configuration options and advanced usage, see the [Vector Query Too
266
266
 
267
267
  Vector store prompts define query patterns and filtering capabilities for each vector database implementation. When implementing filtering, these prompts are required in the agent's instructions to specify valid operators and syntax for each vector store implementation.
268
268
 
269
+ **MongoDB**:
270
+
271
+ ```ts
272
+ import { MONGODB_PROMPT } from '@mastra/mongodb'
273
+
274
+ export const ragAgent = new Agent({
275
+ id: 'rag-agent',
276
+ name: 'RAG Agent',
277
+ model: 'openai/gpt-5.6-sol',
278
+ instructions: `
279
+ Process queries using the provided context. Structure responses to be concise and relevant.
280
+ ${MONGODB_PROMPT}
281
+ `,
282
+ tools: { vectorQueryTool },
283
+ })
284
+ ```
285
+
269
286
  **pgVector**:
270
287
 
271
288
  ```ts
@@ -402,23 +419,6 @@ export const ragAgent = new Agent({
402
419
  })
403
420
  ```
404
421
 
405
- **MongoDB**:
406
-
407
- ```ts
408
- import { MONGODB_PROMPT } from '@mastra/mongodb'
409
-
410
- export const ragAgent = new Agent({
411
- id: 'rag-agent',
412
- name: 'RAG Agent',
413
- model: 'openai/gpt-5.6-sol',
414
- instructions: `
415
- Process queries using the provided context. Structure responses to be concise and relevant.
416
- ${MONGODB_PROMPT}
417
- `,
418
- tools: { vectorQueryTool },
419
- })
420
- ```
421
-
422
422
  **OpenSearch**:
423
423
 
424
424
  ```ts
@@ -520,7 +520,13 @@ The weights control how different factors influence the final ranking:
520
520
 
521
521
  > **Note:** For semantic scoring to work properly during re-ranking, each result must include the text content in its `metadata.text` field.
522
522
 
523
- You can also use other relevance score providers like Cohere or ZeroEntropy:
523
+ You can also use other relevance score providers like Voyage AI, Cohere, or ZeroEntropy:
524
+
525
+ ```ts
526
+ import { VoyageRelevanceScorer } from '@mastra/voyageai'
527
+
528
+ const relevanceProvider = new VoyageRelevanceScorer({ model: 'rerank-2.5' })
529
+ ```
524
530
 
525
531
  ```ts
526
532
  const relevanceProvider = new CohereRelevanceScorer('rerank-v3.5')
@@ -530,6 +536,8 @@ const relevanceProvider = new CohereRelevanceScorer('rerank-v3.5')
530
536
  const relevanceProvider = new ZeroEntropyRelevanceScorer('zerank-1')
531
537
  ```
532
538
 
539
+ Voyage AI provides dedicated reranking models: `rerank-2.5` and `rerank-2.5-lite` both allow up to 32,000 tokens for the query and any single document combined, and up to 600,000 tokens across a request. `VoyageRelevanceScorer` reads `VOYAGE_API_KEY` from the environment, or accepts an `apiKey` in its config.
540
+
533
541
  The re-ranked results combine vector similarity with semantic understanding to improve retrieval quality.
534
542
 
535
543
  For more details about re-ranking, see the [rerank()](https://mastra.ai/reference/rag/rerankWithScorer) method.
@@ -144,6 +144,15 @@ await sandbox.snapshot()
144
144
 
145
145
  Each `id` maps to one independent filesystem. Reusing the same `id` across unrelated sandboxes causes the platform to boot them from each other's checkpoint.
146
146
 
147
+ Set `seedCheckpointName` to provide a boot-only fallback when the checkpoint for `id` doesn't exist yet. The platform restores the checkpoint for `id` first when both exist. Later snapshots continue writing to the checkpoint for `id`, so the seed remains unchanged.
148
+
149
+ ```typescript
150
+ const sandbox = new PlatformSandbox({
151
+ id: `project-session-${sessionId}`,
152
+ seedCheckpointName: 'project-base',
153
+ })
154
+ ```
155
+
147
156
  ### Cloning for a fleet of sandboxes
148
157
 
149
158
  `clone()` returns an independent sibling `PlatformSandbox` that inherits credentials and defaults (access token, project, environment, network isolation, timeout, instructions, env, idle timeout) with per-instance overrides. The returned sandbox is unstarted and provisions on its own `start()`, so `clone()` performs no I/O:
@@ -187,6 +196,8 @@ console.log(result.exitCode)
187
196
 
188
197
  **sandboxId** (`string`): Existing sandbox ID to reattach to instead of creating a new sandbox. When set, environmentId is not required.
189
198
 
199
+ **seedCheckpointName** (`string`): Boot-only fallback checkpoint used when the primary recovery checkpoint for id has no stored state. Later snapshots continue writing to the checkpoint for id.
200
+
190
201
  **idleTimeoutMinutes** (`number`): How long the sandbox stays alive with no activity before the platform destroys it.
191
202
 
192
203
  **networkIsolation** (`'ISOLATED' | 'PRIVATE'`): Network mode. 'ISOLATED' (default) allows outbound internet only. 'PRIVATE' joins the platform environment's private network.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 1.2.17-alpha.21
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`58c43d3`](https://github.com/mastra-ai/mastra/commit/58c43d3f7cb2eeaeb8ac733ae71dde822348e588)]:
8
+ - @mastra/core@1.60.0-alpha.14
9
+
3
10
  ## 1.2.17-alpha.20
4
11
 
5
12
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "1.2.17-alpha.20",
3
+ "version": "1.2.17-alpha.21",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -28,8 +28,8 @@
28
28
  "jsdom": "^26.1.0",
29
29
  "local-pkg": "^1.1.2",
30
30
  "zod": "^4.4.3",
31
- "@mastra/core": "1.60.0-alpha.13",
32
- "@mastra/mcp": "^1.17.0-alpha.2"
31
+ "@mastra/mcp": "^1.17.0-alpha.2",
32
+ "@mastra/core": "1.60.0-alpha.14"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@hono/node-server": "^2.0.0",
@@ -45,9 +45,9 @@
45
45
  "tsx": "^4.23.1",
46
46
  "typescript": "^6.0.3",
47
47
  "vitest": "4.1.10",
48
- "@internal/lint": "0.0.123",
49
48
  "@internal/types-builder": "0.0.98",
50
- "@mastra/core": "1.60.0-alpha.13"
49
+ "@internal/lint": "0.0.123",
50
+ "@mastra/core": "1.60.0-alpha.14"
51
51
  },
52
52
  "homepage": "https://mastra.ai",
53
53
  "repository": {