@mastra/mcp-docs-server 1.1.37-alpha.4 → 1.1.37
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 +1 -1
- package/.docs/models/providers/nearai.md +103 -0
- package/.docs/models/providers/opencode.md +2 -3
- package/.docs/models/providers/siliconflow.md +3 -1
- package/.docs/models/providers.md +1 -0
- package/.docs/reference/agents/agent.md +2 -0
- package/.docs/reference/agents/getMetadata.md +61 -0
- package/.docs/reference/cli/mastra.md +2 -1
- package/.docs/reference/index.md +1 -0
- package/CHANGELOG.md +14 -0
- package/package.json +5 -5
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 3948 models from 115 providers through a single API.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# NEAR AI Cloud
|
|
2
|
+
|
|
3
|
+
Access 33 NEAR AI Cloud models through Mastra's model router. Authentication is handled automatically using the `NEARAI_API_KEY` environment variable.
|
|
4
|
+
|
|
5
|
+
Learn more in the [NEAR AI Cloud documentation](https://docs.near.ai/).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
NEARAI_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: "nearai/Qwen/Qwen3-30B-A3B-Instruct-2507"
|
|
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 [NEAR AI Cloud documentation](https://docs.near.ai/) for details.
|
|
32
|
+
|
|
33
|
+
## Models
|
|
34
|
+
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| ------------------------------------------ | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `nearai/anthropic/claude-haiku-4-5` | 200K | | | | | | $1 | $5 |
|
|
38
|
+
| `nearai/anthropic/claude-opus-4-6` | 200K | | | | | | $5 | $25 |
|
|
39
|
+
| `nearai/anthropic/claude-opus-4-7` | 1.0M | | | | | | $5 | $25 |
|
|
40
|
+
| `nearai/anthropic/claude-sonnet-4-5` | 200K | | | | | | $3 | $16 |
|
|
41
|
+
| `nearai/anthropic/claude-sonnet-4-6` | 1.0M | | | | | | $3 | $15 |
|
|
42
|
+
| `nearai/black-forest-labs/FLUX.2-klein-4B` | 128K | | | | | | $1 | $1 |
|
|
43
|
+
| `nearai/google/gemini-2.5-flash` | 1.0M | | | | | | $0.30 | $3 |
|
|
44
|
+
| `nearai/google/gemini-2.5-flash-lite` | 1.0M | | | | | | $0.10 | $0.40 |
|
|
45
|
+
| `nearai/google/gemini-2.5-pro` | 1.0M | | | | | | $1 | $10 |
|
|
46
|
+
| `nearai/google/gemini-3.1-flash-lite` | 1.0M | | | | | | $0.25 | $2 |
|
|
47
|
+
| `nearai/openai/gpt-4.1` | 1.0M | | | | | | $2 | $8 |
|
|
48
|
+
| `nearai/openai/gpt-4.1-mini` | 1.0M | | | | | | $0.40 | $2 |
|
|
49
|
+
| `nearai/openai/gpt-4.1-nano` | 1.0M | | | | | | $0.10 | $0.40 |
|
|
50
|
+
| `nearai/openai/gpt-5` | 400K | | | | | | $1 | $10 |
|
|
51
|
+
| `nearai/openai/gpt-5-mini` | 400K | | | | | | $0.25 | $2 |
|
|
52
|
+
| `nearai/openai/gpt-5-nano` | 400K | | | | | | $0.05 | $0.40 |
|
|
53
|
+
| `nearai/openai/gpt-5.1` | 400K | | | | | | $1 | $10 |
|
|
54
|
+
| `nearai/openai/gpt-5.2` | 400K | | | | | | $2 | $16 |
|
|
55
|
+
| `nearai/openai/gpt-5.4` | 1.1M | | | | | | $3 | $15 |
|
|
56
|
+
| `nearai/openai/gpt-5.4-mini` | 400K | | | | | | $0.75 | $5 |
|
|
57
|
+
| `nearai/openai/gpt-5.4-nano` | 400K | | | | | | $0.20 | $1 |
|
|
58
|
+
| `nearai/openai/gpt-5.5` | 1.1M | | | | | | $5 | $30 |
|
|
59
|
+
| `nearai/openai/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.55 |
|
|
60
|
+
| `nearai/openai/o3` | 200K | | | | | | $2 | $8 |
|
|
61
|
+
| `nearai/openai/o3-mini` | 200K | | | | | | $1 | $4 |
|
|
62
|
+
| `nearai/openai/o4-mini` | 200K | | | | | | $1 | $4 |
|
|
63
|
+
| `nearai/openai/whisper-large-v3` | 448 | | | | | | $0.01 | — |
|
|
64
|
+
| `nearai/Qwen/Qwen3-30B-A3B-Instruct-2507` | 262K | | | | | | $0.15 | $0.55 |
|
|
65
|
+
| `nearai/Qwen/Qwen3-Embedding-0.6B` | 41K | | | | | | $0.01 | — |
|
|
66
|
+
| `nearai/Qwen/Qwen3-Reranker-0.6B` | 41K | | | | | | $0.01 | $0.01 |
|
|
67
|
+
| `nearai/Qwen/Qwen3-VL-30B-A3B-Instruct` | 256K | | | | | | $0.15 | $0.55 |
|
|
68
|
+
| `nearai/Qwen/Qwen3.5-122B-A10B` | 131K | | | | | | $0.40 | $3 |
|
|
69
|
+
| `nearai/zai-org/GLM-5.1-FP8` | 203K | | | | | | $0.85 | $3 |
|
|
70
|
+
|
|
71
|
+
## Advanced configuration
|
|
72
|
+
|
|
73
|
+
### Custom headers
|
|
74
|
+
|
|
75
|
+
```typescript
|
|
76
|
+
const agent = new Agent({
|
|
77
|
+
id: "custom-agent",
|
|
78
|
+
name: "custom-agent",
|
|
79
|
+
model: {
|
|
80
|
+
url: "https://cloud-api.near.ai/v1",
|
|
81
|
+
id: "nearai/Qwen/Qwen3-30B-A3B-Instruct-2507",
|
|
82
|
+
apiKey: process.env.NEARAI_API_KEY,
|
|
83
|
+
headers: {
|
|
84
|
+
"X-Custom-Header": "value"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Dynamic model selection
|
|
91
|
+
|
|
92
|
+
```typescript
|
|
93
|
+
const agent = new Agent({
|
|
94
|
+
id: "dynamic-agent",
|
|
95
|
+
name: "Dynamic Agent",
|
|
96
|
+
model: ({ requestContext }) => {
|
|
97
|
+
const useAdvanced = requestContext.task === "complex";
|
|
98
|
+
return useAdvanced
|
|
99
|
+
? "nearai/zai-org/GLM-5.1-FP8"
|
|
100
|
+
: "nearai/Qwen/Qwen3-30B-A3B-Instruct-2507";
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenCode Zen
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 39 OpenCode Zen models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [OpenCode Zen documentation](https://opencode.ai/docs/zen).
|
|
6
6
|
|
|
@@ -73,7 +73,6 @@ for await (const chunk of stream) {
|
|
|
73
73
|
| `opencode/nemotron-3-super-free` | 205K | | | | | | — | — |
|
|
74
74
|
| `opencode/qwen3.5-plus` | 262K | | | | | | $0.20 | $1 |
|
|
75
75
|
| `opencode/qwen3.6-plus` | 262K | | | | | | $0.50 | $3 |
|
|
76
|
-
| `opencode/ring-2.6-1t-free` | 262K | | | | | | — | — |
|
|
77
76
|
|
|
78
77
|
## Advanced configuration
|
|
79
78
|
|
|
@@ -103,7 +102,7 @@ const agent = new Agent({
|
|
|
103
102
|
model: ({ requestContext }) => {
|
|
104
103
|
const useAdvanced = requestContext.task === "complex";
|
|
105
104
|
return useAdvanced
|
|
106
|
-
? "opencode/
|
|
105
|
+
? "opencode/qwen3.6-plus"
|
|
107
106
|
: "opencode/big-pickle";
|
|
108
107
|
}
|
|
109
108
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SiliconFlow
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 76 SiliconFlow models through Mastra's model router. Authentication is handled automatically using the `SILICONFLOW_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [SiliconFlow documentation](https://cloud.siliconflow.com/models).
|
|
6
6
|
|
|
@@ -44,6 +44,8 @@ for await (const chunk of stream) {
|
|
|
44
44
|
| `siliconflow/deepseek-ai/DeepSeek-V3.1-Terminus` | 164K | | | | | | $0.27 | $1 |
|
|
45
45
|
| `siliconflow/deepseek-ai/DeepSeek-V3.2` | 164K | | | | | | $0.27 | $0.42 |
|
|
46
46
|
| `siliconflow/deepseek-ai/DeepSeek-V3.2-Exp` | 164K | | | | | | $0.27 | $0.41 |
|
|
47
|
+
| `siliconflow/deepseek-ai/deepseek-v4-flash` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
48
|
+
| `siliconflow/deepseek-ai/deepseek-v4-pro` | 1.0M | | | | | | $2 | $3 |
|
|
47
49
|
| `siliconflow/deepseek-ai/deepseek-vl2` | 4K | | | | | | $0.15 | $0.15 |
|
|
48
50
|
| `siliconflow/inclusionAI/Ling-flash-2.0` | 131K | | | | | | $0.14 | $0.57 |
|
|
49
51
|
| `siliconflow/inclusionAI/Ling-mini-2.0` | 131K | | | | | | $0.07 | $0.28 |
|
|
@@ -67,6 +67,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
67
67
|
- [Moonshot AI (China)](https://mastra.ai/models/providers/moonshotai-cn)
|
|
68
68
|
- [Morph](https://mastra.ai/models/providers/morph)
|
|
69
69
|
- [NanoGPT](https://mastra.ai/models/providers/nano-gpt)
|
|
70
|
+
- [NEAR AI Cloud](https://mastra.ai/models/providers/nearai)
|
|
70
71
|
- [Nebius Token Factory](https://mastra.ai/models/providers/nebius)
|
|
71
72
|
- [Neuralwatt](https://mastra.ai/models/providers/neuralwatt)
|
|
72
73
|
- [Nova](https://mastra.ai/models/providers/nova)
|
|
@@ -185,6 +185,8 @@ Returns an `AgentThreadSubscription` object with these members:
|
|
|
185
185
|
|
|
186
186
|
**description** (`string`): Optional description of the agent's purpose and capabilities.
|
|
187
187
|
|
|
188
|
+
**metadata** (`Record<string, unknown> | ({ requestContext: RequestContext }) => Record<string, unknown> | Promise<Record<string, unknown>>`): Optional metadata for classifying or filtering the agent in clients. Can be a static record or a function that resolves the metadata from the request context.
|
|
189
|
+
|
|
188
190
|
**instructions** (`SystemMessage | ({ requestContext: RequestContext }) => SystemMessage | Promise<SystemMessage>`): Instructions that guide the agent's behavior. Can be a string, array of strings, system message object, array of system messages, or a function that returns any of these types dynamically. SystemMessage types: string | string\[] | CoreSystemMessage | CoreSystemMessage\[] | SystemModelMessage | SystemModelMessage\[]
|
|
189
191
|
|
|
190
192
|
**model** (`MastraLanguageModel | ({ requestContext: RequestContext }) => MastraLanguageModel | Promise<MastraLanguageModel>`): The language model used by the agent. Can be provided statically or resolved at runtime.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Agent.getMetadata()
|
|
2
|
+
|
|
3
|
+
The `.getMetadata()` method retrieves the metadata configured for an agent, resolving it if it's a function. Use metadata to classify agents in clients without encoding that data in the agent ID or name.
|
|
4
|
+
|
|
5
|
+
## Usage example
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
await agent.getMetadata()
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
**options** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `{}`)
|
|
14
|
+
|
|
15
|
+
**options.requestContext** (`RequestContext`): Request Context passed to dynamic metadata functions. Ignored when metadata is static.
|
|
16
|
+
|
|
17
|
+
## Returns
|
|
18
|
+
|
|
19
|
+
**metadata** (`Record<string, unknown> | Promise<Record<string, unknown>>`): The metadata configured for the agent, or \`undefined\` if no metadata was configured. Returns either directly or as a promise that resolves to the metadata when defined as a function.
|
|
20
|
+
|
|
21
|
+
## Extended usage example
|
|
22
|
+
|
|
23
|
+
Static metadata:
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { Agent } from '@mastra/core/agent'
|
|
27
|
+
|
|
28
|
+
export const supportAgent = new Agent({
|
|
29
|
+
id: 'support-agent',
|
|
30
|
+
name: 'Support Agent',
|
|
31
|
+
instructions: 'You help customers with support requests.',
|
|
32
|
+
model: 'openai/gpt-5.4',
|
|
33
|
+
metadata: { type: 'support' },
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
const metadata = supportAgent.getMetadata()
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Dynamic metadata resolved from the request context:
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
import { Agent } from '@mastra/core/agent'
|
|
43
|
+
|
|
44
|
+
export const supportAgent = new Agent({
|
|
45
|
+
id: 'support-agent',
|
|
46
|
+
name: 'Support Agent',
|
|
47
|
+
instructions: 'You help customers with support requests.',
|
|
48
|
+
model: 'openai/gpt-5.4',
|
|
49
|
+
metadata: ({ requestContext }) => ({
|
|
50
|
+
type: 'support',
|
|
51
|
+
tenant: requestContext.get('tenant'),
|
|
52
|
+
}),
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
const metadata = await supportAgent.getMetadata({ requestContext })
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Related
|
|
59
|
+
|
|
60
|
+
- [Agents overview](https://mastra.ai/docs/agents/overview)
|
|
61
|
+
- [Request Context](https://mastra.ai/docs/server/request-context)
|
|
@@ -974,9 +974,10 @@ Lists observability traces. Pass optional JSON input for route-supported filters
|
|
|
974
974
|
```bash
|
|
975
975
|
mastra api trace list [input]
|
|
976
976
|
mastra api trace list '{"page":0,"perPage":20}' --pretty
|
|
977
|
+
mastra api trace list '{"page":0,"perPage":20}' --verbose --pretty
|
|
977
978
|
```
|
|
978
979
|
|
|
979
|
-
`trace list` returns
|
|
980
|
+
`trace list` returns lightweight root span records by default so you can page through traces without fetching large input, output, attributes, or metadata payloads. Pass `--verbose` to fetch the full root span records.
|
|
980
981
|
|
|
981
982
|
#### `mastra api trace get`
|
|
982
983
|
|
package/.docs/reference/index.md
CHANGED
|
@@ -13,6 +13,7 @@ The Reference section provides documentation of Mastra's API, including paramete
|
|
|
13
13
|
- [.getInstructions()](https://mastra.ai/reference/agents/getInstructions)
|
|
14
14
|
- [.getLLM()](https://mastra.ai/reference/agents/getLLM)
|
|
15
15
|
- [.getMemory()](https://mastra.ai/reference/agents/getMemory)
|
|
16
|
+
- [.getMetadata()](https://mastra.ai/reference/agents/getMetadata)
|
|
16
17
|
- [.getModel()](https://mastra.ai/reference/agents/getModel)
|
|
17
18
|
- [.getTools()](https://mastra.ai/reference/agents/getTools)
|
|
18
19
|
- [.getVoice()](https://mastra.ai/reference/agents/getVoice)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.1.37
|
|
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), [`fceae1f`](https://github.com/mastra-ai/mastra/commit/fceae1f5f5db4722cb078a663c6eb4bd22944123), [`090a647`](https://github.com/mastra-ai/mastra/commit/090a647ba5a66d36f203f9f49457e03a1ff4e6fb), [`bf02acb`](https://github.com/mastra-ai/mastra/commit/bf02acbb8a6110f638ac844e89f1ebf04cb7fe74), [`090a647`](https://github.com/mastra-ai/mastra/commit/090a647ba5a66d36f203f9f49457e03a1ff4e6fb), [`bdb4cbf`](https://github.com/mastra-ai/mastra/commit/bdb4cbf8ba4b685d7481f28bb9dc3de6c79c9ed2), [`0fd3fbe`](https://github.com/mastra-ai/mastra/commit/0fd3fbe40fb63657aedd72f6e7b38c8e8ee6940d), [`f84447d`](https://github.com/mastra-ai/mastra/commit/f84447d6c80f3471836a9b300d246b331fb47e0d), [`a1a5b3e`](https://github.com/mastra-ai/mastra/commit/a1a5b3e42ab2ca5161ea21db59ebf28442680fa7), [`af84f57`](https://github.com/mastra-ai/mastra/commit/af84f571ed762e92e8e61c5f9a72363520914274), [`8b3c6f9`](https://github.com/mastra-ai/mastra/commit/8b3c6f90f7879833ba7d1bc70937e1d8f69d0804), [`fed0475`](https://github.com/mastra-ai/mastra/commit/fed0475ccfea31e4fc251469ac05640d0742c1f0), [`0d53730`](https://github.com/mastra-ai/mastra/commit/0d53730c1ed87ef80c87caa5701c4170ea8028e6), [`522f44d`](https://github.com/mastra-ai/mastra/commit/522f44d947214bfc06cff50599bae1ef3494880d)]:
|
|
8
|
+
- @mastra/core@1.34.0
|
|
9
|
+
|
|
10
|
+
## 1.1.37-alpha.5
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [[`090a647`](https://github.com/mastra-ai/mastra/commit/090a647ba5a66d36f203f9f49457e03a1ff4e6fb), [`090a647`](https://github.com/mastra-ai/mastra/commit/090a647ba5a66d36f203f9f49457e03a1ff4e6fb), [`f84447d`](https://github.com/mastra-ai/mastra/commit/f84447d6c80f3471836a9b300d246b331fb47e0d), [`a1a5b3e`](https://github.com/mastra-ai/mastra/commit/a1a5b3e42ab2ca5161ea21db59ebf28442680fa7), [`af84f57`](https://github.com/mastra-ai/mastra/commit/af84f571ed762e92e8e61c5f9a72363520914274), [`8b3c6f9`](https://github.com/mastra-ai/mastra/commit/8b3c6f90f7879833ba7d1bc70937e1d8f69d0804)]:
|
|
15
|
+
- @mastra/core@1.34.0-alpha.3
|
|
16
|
+
|
|
3
17
|
## 1.1.37-alpha.4
|
|
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.37
|
|
3
|
+
"version": "1.1.37",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"local-pkg": "^1.1.2",
|
|
31
31
|
"zod": "^4.3.6",
|
|
32
32
|
"@mastra/mcp": "^1.7.0",
|
|
33
|
-
"@mastra/core": "1.34.0
|
|
33
|
+
"@mastra/core": "1.34.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@hono/node-server": "^1.19.11",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"tsx": "^4.21.0",
|
|
47
47
|
"typescript": "^6.0.3",
|
|
48
48
|
"vitest": "4.1.5",
|
|
49
|
-
"@internal/lint": "0.0.
|
|
50
|
-
"@internal/types-builder": "0.0.
|
|
51
|
-
"@mastra/core": "1.34.0
|
|
49
|
+
"@internal/lint": "0.0.95",
|
|
50
|
+
"@internal/types-builder": "0.0.70",
|
|
51
|
+
"@mastra/core": "1.34.0"
|
|
52
52
|
},
|
|
53
53
|
"homepage": "https://mastra.ai",
|
|
54
54
|
"repository": {
|