@mastra/mcp 2.8.0 → 2.9.0-alpha.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAA8B,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAG7E,OAAO,KAAK,EAAmB,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAShE,OAAO,KAAK,EAGV,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,2BAA2B,EAG3B,kBAAkB,EAMnB,MAAM,8BAA8B,CAAC;AAatC,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,gBAAgB,EAChB,4BAA4B,EAC5B,qBAAqB,EACrB,8BAA8B,EAC/B,MAAM,kBAAkB,CAAC;AAO1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpD,OAAO,KAAK,EAAc,kBAAkB,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAIrH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAMlD,OAAO,KAAK,EAGV,eAAe,EAEf,8BAA8B,EAG9B,uBAAuB,EAGvB,6BAA6B,EAC9B,MAAM,SAAS,CAAC;AAIjB,YAAY,EACV,YAAY,EACZ,UAAU,EACV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C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAWzB;YAEY,sBAAsB;IAUpC,OAAO,CAAC,kBAAkB;IAO1B;;;;;;;OAOG;IACH,OAAO,CAAC,mBAAmB;IAc3B;;OAEG;IACG,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAAC,CAU9E;IAED,OAAO,CAAC,wBAAwB;IAoBhC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,UAAU,EAAE,EAAE;QAAE,UAAU,EAAE,6BAA6B,CAAA;KAAE,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CA4B1G;IAEK,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAiB/D;IAED;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAkW9B,iEAAiE;IACjE,IAAI,KAAK,IAAI,IAAI,CAAC,aAAa,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC,CAE5D;IAED;;;OAGG;IACH,OAAO,CAAC,wBAAwB;IAShC;;;;;OAKG;YACW,aAAa;IA6F3B,OAAO,CAAC,mBAAmB;CAQ5B"}
@@ -8,6 +8,15 @@
8
8
  * protocol errors are never reconnectable.
9
9
  */
10
10
  export declare function isReconnectableMCPError(error: unknown): boolean;
