@mastra/mcp-docs-server 1.1.25-alpha.1 → 1.1.25-alpha.4

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.
@@ -97,22 +97,62 @@ export const mastra = new Mastra({
97
97
 
98
98
  ### Authorization (User Isolation)
99
99
 
100
- Authentication verifies who the user is. Authorization controls what they can access. Without authorization middleware, an authenticated user could access other users' threads by guessing IDs or manipulating the `resourceId` parameter.
100
+ Authentication verifies who the user is. Authorization controls what they can access. Without resource ID scoping, an authenticated user could access other users' threads by guessing IDs or manipulating the `resourceId` parameter.
101
101
 
102
- Mastra provides reserved context keys that, when set by middleware, take precedence over client-provided values. The server automatically enforces these keys across memory and agent endpoints:
102
+ The simplest way to scope memory and threads to the authenticated user is the `mapUserToResourceId` callback in the auth config:
103
103
 
104
104
  ```typescript
105
105
  import { Mastra } from '@mastra/core'
106
- import { MASTRA_RESOURCE_ID_KEY } from '@mastra/core/request-context'
107
- import { getAuthenticatedUser } from '@mastra/server/auth'
108
106
 
109
107
  export const mastra = new Mastra({
110
108
  server: {
111
109
  auth: {
112
110
  authenticateToken: async token => {
113
- // Your auth logic returns the user
114
- return verifyToken(token) // { id: 'user-123', ... }
111
+ return verifyToken(token) // { id: 'user-123', orgId: 'org-456', ... }
115
112
  },
113
+ mapUserToResourceId: user => user.id,
114
+ },
115
+ },
116
+ })
117
+ ```
118
+
119
+ After successful authentication, `mapUserToResourceId` is called with the authenticated user object. The returned value is set as `MASTRA_RESOURCE_ID_KEY` on the request context, which works across all server adapters (Hono, Express, Next.js, etc.).
120
+
121
+ The resource ID doesn't have to be `user.id`. Common patterns:
122
+
123
+ ```typescript
124
+ // Org-scoped
125
+ mapUserToResourceId: user => `${user.orgId}:${user.id}`
126
+
127
+ // From a JWT claim
128
+ mapUserToResourceId: user => user.tenantId
129
+
130
+ // Composite key
131
+ mapUserToResourceId: user => `${user.workspaceId}:${user.projectId}:${user.id}`
132
+ ```
133
+
134
+ With a resource ID set, the server automatically:
135
+
136
+ - **Filters thread listing** to only return threads owned by the user
137
+ - **Validates thread access** and returns 403 if accessing another user's thread
138
+ - **Forces thread creation** to use the authenticated user's ID
139
+ - **Validates message operations** including deletion, ensuring messages belong to owned threads
140
+
141
+ Even if a client passes `?resourceId=other-user-id`, the auth-set value takes precedence. Attempts to access threads or messages owned by other users will return a 403 error.
142
+
143
+ #### Advanced: Setting resource ID in middleware
144
+
145
+ For more complex scenarios (e.g., looking up the resource ID from a database), you can set `MASTRA_RESOURCE_ID_KEY` directly in middleware:
146
+
147
+ ```typescript
148
+ import { Mastra } from '@mastra/core'
149
+ import { MASTRA_RESOURCE_ID_KEY } from '@mastra/core/request-context'
150
+ import { getAuthenticatedUser } from '@mastra/server/auth'
151
+
152
+ export const mastra = new Mastra({
153
+ server: {
154
+ auth: {
155
+ authenticateToken: async token => verifyToken(token),
116
156
  },
117
157
  middleware: [
118
158
  {
@@ -134,10 +174,7 @@ export const mastra = new Mastra({
134
174
  return c.json({ error: 'Unauthorized' }, 401)
135
175
  }
136
176
 
137
- // Force all API operations to use this user's ID
138
- // This takes precedence over any client-provided resourceId
139
177
  requestContext.set(MASTRA_RESOURCE_ID_KEY, user.id)
140
-
141
178
  return next()
142
179
  },
143
180
  },
@@ -148,15 +185,6 @@ export const mastra = new Mastra({
148
185
 
149
186
  `server.middleware` runs before Mastra's per-route auth checks. When middleware needs the authenticated user, call `getAuthenticatedUser()` to resolve it from the configured auth provider without changing the default route auth flow.
150
187
 
151
- With this middleware, the server automatically:
152
-
153
- - **Filters thread listing** to only return threads owned by the user
154
- - **Validates thread access** and returns 403 if accessing another user's thread
155
- - **Forces thread creation** to use the authenticated user's ID
156
- - **Validates message operations** including deletion, ensuring messages belong to owned threads
157
-
158
- Even if a client passes `?resourceId=other-user-id`, the middleware-set value takes precedence. Attempts to access threads or messages owned by other users will return a 403 error.
159
-
160
188
  #### Using `MASTRA_THREAD_ID_KEY`
161
189
 
162
190
  You can also set `MASTRA_THREAD_ID_KEY` to override the client-provided thread ID:
@@ -234,7 +234,18 @@ export const weatherTool = createTool({
234
234
 
235
235
  ## Reserved keys
236
236
 
237
- Mastra reserves special context keys for security purposes. When set by middleware, these keys take precedence over client-provided values. The server automatically validates ownership and returns 403 errors when users attempt to access resources they don't own.
237
+ Mastra reserves special context keys for security purposes. When set, these keys take precedence over client-provided values. The server automatically validates ownership and returns 403 errors when users attempt to access resources they don't own.
238
+
239
+ The easiest way to set `MASTRA_RESOURCE_ID_KEY` is via the `mapUserToResourceId` callback in auth config:
240
+
241
+ ```typescript
242
+ auth: {
243
+ authenticateToken: async token => verifyToken(token),
244
+ mapUserToResourceId: user => user.id,
245
+ }
246
+ ```
247
+
248
+ You can also set these keys manually in middleware:
238
249
 
239
250
  ```typescript
240
251
  import { MASTRA_RESOURCE_ID_KEY, MASTRA_THREAD_ID_KEY } from '@mastra/core/request-context'
@@ -1,6 +1,6 @@
1
1
  # ![OpenRouter logo](https://models.dev/logos/openrouter.svg)OpenRouter
2
2
 
3
- OpenRouter aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 173 models through Mastra's model router.
3
+ OpenRouter aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 175 models through Mastra's model router.
4
4
 
5
5
  Learn more in the [OpenRouter documentation](https://openrouter.ai/models).
6
6
 
@@ -100,6 +100,7 @@ ANTHROPIC_API_KEY=ant-...
100
100
  | `minimax/minimax-m2` |
101
101
  | `minimax/minimax-m2.1` |
102
102
  | `minimax/minimax-m2.5` |
103
+ | `minimax/minimax-m2.5:free` |
103
104
  | `minimax/minimax-m2.7` |
104
105
  | `mistralai/codestral-2508` |
105
106
  | `mistralai/devstral-2512` |
@@ -176,6 +177,7 @@ ANTHROPIC_API_KEY=ant-...
176
177
  | `qwen/qwen3-next-80b-a3b-instruct:free` |
177
178
  | `qwen/qwen3-next-80b-a3b-thinking` |
178
179
  | `qwen/qwen3.5-397b-a17b` |
180
+ | `qwen/qwen3.5-flash-02-23` |
179
181
  | `qwen/qwen3.5-plus-02-15` |
180
182
  | `qwen/qwen3.6-plus` |
181
183
  | `sourceful/riverflow-v2-fast-preview` |
@@ -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 3592 models from 99 providers through a single API.
3
+ Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 3608 models from 99 providers through a single API.
4
4
 
5
5
  ## Features
6
6
 
@@ -1,6 +1,6 @@
1
1
  # ![Deep Infra logo](https://models.dev/logos/deepinfra.svg)Deep Infra
2
2
 
3
- Access 27 Deep Infra models through Mastra's model router. Authentication is handled automatically using the `DEEPINFRA_API_KEY` environment variable.
3
+ Access 28 Deep Infra models through Mastra's model router. Authentication is handled automatically using the `DEEPINFRA_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [Deep Infra documentation](https://deepinfra.com/models).
6
6
 
@@ -59,6 +59,7 @@ for await (const chunk of stream) {
59
59
  | `deepinfra/zai-org/GLM-4.7` | 203K | | | | | | $0.43 | $2 |
60
60
  | `deepinfra/zai-org/GLM-4.7-Flash` | 203K | | | | | | $0.06 | $0.40 |
61
61
  | `deepinfra/zai-org/GLM-5` | 203K | | | | | | $0.80 | $3 |
62
+ | `deepinfra/zai-org/GLM-5.1` | 203K | | | | | | $1 | $4 |
62
63
 
63
64
  ## Advanced configuration
64
65
 
@@ -87,7 +88,7 @@ const agent = new Agent({
87
88
  model: ({ requestContext }) => {
88
89
  const useAdvanced = requestContext.task === "complex";
89
90
  return useAdvanced
90
- ? "deepinfra/zai-org/GLM-5"
91
+ ? "deepinfra/zai-org/GLM-5.1"
91
92
  : "deepinfra/MiniMaxAI/MiniMax-M2";
92
93
  }
93
94
  });
@@ -1,6 +1,6 @@
1
1
  # ![Firmware logo](https://models.dev/logos/firmware.svg)Firmware
2
2
 
3
- Access 24 Firmware models through Mastra's model router. Authentication is handled automatically using the `FIRMWARE_API_KEY` environment variable.
3
+ Access 25 Firmware models through Mastra's model router. Authentication is handled automatically using the `FIRMWARE_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [Firmware documentation](https://docs.frogbot.ai).
6
6
 
@@ -57,7 +57,8 @@ for await (const chunk of stream) {
57
57
  | `firmware/grok-code-fast-1` | 256K | | | | | | $0.20 | $2 |
58
58
  | `firmware/kimi-k2.5` | 256K | | | | | | $0.60 | $3 |
59
59
  | `firmware/minimax-m2-5` | 192K | | | | | | $0.30 | $1 |
60
- | `firmware/zai-glm-5` | 198K | | | | | | $1 | $3 |
60
+ | `firmware/qwen-3-6-plus` | 1.0M | | | | | | $0.50 | $3 |
61
+ | `firmware/zai-glm-5-1` | 198K | | | | | | $1 | $4 |
61
62
 
62
63
  ## Advanced configuration
63
64
 
@@ -87,7 +88,7 @@ const agent = new Agent({
87
88
  model: ({ requestContext }) => {
88
89
  const useAdvanced = requestContext.task === "complex";
89
90
  return useAdvanced
90
- ? "firmware/zai-glm-5"
91
+ ? "firmware/zai-glm-5-1"
91
92
  : "firmware/claude-haiku-4-5";
92
93
  }
93
94
  });
@@ -1,6 +1,6 @@
1
1
  # ![Kilo Gateway logo](https://models.dev/logos/kilo.svg)Kilo Gateway
2
2
 
3
- Access 335 Kilo Gateway models through Mastra's model router. Authentication is handled automatically using the `KILO_API_KEY` environment variable.
3
+ Access 336 Kilo Gateway models through Mastra's model router. Authentication is handled automatically using the `KILO_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [Kilo Gateway documentation](https://kilo.ai).
6
6
 
@@ -169,7 +169,7 @@ for await (const chunk of stream) {
169
169
  | `kilo/minimax/minimax-m2-her` | 66K | | | | | | $0.30 | $1 |
170
170
  | `kilo/minimax/minimax-m2.1` | 197K | | | | | | $0.27 | $0.95 |
171
171
  | `kilo/minimax/minimax-m2.5` | 197K | | | | | | $0.25 | $1 |
172
- | `kilo/minimax/minimax-m2.5:free` | 205K | | | | | | | |
172
+ | `kilo/minimax/minimax-m2.7` | 205K | | | | | | $0.30 | $1 |
173
173
  | `kilo/mistralai/codestral-2508` | 256K | | | | | | $0.30 | $0.90 |
174
174
  | `kilo/mistralai/devstral-2512` | 262K | | | | | | $0.40 | $2 |
175
175
  | `kilo/mistralai/devstral-medium` | 131K | | | | | | $0.40 | $2 |
@@ -369,6 +369,7 @@ for await (const chunk of stream) {
369
369
  | `kilo/z-ai/glm-4.7` | 203K | | | | | | $0.38 | $2 |
370
370
  | `kilo/z-ai/glm-4.7-flash` | 203K | | | | | | $0.06 | $0.40 |
371
371
  | `kilo/z-ai/glm-5` | 203K | | | | | | $0.72 | $2 |
372
+ | `kilo/z-ai/glm-5.1` | 203K | | | | | | $1 | $4 |
372
373
 
373
374
  ## Advanced configuration
374
375
 
@@ -398,7 +399,7 @@ const agent = new Agent({
398
399
  model: ({ requestContext }) => {
399
400
  const useAdvanced = requestContext.task === "complex";
400
401
  return useAdvanced
401
- ? "kilo/z-ai/glm-5"
402
+ ? "kilo/z-ai/glm-5.1"
402
403
  : "kilo/ai21/jamba-large-1.7";
403
404
  }
404
405
  });
@@ -1,6 +1,6 @@
1
1
  # ![NovitaAI logo](https://models.dev/logos/novita-ai.svg)NovitaAI
2
2
 
3
- Access 84 NovitaAI models through Mastra's model router. Authentication is handled automatically using the `NOVITA_API_KEY` environment variable.
3
+ Access 90 NovitaAI models through Mastra's model router. Authentication is handled automatically using the `NOVITA_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [NovitaAI documentation](https://novita.ai/docs/guides/introduction).
6
6
 
@@ -55,8 +55,9 @@ for await (const chunk of stream) {
55
55
  | `novita-ai/deepseek/deepseek-v3.2` | 164K | | | | | | $0.27 | $0.40 |
56
56
  | `novita-ai/deepseek/deepseek-v3.2-exp` | 164K | | | | | | $0.27 | $0.41 |
57
57
  | `novita-ai/google/gemma-3-27b-it` | 98K | | | | | | $0.12 | $0.20 |
58
+ | `novita-ai/google/gemma-4-26b-a4b-it` | 262K | | | | | | $0.13 | $0.40 |
59
+ | `novita-ai/google/gemma-4-31b-it` | 262K | | | | | | $0.14 | $0.40 |
58
60
  | `novita-ai/gryphe/mythomax-l2-13b` | 4K | | | | | | $0.09 | $0.09 |
59
- | `novita-ai/kwaipilot/kat-coder` | 256K | | | | | | — | — |
60
61
  | `novita-ai/kwaipilot/kat-coder-pro` | 256K | | | | | | $0.30 | $1 |
61
62
  | `novita-ai/meta-llama/llama-3-70b-instruct` | 8K | | | | | | $0.51 | $0.74 |
62
63
  | `novita-ai/meta-llama/llama-3-8b-instruct` | 8K | | | | | | $0.04 | $0.04 |
@@ -68,6 +69,8 @@ for await (const chunk of stream) {
68
69
  | `novita-ai/minimax/minimax-m2` | 205K | | | | | | $0.30 | $1 |
69
70
  | `novita-ai/minimax/minimax-m2.1` | 205K | | | | | | $0.30 | $1 |
70
71
  | `novita-ai/minimax/minimax-m2.5` | 205K | | | | | | $0.30 | $1 |
72
+ | `novita-ai/minimax/minimax-m2.5-highspeed` | 205K | | | | | | $0.60 | $2 |
73
+ | `novita-ai/minimax/minimax-m2.7` | 205K | | | | | | $0.30 | $1 |
71
74
  | `novita-ai/minimaxai/minimax-m1-80k` | 1.0M | | | | | | $0.55 | $2 |
72
75
  | `novita-ai/mistralai/mistral-nemo` | 60K | | | | | | $0.04 | $0.17 |
73
76
  | `novita-ai/moonshotai/kimi-k2-0905` | 262K | | | | | | $0.60 | $3 |
@@ -102,12 +105,14 @@ for await (const chunk of stream) {
102
105
  | `novita-ai/qwen/qwen3-vl-30b-a3b-instruct` | 131K | | | | | | $0.20 | $0.70 |
103
106
  | `novita-ai/qwen/qwen3-vl-30b-a3b-thinking` | 131K | | | | | | $0.20 | $1 |
104
107
  | `novita-ai/qwen/qwen3-vl-8b-instruct` | 131K | | | | | | $0.08 | $0.50 |
108
+ | `novita-ai/qwen/qwen3.5-122b-a10b` | 262K | | | | | | $0.40 | $3 |
109
+ | `novita-ai/qwen/qwen3.5-27b` | 262K | | | | | | $0.30 | $2 |
110
+ | `novita-ai/qwen/qwen3.5-35b-a3b` | 262K | | | | | | $0.25 | $2 |
105
111
  | `novita-ai/qwen/qwen3.5-397b-a17b` | 262K | | | | | | $0.60 | $4 |
106
112
  | `novita-ai/sao10k/l3-70b-euryale-v2.1` | 8K | | | | | | $1 | $1 |
107
113
  | `novita-ai/sao10k/l3-8b-lunaris` | 8K | | | | | | $0.05 | $0.05 |
108
114
  | `novita-ai/sao10k/L3-8B-Stheno-v3.2` | 8K | | | | | | $0.05 | $0.05 |
109
115
  | `novita-ai/sao10k/l31-70b-euryale-v2.2` | 8K | | | | | | $1 | $1 |
110
- | `novita-ai/skywork/r1v4-lite` | 262K | | | | | | $0.20 | $0.60 |
111
116
  | `novita-ai/xiaomimimo/mimo-v2-flash` | 262K | | | | | | $0.10 | $0.30 |
112
117
  | `novita-ai/zai-org/autoglm-phone-9b-multilingual` | 66K | | | | | | $0.04 | $0.14 |
113
118
  | `novita-ai/zai-org/glm-4.5` | 131K | | | | | | $0.60 | $2 |
@@ -118,6 +123,7 @@ for await (const chunk of stream) {
118
123
  | `novita-ai/zai-org/glm-4.7` | 205K | | | | | | $0.60 | $2 |
119
124
  | `novita-ai/zai-org/glm-4.7-flash` | 200K | | | | | | $0.07 | $0.40 |
120
125
  | `novita-ai/zai-org/glm-5` | 203K | | | | | | $1 | $3 |
126
+ | `novita-ai/zai-org/glm-5.1` | 205K | | | | | | $1 | $4 |
121
127
 
122
128
  ## Advanced configuration
123
129
 
@@ -147,7 +153,7 @@ const agent = new Agent({
147
153
  model: ({ requestContext }) => {
148
154
  const useAdvanced = requestContext.task === "complex";
149
155
  return useAdvanced
150
- ? "novita-ai/zai-org/glm-5"
156
+ ? "novita-ai/zai-org/glm-5.1"
151
157
  : "novita-ai/baichuan/baichuan-m2-32b";
152
158
  }
153
159
  });
@@ -1,6 +1,6 @@
1
1
  # ![Poe logo](https://models.dev/logos/poe.svg)Poe
2
2
 
3
- Access 127 Poe models through Mastra's model router. Authentication is handled automatically using the `POE_API_KEY` environment variable.
3
+ Access 128 Poe models through Mastra's model router. Authentication is handled automatically using the `POE_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [Poe documentation](https://creator.poe.com/docs/external-applications/openai-compatible-api).
6
6
 
@@ -91,6 +91,7 @@ for await (const chunk of stream) {
91
91
  | `poe/novita/glm-4.7` | 205K | | | | | | — | — |
92
92
  | `poe/novita/glm-4.7-flash` | 200K | | | | | | — | — |
93
93
  | `poe/novita/glm-4.7-n` | 205K | | | | | | — | — |
94
+ | `poe/novita/glm-5` | 205K | | | | | | — | — |
94
95
  | `poe/novita/kimi-k2-thinking` | 256K | | | | | | — | — |
95
96
  | `poe/novita/kimi-k2.5` | 256K | | | | | | — | — |
96
97
  | `poe/novita/minimax-m2.1` | 205K | | | | | | — | — |
@@ -1,6 +1,6 @@
1
1
  # ![SiliconFlow (China) logo](https://models.dev/logos/siliconflow-cn.svg)SiliconFlow (China)
2
2
 
3
- Access 78 SiliconFlow (China) models through Mastra's model router. Authentication is handled automatically using the `SILICONFLOW_CN_API_KEY` environment variable.
3
+ Access 79 SiliconFlow (China) models through Mastra's model router. Authentication is handled automatically using the `SILICONFLOW_CN_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [SiliconFlow (China) documentation](https://cloud.siliconflow.com/models).
6
6
 
@@ -64,6 +64,7 @@ for await (const chunk of stream) {
64
64
  | `siliconflow-cn/Pro/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.55 | $3 |
65
65
  | `siliconflow-cn/Pro/zai-org/GLM-4.7` | 205K | | | | | | $0.60 | $2 |
66
66
  | `siliconflow-cn/Pro/zai-org/GLM-5` | 205K | | | | | | $1 | $3 |
67
+ | `siliconflow-cn/Pro/zai-org/GLM-5.1` | 205K | | | | | | $1 | $4 |
67
68
  | `siliconflow-cn/Qwen/Qwen2.5-14B-Instruct` | 33K | | | | | | $0.10 | $0.10 |
68
69
  | `siliconflow-cn/Qwen/Qwen2.5-32B-Instruct` | 33K | | | | | | $0.18 | $0.18 |
69
70
  | `siliconflow-cn/Qwen/Qwen2.5-72B-Instruct` | 33K | | | | | | $0.59 | $0.59 |
@@ -1,6 +1,6 @@
1
1
  # ![SiliconFlow logo](https://models.dev/logos/siliconflow.svg)SiliconFlow
2
2
 
3
- Access 71 SiliconFlow models through Mastra's model router. Authentication is handled automatically using the `SILICONFLOW_API_KEY` environment variable.
3
+ Access 73 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
 
@@ -105,6 +105,8 @@ for await (const chunk of stream) {
105
105
  | `siliconflow/zai-org/GLM-4.6V` | 131K | | | | | | $0.30 | $0.90 |
106
106
  | `siliconflow/zai-org/GLM-4.7` | 205K | | | | | | $0.60 | $2 |
107
107
  | `siliconflow/zai-org/GLM-5` | 205K | | | | | | $1 | $3 |
108
+ | `siliconflow/zai-org/GLM-5.1` | 205K | | | | | | $1 | $4 |
109
+ | `siliconflow/zai-org/GLM-5V-Turbo` | 200K | | | | | | $1 | $4 |
108
110
 
109
111
  ## Advanced configuration
110
112
 
@@ -134,7 +136,7 @@ const agent = new Agent({
134
136
  model: ({ requestContext }) => {
135
137
  const useAdvanced = requestContext.task === "complex";
136
138
  return useAdvanced
137
- ? "siliconflow/zai-org/GLM-5"
139
+ ? "siliconflow/zai-org/GLM-5V-Turbo"
138
140
  : "siliconflow/ByteDance-Seed/Seed-OSS-36B-Instruct";
139
141
  }
140
142
  });
@@ -1,6 +1,6 @@
1
1
  # ![Together AI logo](https://models.dev/logos/togetherai.svg)Together AI
2
2
 
3
- Access 13 Together AI models through Mastra's model router. Authentication is handled automatically using the `TOGETHER_API_KEY` environment variable.
3
+ Access 14 Together AI models through Mastra's model router. Authentication is handled automatically using the `TOGETHER_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [Together AI documentation](https://docs.together.ai/docs/serverless-models).
6
6
 
@@ -36,6 +36,7 @@ for await (const chunk of stream) {
36
36
  | `togetherai/deepseek-ai/DeepSeek-V3` | 131K | | | | | | $1 | $1 |
37
37
  | `togetherai/deepseek-ai/DeepSeek-V3-1` | 131K | | | | | | $0.60 | $2 |
38
38
  | `togetherai/essentialai/Rnj-1-Instruct` | 33K | | | | | | $0.15 | $0.15 |
39
+ | `togetherai/google/gemma-4-31B-it` | 262K | | | | | | $0.20 | $0.50 |
39
40
  | `togetherai/meta-llama/Llama-3.3-70B-Instruct-Turbo` | 131K | | | | | | $0.88 | $0.88 |
40
41
  | `togetherai/MiniMaxAI/MiniMax-M2.5` | 205K | | | | | | $0.30 | $1 |
41
42
  | `togetherai/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.50 | $3 |
@@ -44,7 +45,7 @@ for await (const chunk of stream) {
44
45
  | `togetherai/Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8` | 262K | | | | | | $2 | $2 |
45
46
  | `togetherai/Qwen/Qwen3-Coder-Next-FP8` | 262K | | | | | | $0.50 | $1 |
46
47
  | `togetherai/Qwen/Qwen3.5-397B-A17B` | 262K | | | | | | $0.60 | $4 |
47
- | `togetherai/zai-org/GLM-5` | 203K | | | | | | $1 | $3 |
48
+ | `togetherai/zai-org/GLM-5.1` | 203K | | | | | | $1 | $4 |
48
49
 
49
50
  ## Advanced configuration
50
51
 
@@ -73,7 +74,7 @@ const agent = new Agent({
73
74
  model: ({ requestContext }) => {
74
75
  const useAdvanced = requestContext.task === "complex";
75
76
  return useAdvanced
76
- ? "togetherai/zai-org/GLM-5"
77
+ ? "togetherai/zai-org/GLM-5.1"
77
78
  : "togetherai/MiniMaxAI/MiniMax-M2.5";
78
79
  }
79
80
  });
@@ -544,11 +544,14 @@ export const mastra = new Mastra({
544
544
  server: {
545
545
  auth: new MastraJwtAuth({
546
546
  secret: process.env.MASTRA_JWT_SECRET,
547
+ mapUserToResourceId: user => user.id,
547
548
  }),
548
549
  },
549
550
  })
550
551
  ```
551
552
 
553
+ The `mapUserToResourceId` callback maps the authenticated user to a resource ID for memory/thread scoping. When provided, it's called after successful authentication and the returned value is set on the request context as `MASTRA_RESOURCE_ID_KEY`. See [Authorization (User Isolation)](https://mastra.ai/docs/server/middleware) for details.
554
+
552
555
  ### server.bodySizeLimit
553
556
 
554
557
  **Type:** `number`\
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 1.1.25-alpha.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`8fad147`](https://github.com/mastra-ai/mastra/commit/8fad14759804179c8e080ce4d9dec6ef1a808b31), [`582644c`](https://github.com/mastra-ai/mastra/commit/582644c4a87f83b4f245a84d72b9e8590585012e), [`5d84914`](https://github.com/mastra-ai/mastra/commit/5d84914e0e520c642a40329b210b413fcd139898), [`fd2f314`](https://github.com/mastra-ai/mastra/commit/fd2f31473d3449b6b97e837ef8641264377f41a7), [`e80fead`](https://github.com/mastra-ai/mastra/commit/e80fead1412cc0d1b2f7d6a1ce5017d9e0098ff7), [`0287b64`](https://github.com/mastra-ai/mastra/commit/0287b644a5c3272755cf3112e71338106664103b)]:
8
+ - @mastra/core@1.25.0-alpha.1
9
+
3
10
  ## 1.1.25-alpha.0
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.1.25-alpha.1",
3
+ "version": "1.1.25-alpha.4",
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.24.2-alpha.0",
33
- "@mastra/mcp": "^1.4.2"
32
+ "@mastra/mcp": "^1.4.2",
33
+ "@mastra/core": "1.25.0-alpha.1"
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": "^5.9.3",
48
48
  "vitest": "4.0.18",
49
+ "@internal/lint": "0.0.82",
49
50
  "@internal/types-builder": "0.0.57",
50
- "@mastra/core": "1.24.2-alpha.0",
51
- "@internal/lint": "0.0.82"
51
+ "@mastra/core": "1.25.0-alpha.1"
52
52
  },
53
53
  "homepage": "https://mastra.ai",
54
54
  "repository": {