@mastra/mcp-docs-server 1.1.17-alpha.14 → 1.1.17-alpha.17
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/docs/server/server-adapters.md +15 -1
- package/.docs/models/gateways/openrouter.md +1 -1
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/bailing.md +1 -1
- package/.docs/models/providers/cloudflare-workers-ai.md +4 -3
- package/.docs/models/providers/firmware.md +2 -2
- package/.docs/models/providers/friendli.md +1 -1
- package/.docs/models/providers/github-models.md +1 -1
- package/.docs/models/providers/google.md +7 -2
- package/.docs/models/providers/huggingface.md +1 -1
- package/.docs/models/providers/mistral.md +3 -2
- package/.docs/models/providers/nano-gpt.md +3 -1
- package/.docs/models/providers/openai.md +2 -1
- package/.docs/reference/configuration.md +24 -0
- package/.docs/reference/core/mastra-model-gateway.md +2 -0
- package/CHANGELOG.md +15 -0
- package/package.json +5 -5
|
@@ -521,7 +521,21 @@ The adapter registers routes for both HTTP and SSE (Server-Sent Events) transpor
|
|
|
521
521
|
|
|
522
522
|
### Serverless mode
|
|
523
523
|
|
|
524
|
-
For serverless environments like Cloudflare Workers or Vercel Edge, enable stateless mode via `mcpOptions
|
|
524
|
+
For serverless environments like Cloudflare Workers or Vercel Edge, enable stateless mode via `mcpOptions`.
|
|
525
|
+
|
|
526
|
+
When using the Mastra deployer (the standard `mastra dev` / `mastra build` path), set `mcpOptions` in your server config:
|
|
527
|
+
|
|
528
|
+
```typescript
|
|
529
|
+
const mastra = new Mastra({
|
|
530
|
+
server: {
|
|
531
|
+
mcpOptions: {
|
|
532
|
+
serverless: true,
|
|
533
|
+
},
|
|
534
|
+
},
|
|
535
|
+
})
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
When manually creating a server adapter, pass `mcpOptions` directly:
|
|
525
539
|
|
|
526
540
|
```typescript
|
|
527
541
|
const server = new MastraServer({
|
|
@@ -117,7 +117,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
117
117
|
| `nousresearch/hermes-4-70b` |
|
|
118
118
|
| `nvidia/nemotron-3-nano-30b-a3b:free` |
|
|
119
119
|
| `nvidia/nemotron-3-super-120b-a12b` |
|
|
120
|
-
| `nvidia/nemotron-3-super-120b-a12b
|
|
120
|
+
| `nvidia/nemotron-3-super-120b-a12b:free` |
|
|
121
121
|
| `nvidia/nemotron-nano-12b-v2-vl:free` |
|
|
122
122
|
| `nvidia/nemotron-nano-9b-v2` |
|
|
123
123
|
| `nvidia/nemotron-nano-9b-v2:free` |
|
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 3616 models from 95 providers through a single API.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
@@ -5,7 +5,7 @@ Access 2 Bailing models through Mastra's model router. Authentication is handled
|
|
|
5
5
|
Learn more in the [Bailing documentation](https://alipaytbox.yuque.com/sxs0ba/ling/intro).
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
BAILING_API_TOKEN=your-api-
|
|
8
|
+
BAILING_API_TOKEN=your-api-token
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# Cloudflare Workers AI
|
|
2
2
|
|
|
3
|
-
Access 42 Cloudflare Workers AI models through Mastra's model router. Authentication is handled automatically using the `
|
|
3
|
+
Access 42 Cloudflare Workers AI models through Mastra's model router. Authentication is handled automatically using the `CLOUDFLARE_API_KEY` environment variable. Configure `CLOUDFLARE_ACCOUNT_ID` as well.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Cloudflare Workers AI documentation](https://developers.cloudflare.com/workers-ai/models/).
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
CLOUDFLARE_ACCOUNT_ID=your-
|
|
8
|
+
CLOUDFLARE_ACCOUNT_ID=your-account-id
|
|
9
|
+
CLOUDFLARE_API_KEY=your-api-key
|
|
9
10
|
```
|
|
10
11
|
|
|
11
12
|
```typescript
|
|
@@ -88,7 +89,7 @@ const agent = new Agent({
|
|
|
88
89
|
model: {
|
|
89
90
|
url: "https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
|
90
91
|
id: "cloudflare-workers-ai/@cf/ai4bharat/indictrans2-en-indic-1B",
|
|
91
|
-
apiKey: process.env.
|
|
92
|
+
apiKey: process.env.CLOUDFLARE_API_KEY,
|
|
92
93
|
headers: {
|
|
93
94
|
"X-Custom-Header": "value"
|
|
94
95
|
}
|
|
@@ -45,7 +45,6 @@ for await (const chunk of stream) {
|
|
|
45
45
|
| `firmware/gemini-3-1-pro-preview` | 1.0M | | | | | | $2 | $12 |
|
|
46
46
|
| `firmware/gemini-3-flash-preview` | 1.0M | | | | | | $0.50 | $3 |
|
|
47
47
|
| `firmware/gemini-3-pro-preview` | 1.0M | | | | | | $2 | $12 |
|
|
48
|
-
| `firmware/glm-5` | 198K | | | | | | $1 | $3 |
|
|
49
48
|
| `firmware/gpt-4o` | 128K | | | | | | $3 | $10 |
|
|
50
49
|
| `firmware/gpt-5-3-codex` | 400K | | | | | | $2 | $14 |
|
|
51
50
|
| `firmware/gpt-5-4` | 272K | | | | | | $3 | $15 |
|
|
@@ -58,6 +57,7 @@ for await (const chunk of stream) {
|
|
|
58
57
|
| `firmware/grok-code-fast-1` | 256K | | | | | | $0.20 | $2 |
|
|
59
58
|
| `firmware/kimi-k2.5` | 256K | | | | | | $0.60 | $3 |
|
|
60
59
|
| `firmware/minimax-m2-5` | 192K | | | | | | $0.30 | $1 |
|
|
60
|
+
| `firmware/zai-glm-5` | 198K | | | | | | $1 | $3 |
|
|
61
61
|
|
|
62
62
|
## Advanced configuration
|
|
63
63
|
|
|
@@ -87,7 +87,7 @@ const agent = new Agent({
|
|
|
87
87
|
model: ({ requestContext }) => {
|
|
88
88
|
const useAdvanced = requestContext.task === "complex";
|
|
89
89
|
return useAdvanced
|
|
90
|
-
? "firmware/
|
|
90
|
+
? "firmware/zai-glm-5"
|
|
91
91
|
: "firmware/claude-haiku-4-5";
|
|
92
92
|
}
|
|
93
93
|
});
|
|
@@ -5,7 +5,7 @@ Access 7 Friendli models through Mastra's model router. Authentication is handle
|
|
|
5
5
|
Learn more in the [Friendli documentation](https://friendli.ai/docs/guides/serverless_endpoints/introduction).
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
FRIENDLI_TOKEN=your-api-
|
|
8
|
+
FRIENDLI_TOKEN=your-api-token
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
@@ -5,7 +5,7 @@ Access 55 GitHub Models models through Mastra's model router. Authentication is
|
|
|
5
5
|
Learn more in the [GitHub Models documentation](https://docs.github.com/en/github-models).
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
GITHUB_TOKEN=your-api-
|
|
8
|
+
GITHUB_TOKEN=your-api-token
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Google
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 35 Google models through Mastra's model router. Authentication is handled automatically using the `GOOGLE_GENERATIVE_AI_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Google documentation](https://ai.google.dev/gemini-api/docs/pricing).
|
|
6
6
|
|
|
@@ -62,6 +62,11 @@ for await (const chunk of stream) {
|
|
|
62
62
|
| `google/gemini-flash-lite-latest` | 1.0M | | | | | | $0.10 | $0.40 |
|
|
63
63
|
| `google/gemini-live-2.5-flash` | 128K | | | | | | $0.50 | $2 |
|
|
64
64
|
| `google/gemini-live-2.5-flash-preview-native-audio` | 131K | | | | | | $0.50 | $2 |
|
|
65
|
+
| `google/gemma-3-12b-it` | 33K | | | | | | — | — |
|
|
66
|
+
| `google/gemma-3-27b-it` | 131K | | | | | | — | — |
|
|
67
|
+
| `google/gemma-3-4b-it` | 33K | | | | | | — | — |
|
|
68
|
+
| `google/gemma-3n-e2b-it` | 8K | | | | | | — | — |
|
|
69
|
+
| `google/gemma-3n-e4b-it` | 8K | | | | | | — | — |
|
|
65
70
|
|
|
66
71
|
## Advanced configuration
|
|
67
72
|
|
|
@@ -90,7 +95,7 @@ const agent = new Agent({
|
|
|
90
95
|
model: ({ requestContext }) => {
|
|
91
96
|
const useAdvanced = requestContext.task === "complex";
|
|
92
97
|
return useAdvanced
|
|
93
|
-
? "google/
|
|
98
|
+
? "google/gemma-3n-e4b-it"
|
|
94
99
|
: "google/gemini-1.5-flash";
|
|
95
100
|
}
|
|
96
101
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Mistral
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 27 Mistral models through Mastra's model router. Authentication is handled automatically using the `MISTRAL_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Mistral documentation](https://docs.mistral.ai/getting-started/models/).
|
|
6
6
|
|
|
@@ -52,7 +52,8 @@ for await (const chunk of stream) {
|
|
|
52
52
|
| `mistral/mistral-medium-latest` | 128K | | | | | | $0.40 | $2 |
|
|
53
53
|
| `mistral/mistral-nemo` | 128K | | | | | | $0.15 | $0.15 |
|
|
54
54
|
| `mistral/mistral-small-2506` | 128K | | | | | | $0.10 | $0.30 |
|
|
55
|
-
| `mistral/mistral-small-
|
|
55
|
+
| `mistral/mistral-small-2603` | 256K | | | | | | $0.15 | $0.60 |
|
|
56
|
+
| `mistral/mistral-small-latest` | 256K | | | | | | $0.15 | $0.60 |
|
|
56
57
|
| `mistral/open-mistral-7b` | 8K | | | | | | $0.25 | $0.25 |
|
|
57
58
|
| `mistral/open-mixtral-8x22b` | 64K | | | | | | $2 | $6 |
|
|
58
59
|
| `mistral/open-mixtral-8x7b` | 32K | | | | | | $0.70 | $0.70 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# NanoGPT
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 519 NanoGPT models through Mastra's model router. Authentication is handled automatically using the `NANO_GPT_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [NanoGPT documentation](https://docs.nano-gpt.com).
|
|
6
6
|
|
|
@@ -551,6 +551,8 @@ for await (const chunk of stream) {
|
|
|
551
551
|
| `nano-gpt/zai-org/glm-4.7-flash` | 200K | | | | | | $0.07 | $0.40 |
|
|
552
552
|
| `nano-gpt/zai-org/glm-5` | 200K | | | | | | $0.30 | $3 |
|
|
553
553
|
| `nano-gpt/zai-org/glm-5:thinking` | 200K | | | | | | $0.30 | $3 |
|
|
554
|
+
| `nano-gpt/zai-org/glm-5.1` | 200K | | | | | | $0.30 | $3 |
|
|
555
|
+
| `nano-gpt/zai-org/glm-5.1:thinking` | 200K | | | | | | $0.30 | $3 |
|
|
554
556
|
|
|
555
557
|
## Advanced configuration
|
|
556
558
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenAI
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 47 OpenAI models through Mastra's model router. Authentication is handled automatically using the `OPENAI_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [OpenAI documentation](https://platform.openai.com/docs/models).
|
|
6
6
|
|
|
@@ -59,6 +59,7 @@ for await (const chunk of stream) {
|
|
|
59
59
|
| `openai/gpt-5.2-chat-latest` | 128K | | | | | | $2 | $14 |
|
|
60
60
|
| `openai/gpt-5.2-codex` | 400K | | | | | | $2 | $14 |
|
|
61
61
|
| `openai/gpt-5.2-pro` | 400K | | | | | | $21 | $168 |
|
|
62
|
+
| `openai/gpt-5.3-chat-latest` | 128K | | | | | | $2 | $14 |
|
|
62
63
|
| `openai/gpt-5.3-codex` | 400K | | | | | | $2 | $14 |
|
|
63
64
|
| `openai/gpt-5.3-codex-spark` | 128K | | | | | | $2 | $14 |
|
|
64
65
|
| `openai/gpt-5.4` | 1.1M | | | | | | $3 | $15 |
|
|
@@ -566,6 +566,30 @@ export const mastra = new Mastra({
|
|
|
566
566
|
})
|
|
567
567
|
```
|
|
568
568
|
|
|
569
|
+
### server.mcpOptions
|
|
570
|
+
|
|
571
|
+
**Type:** `object`\
|
|
572
|
+
**Default:** `undefined`
|
|
573
|
+
|
|
574
|
+
MCP transport options applied to all MCP HTTP and SSE routes. Use this to enable stateless mode for serverless environments (Cloudflare Workers, Vercel Edge, AWS Lambda, etc.) where persistent connections and in-memory session state are not available.
|
|
575
|
+
|
|
576
|
+
| Property | Type | Default | Description |
|
|
577
|
+
| -------------------- | -------------- | ----------- | ---------------------------------------------------- |
|
|
578
|
+
| `serverless` | `boolean` | `false` | Run MCP in stateless mode without session management |
|
|
579
|
+
| `sessionIdGenerator` | `() => string` | `undefined` | Custom session ID generator function |
|
|
580
|
+
|
|
581
|
+
```typescript
|
|
582
|
+
import { Mastra } from '@mastra/core'
|
|
583
|
+
|
|
584
|
+
export const mastra = new Mastra({
|
|
585
|
+
server: {
|
|
586
|
+
mcpOptions: {
|
|
587
|
+
serverless: true,
|
|
588
|
+
},
|
|
589
|
+
},
|
|
590
|
+
})
|
|
591
|
+
```
|
|
592
|
+
|
|
569
593
|
### server.build
|
|
570
594
|
|
|
571
595
|
Build-time configuration for server features. These options control development tools like Swagger UI and request logging, which are enabled during local development but disabled in production by default.
|
|
@@ -87,6 +87,8 @@ Fetches provider configurations from the gateway.
|
|
|
87
87
|
|
|
88
88
|
Builds the API URL for a specific model/provider combination.
|
|
89
89
|
|
|
90
|
+
If your provider URL contains placeholders such as `${ACCOUNT_ID}`, resolve them inside `buildUrl()` from `envVars` or `process.env` before returning the final URL.
|
|
91
|
+
|
|
90
92
|
**Parameters:**
|
|
91
93
|
|
|
92
94
|
**modelId** (`string`): Full model ID (e.g., "custom/my-provider/model-1")
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.1.17-alpha.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`12c647c`](https://github.com/mastra-ai/mastra/commit/12c647cf3a26826eb72d40b42e3c8356ceae16ed), [`819f03c`](https://github.com/mastra-ai/mastra/commit/819f03c25823373b32476413bd76be28a5d8705a)]:
|
|
8
|
+
- @mastra/core@1.18.0-alpha.5
|
|
9
|
+
|
|
10
|
+
## 1.1.17-alpha.15
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [[`fbf22a7`](https://github.com/mastra-ai/mastra/commit/fbf22a7ad86bcb50dcf30459f0d075e51ddeb468), [`04160ee`](https://github.com/mastra-ai/mastra/commit/04160eedf3130003cf842ad08428c8ff69af4cc1), [`2c27503`](https://github.com/mastra-ai/mastra/commit/2c275032510d131d2cde47f99953abf0fe02c081), [`424a1df`](https://github.com/mastra-ai/mastra/commit/424a1df7bee59abb5c83717a54807fdd674a6224), [`43595bf`](https://github.com/mastra-ai/mastra/commit/43595bf7b8df1a6edce7a23b445b5124d2a0b473), [`12c88a6`](https://github.com/mastra-ai/mastra/commit/12c88a6e32bf982c2fe0c6af62e65a3414519a75), [`43595bf`](https://github.com/mastra-ai/mastra/commit/43595bf7b8df1a6edce7a23b445b5124d2a0b473), [`78670e9`](https://github.com/mastra-ai/mastra/commit/78670e97e76d7422cf7025faf371b2aeafed860d), [`d400e7c`](https://github.com/mastra-ai/mastra/commit/d400e7c8b8d7afa6ba2c71769eace4048e3cef8e), [`f58d1a7`](https://github.com/mastra-ai/mastra/commit/f58d1a7a457588a996c3ecb53201a68f3d28c432), [`a49a929`](https://github.com/mastra-ai/mastra/commit/a49a92904968b4fc67e01effee8c7c8d0464ba85)]:
|
|
15
|
+
- @mastra/core@1.18.0-alpha.4
|
|
16
|
+
- @mastra/mcp@1.3.2-alpha.0
|
|
17
|
+
|
|
3
18
|
## 1.1.17-alpha.12
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "1.1.17-alpha.
|
|
3
|
+
"version": "1.1.17-alpha.17",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"jsdom": "^26.1.0",
|
|
30
30
|
"local-pkg": "^1.1.2",
|
|
31
31
|
"zod": "^4.3.6",
|
|
32
|
-
"@mastra/core": "1.18.0-alpha.
|
|
33
|
-
"@mastra/mcp": "^1.3.
|
|
32
|
+
"@mastra/core": "1.18.0-alpha.5",
|
|
33
|
+
"@mastra/mcp": "^1.3.2-alpha.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@hono/node-server": "^1.19.11",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"typescript": "^5.9.3",
|
|
48
48
|
"vitest": "4.0.18",
|
|
49
49
|
"@internal/types-builder": "0.0.49",
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
50
|
+
"@mastra/core": "1.18.0-alpha.5",
|
|
51
|
+
"@internal/lint": "0.0.74"
|
|
52
52
|
},
|
|
53
53
|
"homepage": "https://mastra.ai",
|
|
54
54
|
"repository": {
|