11
+ /**
12
+ * Whether a reconnectable failure proves the request never reached the server's
13
+ * handler, so sending it again cannot repeat its effects.
14
+ *
15
+ * A reset socket (`fetch failed` with `UND_ERR_SOCKET`), a cut-off response
16
+ * (`terminated`) or a closed transport (`Connection closed`) can all follow a
17
+ * request the server already received and ran, so they return false.
18
+ */
19
+ export declare function isUnsentRequestError(error: unknown): boolean;
11
20
  /**
12
21
  * Whether a failed `tasks/get` poll should be retried while waiting out an outage.
13
22
  *
@@ -1 +1 @@
1
- {"version":3,"file":"error-utils.d.ts","sourceRoot":"","sources":["../../src/client/error-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAmB/D;AAID;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAMlE;AAED,0EAA0E;AAC1E,MAAM,WAAW,wBAAwB;IACvC,8FAA8F;IAC9F,OAAO,EAAE,MAAM,CAAC;IAChB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qGAAqG;IACrG,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AAoCD;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,wBAAwB,CAmDpF"}
1
+ {"version":3,"file":"error-utils.d.ts","sourceRoot":"","sources":["../../src/client/error-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAmB/D;AAKD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAoB5D;AAID;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAMlE;AAED,0EAA0E;AAC1E,MAAM,WAAW,wBAAwB;IACvC,8FAA8F;IAC9F,OAAO,EAAE,MAAM,CAAC;IAChB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qGAAqG;IACrG,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AAoCD;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,wBAAwB,CAmDpF"}
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-callback-server.d.ts","sourceRoot":"","sources":["../../src/client/oauth-callback-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAkCH;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;;;;;;;OASG;IACH,WAAW,EAAE,MAAM,GAAG,GAAG,CAAC;IAE1B;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,GAAG,EAAE,GAAG,CAAC;IAET;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;;OAOG;IACH,WAAW,CAAC,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAE5E;;;OAGG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,GAAG,GAAG,GAAG,EAAE,CAezE;AAmCD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,yBAAyB,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,mBAAmB,CAAC,CA8IjH"}
1
+ {"version":3,"file":"oauth-callback-server.d.ts","sourceRoot":"","sources":["../../src/client/oauth-callback-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAkCH;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;;;;;;;OASG;IACH,WAAW,EAAE,MAAM,GAAG,GAAG,CAAC;IAE1B;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,GAAG,EAAE,GAAG,CAAC;IAET;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;;OAOG;IACH,WAAW,CAAC,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAE5E;;;OAGG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,GAAG,GAAG,GAAG,EAAE,CAezE;AAmCD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,yBAAyB,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAgJjH"}
@@ -3,7 +3,7 @@ name: mastra-mcp
3
3
  description: Documentation for @mastra/mcp. Use when working with @mastra/mcp APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/mcp"
6
- version: "2.8.0"
6
+ version: "2.9.0-alpha.1"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -18,14 +18,11 @@ Read the individual reference documents for detailed explanations and code examp
18
18
 
19
19
  - [Fine-Grained Authorization (FGA)](references/docs-auth-fga.md) - Configure Mastra Fine-Grained Authorization for resource-level permissions that map routes to actions and scope stored resources for enterprise users.
20
20
  - [MCP](references/docs-connections-mcp.md) - Connect Mastra agents to remote MCP servers, expose Mastra tools through MCPServer, manage approvals, subscribe to MCP events, and build interactive MCP Apps for Studio.
21
- - [Connections](references/docs-connections-overview.md) - Connect Mastra to remote agents, coding agents, SDK runtimes, MCP servers, and external tools by choosing the protocol that fits your application.
22
21
  - [MCP authentication and authorization](references/docs-guides-mcp-authentication-authorization.md) - Choose credentials for MCP connections, protect a Mastra MCP server, and separate delegated access from tool and data permissions.
23
22
 
24
23
  ### Reference
25
24
 
26
25
  - [Reference: Tool configuration](references/reference-editor-tools.md) - Configure Editor agent tools from Mastra, MCP, workspace, and provider sources, including descriptions, display conditions, and resolution order.
27
- - [Migration: @mastra/mcp v1 to v2](references/reference-migrations-mcp-v2.md) - Migrate @mastra/mcp to v2, which serves only the MCP 2026-07-28 revision and replaces elicitation with suspend/resume. Clients still connect to older servers.
28
- - [MCP](references/reference-migrations-upgrade-to-v1-mcp.md) - MCP (Model Context Protocol) tool execution context has been reorganized, and deprecated client classes have been removed.
29
26
  - [Reference: MCPClient](references/reference-tools-mcp-client.md) - The MCPClient class provides a way to manage multiple MCP server connections and their tools in a Mastra application.
30
27
  - [Reference: MCPServer](references/reference-tools-mcp-server.md) - The MCPServer class provides the functionality to expose your existing Mastra tools and Agents as a Model Context Protocol (MCP) server.
31
28
 
@@ -1,6 +1,197 @@
1
1
  {
2
- "version": "2.8.0",
2
+ "version": "2.9.0-alpha.1",
3
3
  "package": "@mastra/mcp",
4
- "exports": {},
4
+ "exports": {
5
+ "InMemoryMCPEventCursorStore": {
6
+ "types": "dist/integrations/events-cursor-store.d.ts",
7
+ "implementation": "dist/index.js",
8
+ "line": 25349
9
+ },
10
+ "InMemoryMCPTaskStore": {
11
+ "types": "dist/server/tasks/in-memory-store.d.ts",
12
+ "implementation": "dist/index.js",
13
+ "line": 22124
14
+ },
15
+ "InMemoryOAuthStorage": {
16
+ "types": "dist/client/oauth-provider.d.ts",
17
+ "implementation": "dist/index.js",
18
+ "line": 17722
19
+ },
20
+ "InMemoryWebhookSubscriptionStore": {
21
+ "types": "dist/server/events/webhook-store.d.ts",
22
+ "implementation": "dist/index.js",
23
+ "line": 20494
24
+ },
25
+ "InternalMastraMCPClient": {
26
+ "types": "dist/client/client.d.ts",
27
+ "implementation": "dist/index.js",
28
+ "line": 16060
29
+ },
30
+ "MCPClient": {
31
+ "types": "dist/client/configuration.d.ts",
32
+ "implementation": "dist/index.js",
33
+ "line": 18215
34
+ },
35
+ "MCPClientServerProxy": {
36
+ "types": "dist/client/server-proxy.d.ts",
37
+ "implementation": "dist/index.js",
38
+ "line": 18063
39
+ },
40
+ "MCPEventsSignalProvider": {
41
+ "types": "dist/integrations/events-signals.d.ts",
42
+ "implementation": "dist/index.js",
43
+ "line": 25534
44
+ },
45
+ "MCPOAuthClientProvider": {
46
+ "types": "dist/client/oauth-provider.d.ts",
47
+ "implementation": "dist/index.js",
48
+ "line": 17774
49
+ },
50
+ "MCPServer": {
51
+ "types": "dist/server/server.d.ts",
52
+ "implementation": "dist/index.js",
53
+ "line": 23139
54
+ },
55
+ "MCPTaskLimitError": {
56
+ "types": "dist/server/tasks/store.d.ts",
57
+ "implementation": "dist/index.js",
58
+ "line": 21306
59
+ },
60
+ "MCP_CALL_TOOL_CONTENT": {
61
+ "types": "dist/client/client.d.ts",
62
+ "implementation": "dist/index.js",
63
+ "line": 15904
64
+ },
65
+ "MCP_CALL_TOOL_META": {
66
+ "types": "dist/client/client.d.ts",
67
+ "implementation": "dist/index.js",
68
+ "line": 15906
69
+ },
70
+ "MCP_CLIENT_PROTOCOL_VERSION": {
71
+ "types": "dist/client/types.d.ts",
72
+ "implementation": "dist/index.js",
73
+ "line": 32
74
+ },
75
+ "MCP_DISCOVERY_TIMEOUT_CODE": {
76
+ "types": "dist/client/configuration.d.ts",
77
+ "implementation": "dist/index.js",
78
+ "line": 18184
79
+ },
80
+ "MCP_PROTOCOL_VERSION": {
81
+ "types": "dist/server/types.d.ts",
82
+ "implementation": "dist/index.js",
83
+ "line": 25076
84
+ },
85
+ "ServerEventActions": {
86
+ "types": "dist/server/events/actions.d.ts",
87
+ "implementation": "dist/index.js",
88
+ "line": 19595
89
+ },
90
+ "ServerPromptActions": {
91
+ "types": "dist/server/actions.d.ts",
92
+ "implementation": "dist/index.js",
93
+ "line": 19575
94
+ },
95
+ "ServerResourceActions": {
96
+ "types": "dist/server/actions.d.ts",
97
+ "implementation": "dist/index.js",
98
+ "line": 19561
99
+ },
100
+ "ServerToolActions": {
101
+ "types": "dist/server/actions.d.ts",
102
+ "implementation": "dist/index.js",
103
+ "line": 19543
104
+ },
105
+ "createIntrospectionValidator": {
106
+ "types": "dist/server/oauth-middleware.d.ts",
107
+ "implementation": "dist/index.js",
108
+ "line": 25268
109
+ },
110
+ "createOAuthCallbackServer": {
111
+ "types": "dist/client/oauth-callback-server.d.ts",
112
+ "implementation": "dist/index.js",
113
+ "line": 17604
114
+ },
115
+ "createOAuthMiddleware": {
116
+ "types": "dist/server/oauth-middleware.d.ts",
117
+ "implementation": "dist/index.js",
118
+ "line": 25121
119
+ },
120
+ "createSimpleTokenProvider": {
121
+ "types": "dist/client/oauth-provider.d.ts",
122
+ "implementation": "dist/index.js",
123
+ "line": 18037
124
+ },
125
+ "createStaticTokenValidator": {
126
+ "types": "dist/server/oauth-middleware.d.ts",
127
+ "implementation": "dist/index.js",
128
+ "line": 25237
129
+ },
130
+ "defineEvent": {
131
+ "types": "dist/server/events/define-event.d.ts",
132
+ "implementation": "dist/index.js",
133
+ "line": 25339
134
+ },
135
+ "extractBearerToken": {
136
+ "types": "dist/shared/oauth-types.d.ts",
137
+ "implementation": "dist/index.js",
138
+ "line": 13220
139
+ },
140
+ "generateProtectedResourceMetadata": {
141
+ "types": "dist/shared/oauth-types.d.ts",
142
+ "implementation": "dist/index.js",
143
+ "line": 13204
144
+ },
145
+ "generateWWWAuthenticateHeader": {
146
+ "types": "dist/shared/oauth-types.d.ts",
147
+ "implementation": "dist/index.js",
148
+ "line": 13189
149
+ },
150
+ "getCallbackUrlCandidates": {
151
+ "types": "dist/client/oauth-callback-server.d.ts",
152
+ "implementation": "dist/index.js",
153
+ "line": 17537
154
+ },
155
+ "getMcpCallToolContent": {
156
+ "types": "dist/client/client.d.ts",
157
+ "implementation": "dist/index.js",
158
+ "line": 15926
159
+ },
160
+ "getMcpCallToolMeta": {
161
+ "types": "dist/client/client.d.ts",
162
+ "implementation": "dist/index.js",
163
+ "line": 15935
164
+ },
165
+ "isMCPTaskStoreAdmin": {
166
+ "types": "dist/server/tasks/store.d.ts",
167
+ "implementation": "dist/index.js",
168
+ "line": 21357
169
+ },
170
+ "isWorkflowTaskContext": {
171
+ "types": "dist/server/tasks/workflow-runs.d.ts",
172
+ "implementation": "dist/index.js",
173
+ "line": 22897
174
+ },
175
+ "principalKeyOf": {
176
+ "types": "dist/server/tasks/store.d.ts",
177
+ "implementation": "dist/index.js",
178
+ "line": 21298
179
+ },
180
+ "taskKeyOf": {
181
+ "types": "dist/shared/tasks/task-id.d.ts",
182
+ "implementation": "dist/index.js",
183
+ "line": 13384
184
+ },
185
+ "traceContextFromMeta": {
186
+ "types": "dist/shared/trace-context.d.ts",
187
+ "implementation": "dist/index.js",
188
+ "line": 13406
189
+ },
190
+ "traceContextToMeta": {
191
+ "types": "dist/shared/trace-context.d.ts",
192
+ "implementation": "dist/index.js",
193
+ "line": 13418
194
+ }
195
+ },
5
196
  "modules": {}
6
197
  }
@@ -8,7 +8,7 @@ Mastra supports the [Model Context Protocol (MCP)](https://modelcontextprotocol.
8
8
 
9
9
  Use [`MCPClient`](https://mastra.ai/reference/tools/mcp-client) to connect to MCP servers. Use [`MCPServer`](https://mastra.ai/reference/tools/mcp-server) to expose Mastra agents, tools, workflows, prompts, and resources to other MCP-compatible systems. Both speak the MCP `2026-07-28` revision over stdio and Streamable HTTP.
10
10
 
11
- For hosted MCP servers such as Neon and Canva, [Connect](https://mastra.ai/docs/mastra-platform/connect/providers) on Mastra platform can manage the OAuth flow and credentials for you, so agents get the server's tools through [`tools()`](https://mastra.ai/docs/mastra-platform/connect/tools) without a hand-configured `MCPClient`.
11
+ For hosted MCP servers such as [Neon](https://mastra.ai/integrations/databases/neon) and [Canva](https://mastra.ai/integrations/other/canva), [Connect](https://mastra.ai/docs/mastra-platform/connect) on Mastra platform can manage the OAuth flow and credentials for you, so agents get the server's tools through [`tools()`](https://mastra.ai/reference/connect/tools) without a hand-configured `MCPClient`.
12
12
 
13
13
  > **Note:** Upgrading from `@mastra/mcp` 1.x? See the [migration guide](https://mastra.ai/reference/migrations/mcp-v2).
14
14
 
@@ -443,6 +443,71 @@ export const mastra = new Mastra({
443
443
 
444
444
  Tools loaded through `listTools()` include a `serverId` in `_meta.ui`, allowing Studio to resolve each app resource without scanning every server. Visit [`toMCPServerProxies()`](https://mastra.ai/reference/tools/mcp-client) for proxy configuration details.
445
445
 
446
+ ### Use prebuilt Mastra apps
447
+
448
+ The `@mastra/mcp-apps-components` package includes prebuilt MCP Apps. Each one is a self-contained HTML page that you register as an app resource, next to the tools it talks to.
449
+
450
+ **npm**:
451
+
452
+ ```bash
453
+ npm install @mastra/mcp-apps-components
454
+ ```
455
+
456
+ **pnpm**:
457
+
458
+ ```bash
459
+ pnpm add @mastra/mcp-apps-components
460
+ ```
461
+
462
+ **Yarn**:
463
+
464
+ ```bash
465
+ yarn add @mastra/mcp-apps-components
466
+ ```
467
+
468
+ **Bun**:
469
+
470
+ ```bash
471
+ bun add @mastra/mcp-apps-components
472
+ ```
473
+
474
+ `greetingApp` greets someone by name. The host sends it the arguments of the tool that opened it, and the app reads `name`. It then calls the `getGreeting` tool on the same server for its data and shows the `greeting` from the result. Mark `getGreeting` as app-only with `visibility: ['app']`, so the model doesn't see it:
475
+
476
+ ```typescript
477
+ import { createTool } from '@mastra/core/tools'
478
+ import { MCPServer } from '@mastra/mcp'
479
+ import { greetingApp } from '@mastra/mcp-apps-components'
480
+ import { z } from 'zod'
481
+
482
+ const uri = 'ui://mastra/greeting'
483
+
484
+ export const greetingServer = new MCPServer({
485
+ id: 'greeting-server',
486
+ name: 'Greeting Server',
487
+ version: '1.0.0',
488
+ appResources: { [uri]: greetingApp },
489
+ tools: {
490
+ showGreeting: createTool({
491
+ id: 'showGreeting',
492
+ description: 'Shows a greeting card for someone',
493
+ inputSchema: z.object({ name: z.string() }),
494
+ mcp: { _meta: { ui: { resourceUri: uri } } },
495
+ execute: async ({ name }) => ({ name }),
496
+ }),
497
+ getGreeting: createTool({
498
+ id: 'getGreeting',
499
+ description: 'Returns the greeting for a name',
500
+ inputSchema: z.object({ name: z.string() }),
501
+ outputSchema: z.object({ greeting: z.string() }),
502
+ mcp: { _meta: { ui: { resourceUri: uri, visibility: ['app'] } } },
503
+ execute: async ({ name }) => ({ greeting: `Hello, ${name}!` }),
504
+ }),
505
+ },
506
+ })
507
+ ```
508
+
509
+ `getGreeting` runs on your server, so it can call any API with your server's credentials. The app's iframe has no network access of its own.
510
+
446
511
  ### Sandbox security
447
512
 
448
513
  Mastra Studio uses [`@mcp-ui/client`](https://www.npmjs.com/package/@mcp-ui/client) to load app HTML through a sandbox proxy and communicate over JSON-RPC with `postMessage`.
@@ -414,6 +414,8 @@ Tool results returned by MCP servers flow into your agent's context as model inp
414
414
 
415
415
  Retrieves all tools from all configured servers, with tool names namespaced by their server name (in the format `serverName_toolName`) to prevent conflicts. Intended to be passed onto an Agent definition.
416
416
 
417
+ App-only tools, whose `_meta.ui.visibility` omits `"model"`, are left out. `listToolsets()` and `listToolDefinitions()` leave them out too.
418
+
417
419
  ```ts
418
420
  new Agent({ id: 'agent', tools: await mcp.listTools() })
419
421
  ```
@@ -503,6 +505,8 @@ const retry = await mcp.listToolsetsWithErrors({ serverNames: timedOut })
503
505
 
504
506
  Returns every server's tools as plain, serializable definitions, grouped by server name and keyed by the server's own tool name (without the `serverName_toolName` namespacing that `listTools()` applies).
505
507
 
508
+ Like `listTools()`, it leaves out app-only tools, whose `_meta.ui.visibility` omits `"model"`. An MCP App calls those through its host, so they never reach an agent.
509
+
506
510
  Unlike `listTools()`, the result contains no functions or references to a live client, so it can be passed through `JSON.stringify` and cached in Redis or a database, as well as a build artifact. Each definition holds the data from the MCP `tools/list` response (name, title, description, input schema, output schema, annotations, and `_meta`), plus the server name, version, and instructions captured at discovery time.
507
511
 
508
512
  ```typescript
@@ -625,6 +625,8 @@ export type MCPServerResourceContent = { text?: string } | { blob?: string }
625
625
 
626
626
  Every callback receives `extra`, the same protocol context tools see as `context.mcp.extra` (cancellation `signal`, `requestId`, `authInfo`, `_meta`), and `requestContext`, the trusted application context that carries `authInfo` and the user mapped by `mapAuthInfoToUser`. Use them to scope what a caller can list and read.
627
627
 
628
+ A `resources/read` request resolves its URI against `listResources` first. When no listed resource matches, the URI is matched against the caller's `resourceTemplates`, and `getResourceContent` receives the expanded URI. Optional expressions such as `{?format}` or `{/section}` may be left out of the URI. Variable values must be percent-encoded as RFC 6570 expansion produces them, so `file://data?format=a/b` doesn't match `file://data{?format}`. The response uses the `mimeType` and `_meta` of the matching resource or template. A URI that matches neither fails with `Resource not found`.
629
+
628
630
  `getResourceContent` also receives `suspend`, `resumeData` and `suspendPayload` (the `MCPServerRequest` members). Declare `resumeSchema` to make `suspend` usable. It works exactly as it does for tools.
629
631
 
630
632
  Example:
@@ -640,11 +642,13 @@ import type {
640
642
 
641
643
  // Resources/resource templates will generally be dynamically fetched.
642
644
  const myResources: Resource[] = [
643
- { uri: 'file://data/123.txt', name: 'Data File', mimeType: 'text/plain' },
645
+ { uri: 'file://data/readme', name: 'Readme', mimeType: 'text/plain' },
644
646
  ]
645
647
 
646
648
  const myResourceContents: Record<string, MCPServerResourceContent> = {
647
- 'file://data.txt/123': { text: 'This is the content of the data file.' },
649
+ 'file://data/readme': { text: 'Read this first.' },
650
+ // Not listed; readable as an expansion of the `file://data/{id}` template
651
+ 'file://data/123': { text: 'This is the content of data file 123.' },
648
652
  }
649
653
 
650
654
  const myResourceTemplates: ResourceTemplate[] = [