@mastra/mcp 2.5.0-alpha.1 → 2.5.0-alpha.2
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/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-guides-mcp-authentication-authorization.md +2 -2
- package/dist/index.cjs +1321 -11192
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1269 -11144
- package/dist/index.js.map +1 -1
- package/dist/shared/events/capability.d.ts +25 -0
- package/dist/shared/events/capability.d.ts.map +1 -0
- package/dist/shared/events/constants.d.ts +53 -0
- package/dist/shared/events/constants.d.ts.map +1 -0
- package/dist/shared/events/index.d.ts +5 -0
- package/dist/shared/events/index.d.ts.map +1 -0
- package/dist/shared/events/schemas.d.ts +356 -0
- package/dist/shared/events/schemas.d.ts.map +1 -0
- package/dist/shared/events/types.d.ts +37 -0
- package/dist/shared/events/types.d.ts.map +1 -0
- package/package.json +8 -7
package/dist/docs/SKILL.md
CHANGED
|
@@ -47,7 +47,7 @@ A separate provider per MCP server does one thing and not another:
|
|
|
47
47
|
|
|
48
48
|
The specification recommends support for **Client ID Metadata Documents (CIMD)**, which identify a client through an HTTPS metadata URL. It also defines pre-registration. Clients that support all registration options should prefer existing pre-registered information when available. Legacy Dynamic Client Registration (DCR) remains optional for compatibility but is deprecated for new implementations. See the versioned [client registration rules](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization/client-registration).
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
`MCPOAuthClientProvider` never registers a client at runtime and doesn't support DCR. Configure exactly one client identity: `clientInformation` for a client pre-registered with the authorization server, or `clientMetadataUrl` for CIMD. Check that your authorization server supports the mechanism you choose before deploying. See the [OAuth client reference](https://mastra.ai/reference/tools/mcp-client) for configuration examples.
|
|
51
51
|
|
|
52
52
|
Mastra's interactive `authenticate()` flow uses a local loopback callback server. It isn't a hosted multi-user login endpoint. A hosted application must own its callback endpoint and associate each authorization attempt with the correct user and provider. See [interactive browser authentication](https://mastra.ai/reference/tools/mcp-client).
|
|
53
53
|
|
|
@@ -97,7 +97,7 @@ Protecting Mastra routes with `server.auth` and providing interoperable OAuth di
|
|
|
97
97
|
|
|
98
98
|
Alongside the MCP transport, Mastra registers REST routes used by Studio to list servers, inspect tools, execute tools, and read resources. See the [MCP routes reference](https://mastra.ai/reference/server/routes) for the full list. These paths use the default `/api` prefix.
|
|
99
99
|
|
|
100
|
-
The `POST /api/mcp/:serverId/tools/:toolId/execute` route calls `executeTool()` directly, without a protocol client. With a Mastra FGA provider configured, `MCPServer.executeTool()` enforces tool execution permission using the user in `requestContext`. The REST tool list also filters tools through FGA
|
|
100
|
+
The `POST /api/mcp/:serverId/tools/:toolId/execute` route calls `executeTool()` directly, without a protocol client. With a Mastra FGA provider configured, `MCPServer.executeTool()` enforces tool execution permission using the user in `requestContext`. The REST tool list also filters tools through FGA, but these permission checks don't replace route authentication.
|
|
101
101
|
|
|
102
102
|
Built-in authentication for these routes depends on `server.auth`. Without it, `requiresAuth: true` doesn't enforce authentication. Custom middleware that checks only the `/mcp` or `/sse` transport paths leaves the REST routes open. If you use custom middleware instead of `server.auth`, default-deny `/api/mcp/*` and allow access only after authentication.
|
|
103
103
|
|