@mastra/mcp-docs-server 1.1.36-alpha.3 → 1.1.37-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/models/index.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Model Providers
|
|
2
2
|
|
|
3
|
-
Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to
|
|
3
|
+
Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 3913 models from 113 providers through a single API.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Ambient
|
|
2
|
+
|
|
3
|
+
Access 2 Ambient models through Mastra's model router. Authentication is handled automatically using the `AMBIENT_API_KEY` environment variable.
|
|
4
|
+
|
|
5
|
+
Learn more in the [Ambient documentation](https://ambient.xyz).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
AMBIENT_API_KEY=your-api-key
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { Agent } from "@mastra/core/agent";
|
|
13
|
+
|
|
14
|
+
const agent = new Agent({
|
|
15
|
+
id: "my-agent",
|
|
16
|
+
name: "My Agent",
|
|
17
|
+
instructions: "You are a helpful assistant",
|
|
18
|
+
model: "ambient/moonshotai/kimi-k2.6"
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Generate a response
|
|
22
|
+
const response = await agent.generate("Hello!");
|
|
23
|
+
|
|
24
|
+
// Stream a response
|
|
25
|
+
const stream = await agent.stream("Tell me a story");
|
|
26
|
+
for await (const chunk of stream) {
|
|
27
|
+
console.log(chunk);
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
> **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Ambient documentation](https://ambient.xyz) for details.
|
|
32
|
+
|
|
33
|
+
## Models
|
|
34
|
+
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| ------------------------------ | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `ambient/moonshotai/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
|
|
38
|
+
| `ambient/zai-org/GLM-5.1-FP8` | 203K | | | | | | $1 | $4 |
|
|
39
|
+
|
|
40
|
+
## Advanced configuration
|
|
41
|
+
|
|
42
|
+
### Custom headers
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
const agent = new Agent({
|
|
46
|
+
id: "custom-agent",
|
|
47
|
+
name: "custom-agent",
|
|
48
|
+
model: {
|
|
49
|
+
url: "https://api.ambient.xyz/v1",
|
|
50
|
+
id: "ambient/moonshotai/kimi-k2.6",
|
|
51
|
+
apiKey: process.env.AMBIENT_API_KEY,
|
|
52
|
+
headers: {
|
|
53
|
+
"X-Custom-Header": "value"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Dynamic model selection
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
const agent = new Agent({
|
|
63
|
+
id: "dynamic-agent",
|
|
64
|
+
name: "Dynamic Agent",
|
|
65
|
+
model: ({ requestContext }) => {
|
|
66
|
+
const useAdvanced = requestContext.task === "complex";
|
|
67
|
+
return useAdvanced
|
|
68
|
+
? "ambient/zai-org/GLM-5.1-FP8"
|
|
69
|
+
: "ambient/moonshotai/kimi-k2.6";
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
```
|
|
@@ -16,6 +16,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
16
16
|
- [Alibaba (China)](https://mastra.ai/models/providers/alibaba-cn)
|
|
17
17
|
- [Alibaba Coding Plan](https://mastra.ai/models/providers/alibaba-coding-plan)
|
|
18
18
|
- [Alibaba Coding Plan (China)](https://mastra.ai/models/providers/alibaba-coding-plan-cn)
|
|
19
|
+
- [Ambient](https://mastra.ai/models/providers/ambient)
|
|
19
20
|
- [Auriko](https://mastra.ai/models/providers/auriko)
|
|
20
21
|
- [Bailing](https://mastra.ai/models/providers/bailing)
|
|
21
22
|
- [Baseten](https://mastra.ai/models/providers/baseten)
|
|
@@ -290,19 +290,39 @@ A workspace provides tools to agents based on what's configured.
|
|
|
290
290
|
|
|
291
291
|
Added when a filesystem is configured:
|
|
292
292
|
|
|
293
|
-
| Tool | Description
|
|
294
|
-
| ----------------------------- |
|
|
295
|
-
| `mastra_workspace_read_file` | Read file contents.
|
|
296
|
-
| `mastra_workspace_write_file` | Create or overwrite a file with new content. Creates parent directories automatically.
|
|
297
|
-
| `mastra_workspace_edit_file` | Edit an existing file by finding and replacing text. Useful for targeted changes without rewriting the entire file.
|
|
298
|
-
| `mastra_workspace_list_files` | List directory contents as a tree structure. Supports recursive listing with depth limits, glob patterns, and `.gitignore` filtering (enabled by default).
|
|
299
|
-
| `mastra_workspace_delete` | Delete a file or directory. Supports recursive deletion for directories.
|
|
300
|
-
| `mastra_workspace_file_stat` | Get metadata about a file or directory including size, type, and modification time.
|
|
301
|
-
| `mastra_workspace_mkdir` | Create a directory. Creates parent directories automatically if they don't exist.
|
|
302
|
-
| `mastra_workspace_grep` | Search file contents using regex patterns. Supports glob filtering, context lines, and case-insensitive search.
|
|
293
|
+
| Tool | Description |
|
|
294
|
+
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
295
|
+
| `mastra_workspace_read_file` | Read file contents. Text files return as text (with optional line range). Images and PDFs return as native media parts the model can view directly. Other binaries return metadata only unless an explicit `encoding` is passed. |
|
|
296
|
+
| `mastra_workspace_write_file` | Create or overwrite a file with new content. Creates parent directories automatically. |
|
|
297
|
+
| `mastra_workspace_edit_file` | Edit an existing file by finding and replacing text. Useful for targeted changes without rewriting the entire file. |
|
|
298
|
+
| `mastra_workspace_list_files` | List directory contents as a tree structure. Supports recursive listing with depth limits, glob patterns, and `.gitignore` filtering (enabled by default). |
|
|
299
|
+
| `mastra_workspace_delete` | Delete a file or directory. Supports recursive deletion for directories. |
|
|
300
|
+
| `mastra_workspace_file_stat` | Get metadata about a file or directory including size, type, and modification time. |
|
|
301
|
+
| `mastra_workspace_mkdir` | Create a directory. Creates parent directories automatically if they don't exist. |
|
|
302
|
+
| `mastra_workspace_grep` | Search file contents using regex patterns. Supports glob filtering, context lines, and case-insensitive search. |
|
|
303
303
|
|
|
304
304
|
With a static filesystem, write tools (`write_file`, `edit_file`, `delete`, `mkdir`) are excluded when the filesystem is in read-only mode. With a [dynamic filesystem](https://mastra.ai/docs/workspace/filesystem), write tools are always included and read-only is enforced at runtime.
|
|
305
305
|
|
|
306
|
+
The `read_file` tool accepts `mediaTypes` and `maxMediaBytes` options to control which mime types are surfaced to the model as native media parts and how large those files can be:
|
|
307
|
+
|
|
308
|
+
**mediaTypes** (`string[] | ((mimeType: string) => boolean) | false`): Which mime types to surface to the model as media parts (file/image parts) rather than as text. Accepts an array of globs (e.g. \`\['image/\*']\`), a custom predicate function, or \`false\` to disable media detection. Defaults to the cross-provider-safe intersection of image formats plus PDF. Only applies when the caller doesn't pass an explicit \`encoding\`. (Default: `['image/png', 'image/jpeg', 'image/webp', 'application/pdf']`)
|
|
309
|
+
|
|
310
|
+
**maxMediaBytes** (`number`): Maximum file size (in bytes) to inline as a media part. Files larger than this fall back to metadata-only output rather than being fully base64-encoded into context and persisted in storage on rehydration. (Default: `10 * 1024 * 1024 (10 MiB)`)
|
|
311
|
+
|
|
312
|
+
```typescript
|
|
313
|
+
const workspace = new Workspace({
|
|
314
|
+
filesystem: new LocalFilesystem({ basePath: './workspace' }),
|
|
315
|
+
tools: {
|
|
316
|
+
[WORKSPACE_TOOLS.FILESYSTEM.READ_FILE]: {
|
|
317
|
+
// Broaden to any image (including SVG, BMP, HEIC) — may fail on some providers
|
|
318
|
+
mediaTypes: ['image/*'],
|
|
319
|
+
// Raise the inline-media cap to 25 MiB
|
|
320
|
+
maxMediaBytes: 25 * 1024 * 1024,
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
})
|
|
324
|
+
```
|
|
325
|
+
|
|
306
326
|
### Sandbox tools
|
|
307
327
|
|
|
308
328
|
Added when a sandbox is configured:
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.1.37-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`20787de`](https://github.com/mastra-ai/mastra/commit/20787de5965234a1af28fe35f49437c537dbfa0d), [`784ad98`](https://github.com/mastra-ai/mastra/commit/784ad989549de91dc5d33ab8ef36caa6f7dcd34e), [`0d53730`](https://github.com/mastra-ai/mastra/commit/0d53730c1ed87ef80c87caa5701c4170ea8028e6)]:
|
|
8
|
+
- @mastra/core@1.34.0-alpha.0
|
|
9
|
+
|
|
10
|
+
## 1.1.36
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [[`6ba46dc`](https://github.com/mastra-ai/mastra/commit/6ba46dc1ac04af635d0f59377d7384ca6af44cd1), [`3e63fca`](https://github.com/mastra-ai/mastra/commit/3e63fca7aa41269b2a9518effdd09b8ab8f1ff04), [`bc386e0`](https://github.com/mastra-ai/mastra/commit/bc386e08249dd30f3e66cf59de0c151a8dc26afb)]:
|
|
15
|
+
- @mastra/core@1.33.1
|
|
16
|
+
|
|
3
17
|
## 1.1.36-alpha.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.37-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",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"jsdom": "^26.1.0",
|
|
30
30
|
"local-pkg": "^1.1.2",
|
|
31
31
|
"zod": "^4.3.6",
|
|
32
|
-
"@mastra/core": "1.
|
|
32
|
+
"@mastra/core": "1.34.0-alpha.0",
|
|
33
33
|
"@mastra/mcp": "^1.7.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"tsx": "^4.21.0",
|
|
47
47
|
"typescript": "^6.0.3",
|
|
48
48
|
"vitest": "4.1.5",
|
|
49
|
-
"@internal/
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
49
|
+
"@internal/types-builder": "0.0.69",
|
|
50
|
+
"@internal/lint": "0.0.94",
|
|
51
|
+
"@mastra/core": "1.34.0-alpha.0"
|
|
52
52
|
},
|
|
53
53
|
"homepage": "https://mastra.ai",
|
|
54
54
|
"repository": {
|