@mastra/mcp-docs-server 1.1.38-alpha.1 → 1.1.38-alpha.3

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.
@@ -87,6 +87,74 @@ permissionMapping: {
87
87
 
88
88
  If no mapping exists for a permission, the original string is passed through.
89
89
 
90
+ Use `validatePermissions()` to validate the full set of permissions Mastra may emit at startup. Use this when a provider requires every Mastra permission to have an explicit provider permission slug.
91
+
92
+ ### Route policy coverage
93
+
94
+ Mastra includes route-level FGA metadata for built-in resource routes, including agents, workflows, tools, MCP tools, memory threads, responses, and conversations. A route is checked when it has route-level `fga` metadata, when Mastra can derive built-in metadata for that route, or when the provider supplies metadata with `resolveRouteFGA()`.
95
+
96
+ To deny protected routes that do not resolve FGA metadata, configure route policy coverage on the FGA provider:
97
+
98
+ ```typescript
99
+ const fga = new MastraFGAWorkos({
100
+ resourceMapping: {
101
+ project: { fgaResourceType: 'project' },
102
+ },
103
+ permissionMapping: {
104
+ 'projects:read': 'read',
105
+ },
106
+ requireForProtectedRoutes: true,
107
+ auditProtectedRoutes: 'warn',
108
+ validatePermissions: async permissions => {
109
+ // Throw if a Mastra permission is missing from permissionMapping.
110
+ },
111
+ });
112
+ ```
113
+
114
+ Set `auditProtectedRoutes: 'error'` to fail startup when protected routes are missing built-in FGA metadata. If `requireForProtectedRoutes` is enabled, Mastra logs this audit as a warning by default.
115
+
116
+ For custom routes, prefer route-level `fga` metadata. This keeps authorization policy next to the route:
117
+
118
+ ```typescript
119
+ import { createRoute } from '@mastra/server/server-adapter';
120
+
121
+ export const getProjectRoute = createRoute({
122
+ method: 'GET',
123
+ path: '/projects/:projectId',
124
+ responseType: 'json',
125
+ requiresAuth: true,
126
+ fga: {
127
+ resourceType: 'project',
128
+ resourceIdParam: 'projectId',
129
+ permission: 'projects:read',
130
+ },
131
+ handler: async () => {
132
+ return { project: null };
133
+ },
134
+ });
135
+ ```
136
+
137
+ Use `resolveRouteFGA()` only when route metadata must be derived centrally from route, params, or request context. A route map scales better than string-prefix checks:
138
+
139
+ ```typescript
140
+ import type { FGARouteConfig, FGARouteResolver } from '@mastra/core/auth/ee';
141
+
142
+ const routeFGA = {
143
+ 'GET /billing/:accountId': {
144
+ resourceType: 'account',
145
+ resourceIdParam: 'accountId',
146
+ permission: 'billing:read',
147
+ },
148
+ } satisfies Record<string, FGARouteConfig>;
149
+
150
+ const resolveRouteFGA: FGARouteResolver = ({ route }) => routeFGA[`${route.method} ${route.path}`];
151
+
152
+ const fga = new MastraFGAWorkos({
153
+ /* ... */
154
+ resolveRouteFGA,
155
+ });
156
+ ```
157
+
90
158
  ## Enforcement points
91
159
 
92
160
  When an FGA provider is configured, Mastra automatically checks authorization at these lifecycle points:
@@ -98,7 +166,7 @@ When an FGA provider is configured, Mastra automatically checks authorization at
98
166
  | Tool execution | `tools:execute` | `{ type: 'tool', id: toolName }` |
99
167
  | Thread/memory access | `memory:read`, `memory:write`, `memory:delete` | `{ type: 'thread', id: threadId }` |
100
168
  | MCP tool execution | `tools:execute` | `{ type: 'tool', id: toolName }` |
101
- | HTTP routes (opt-in) | Configured per route | Configured per route |
169
+ | HTTP resource routes | Configured per route | Configured per route |
102
170
 
103
171
  All checks are **no-ops when FGA is not configured**, maintaining backward compatibility.
104
172
 
@@ -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 3962 models from 117 providers through a single API.
3
+ Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 3967 models from 118 providers through a single API.
4
4
 
5
5
  ## Features
6
6
 
@@ -0,0 +1,75 @@
1
+ # ![Umans AI Coding Plan logo](https://models.dev/logos/umans-ai-coding-plan.svg)Umans AI Coding Plan
2
+
3
+ Access 5 Umans AI Coding Plan models through Mastra's model router. Authentication is handled automatically using the `UMANS_AI_CODING_PLAN_API_KEY` environment variable.
4
+
5
+ Learn more in the [Umans AI Coding Plan documentation](https://app.umans.ai/offers/code/docs).
6
+
7
+ ```bash
8
+ UMANS_AI_CODING_PLAN_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: "umans-ai-coding-plan/umans-coder"
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 [Umans AI Coding Plan documentation](https://app.umans.ai/offers/code/docs) for details.
32
+
33
+ ## Models
34
+
35
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
36
+ | -------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
37
+ | `umans-ai-coding-plan/umans-coder` | 262K | | | | | | — | — |
38
+ | `umans-ai-coding-plan/umans-flash` | 262K | | | | | | — | — |
39
+ | `umans-ai-coding-plan/umans-glm-5.1` | 205K | | | | | | — | — |
40
+ | `umans-ai-coding-plan/umans-kimi-k2.6` | 262K | | | | | | — | — |
41
+ | `umans-ai-coding-plan/umans-qwen3.6-35b-a3b` | 262K | | | | | | — | — |
42
+
43
+ ## Advanced configuration
44
+
45
+ ### Custom headers
46
+
47
+ ```typescript
48
+ const agent = new Agent({
49
+ id: "custom-agent",
50
+ name: "custom-agent",
51
+ model: {
52
+ url: "https://api.code.umans.ai/v1",
53
+ id: "umans-ai-coding-plan/umans-coder",
54
+ apiKey: process.env.UMANS_AI_CODING_PLAN_API_KEY,
55
+ headers: {
56
+ "X-Custom-Header": "value"
57
+ }
58
+ }
59
+ });
60
+ ```
61
+
62
+ ### Dynamic model selection
63
+
64
+ ```typescript
65
+ const agent = new Agent({
66
+ id: "dynamic-agent",
67
+ name: "Dynamic Agent",
68
+ model: ({ requestContext }) => {
69
+ const useAdvanced = requestContext.task === "complex";
70
+ return useAdvanced
71
+ ? "umans-ai-coding-plan/umans-qwen3.6-35b-a3b"
72
+ : "umans-ai-coding-plan/umans-coder";
73
+ }
74
+ });
75
+ ```
@@ -34,7 +34,7 @@ for await (const chunk of stream) {
34
34
 
35
35
  | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
36
36
  | --------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
37
- | `xpersona/xpersona-frieren-coder` | 128K | | | | | | $2 | $6 |
37
+ | `xpersona/xpersona-frieren-coder` | 400K | | | | | | $2 | $6 |
38
38
 
39
39
  ## Advanced configuration
40
40
 
@@ -99,6 +99,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
99
99
  - [Tencent TokenHub](https://mastra.ai/models/providers/tencent-tokenhub)
100
100
  - [The Grid AI](https://mastra.ai/models/providers/the-grid-ai)
101
101
  - [Together AI](https://mastra.ai/models/providers/togetherai)
102
+ - [Umans AI Coding Plan](https://mastra.ai/models/providers/umans-ai-coding-plan)
102
103
  - [Upstage](https://mastra.ai/models/providers/upstage)
103
104
  - [Vivgrid](https://mastra.ai/models/providers/vivgrid)
104
105
  - [Vultr](https://mastra.ai/models/providers/vultr)
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 1.1.38-alpha.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`bad08e9`](https://github.com/mastra-ai/mastra/commit/bad08e99c5291884c3ac76743c78c74f53a302c2)]:
8
+ - @mastra/core@1.35.0-alpha.1
9
+
3
10
  ## 1.1.38-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.38-alpha.1",
3
+ "version": "1.1.38-alpha.3",
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.34.1-alpha.0",
32
+ "@mastra/core": "1.35.0-alpha.1",
33
33
  "@mastra/mcp": "^1.7.0"
34
34
  },
35
35
  "devDependencies": {
@@ -48,7 +48,7 @@
48
48
  "vitest": "4.1.5",
49
49
  "@internal/lint": "0.0.95",
50
50
  "@internal/types-builder": "0.0.70",
51
- "@mastra/core": "1.34.1-alpha.0"
51
+ "@mastra/core": "1.35.0-alpha.1"
52
52
  },
53
53
  "homepage": "https://mastra.ai",
54
54
  "repository": {