@mastra/mcp 2.9.0-alpha.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.
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/error-utils.d.ts +9 -0
- package/dist/client/error-utils.d.ts.map +1 -1
- package/dist/client/oauth-callback-server.d.ts.map +1 -1
- package/dist/docs/SKILL.md +1 -4
- package/dist/docs/assets/SOURCE_MAP.json +32 -32
- package/dist/docs/references/docs-connections-mcp.md +27 -61
- package/dist/docs/references/reference-tools-mcp-server.md +6 -2
- package/dist/index.cjs +195 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +195 -3
- package/dist/index.js.map +1 -1
- package/dist/server/server.d.ts.map +1 -1
- package/dist/server/uri-template.d.ts +15 -0
- package/dist/server/uri-template.d.ts.map +1 -0
- package/package.json +4 -4
- package/dist/docs/references/docs-connections-overview.md +0 -96
- package/dist/docs/references/reference-migrations-mcp-v2.md +0 -268
- package/dist/docs/references/reference-migrations-upgrade-to-v1-mcp.md +0 -103
|
@@ -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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
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,
|
|
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"}
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -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.9.0-alpha.
|
|
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,71 +1,71 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.9.0-alpha.
|
|
2
|
+
"version": "2.9.0-alpha.1",
|
|
3
3
|
"package": "@mastra/mcp",
|
|
4
4
|
"exports": {
|
|
5
5
|
"InMemoryMCPEventCursorStore": {
|
|
6
6
|
"types": "dist/integrations/events-cursor-store.d.ts",
|
|
7
7
|
"implementation": "dist/index.js",
|
|
8
|
-
"line":
|
|
8
|
+
"line": 25349
|
|
9
9
|
},
|
|
10
10
|
"InMemoryMCPTaskStore": {
|
|
11
11
|
"types": "dist/server/tasks/in-memory-store.d.ts",
|
|
12
12
|
"implementation": "dist/index.js",
|
|
13
|
-
"line":
|
|
13
|
+
"line": 22124
|
|
14
14
|
},
|
|
15
15
|
"InMemoryOAuthStorage": {
|
|
16
16
|
"types": "dist/client/oauth-provider.d.ts",
|
|
17
17
|
"implementation": "dist/index.js",
|
|
18
|
-
"line":
|
|
18
|
+
"line": 17722
|
|
19
19
|
},
|
|
20
20
|
"InMemoryWebhookSubscriptionStore": {
|
|
21
21
|
"types": "dist/server/events/webhook-store.d.ts",
|
|
22
22
|
"implementation": "dist/index.js",
|
|
23
|
-
"line":
|
|
23
|
+
"line": 20494
|
|
24
24
|
},
|
|
25
25
|
"InternalMastraMCPClient": {
|
|
26
26
|
"types": "dist/client/client.d.ts",
|
|
27
27
|
"implementation": "dist/index.js",
|
|
28
|
-
"line":
|
|
28
|
+
"line": 16060
|
|
29
29
|
},
|
|
30
30
|
"MCPClient": {
|
|
31
31
|
"types": "dist/client/configuration.d.ts",
|
|
32
32
|
"implementation": "dist/index.js",
|
|
33
|
-
"line":
|
|
33
|
+
"line": 18215
|
|
34
34
|
},
|
|
35
35
|
"MCPClientServerProxy": {
|
|
36
36
|
"types": "dist/client/server-proxy.d.ts",
|
|
37
37
|
"implementation": "dist/index.js",
|
|
38
|
-
"line":
|
|
38
|
+
"line": 18063
|
|
39
39
|
},
|
|
40
40
|
"MCPEventsSignalProvider": {
|
|
41
41
|
"types": "dist/integrations/events-signals.d.ts",
|
|
42
42
|
"implementation": "dist/index.js",
|
|
43
|
-
"line":
|
|
43
|
+
"line": 25534
|
|
44
44
|
},
|
|
45
45
|
"MCPOAuthClientProvider": {
|
|
46
46
|
"types": "dist/client/oauth-provider.d.ts",
|
|
47
47
|
"implementation": "dist/index.js",
|
|
48
|
-
"line":
|
|
48
|
+
"line": 17774
|
|
49
49
|
},
|
|
50
50
|
"MCPServer": {
|
|
51
51
|
"types": "dist/server/server.d.ts",
|
|
52
52
|
"implementation": "dist/index.js",
|
|
53
|
-
"line":
|
|
53
|
+
"line": 23139
|
|
54
54
|
},
|
|
55
55
|
"MCPTaskLimitError": {
|
|
56
56
|
"types": "dist/server/tasks/store.d.ts",
|
|
57
57
|
"implementation": "dist/index.js",
|
|
58
|
-
"line":
|
|
58
|
+
"line": 21306
|
|
59
59
|
},
|
|
60
60
|
"MCP_CALL_TOOL_CONTENT": {
|
|
61
61
|
"types": "dist/client/client.d.ts",
|
|
62
62
|
"implementation": "dist/index.js",
|
|
63
|
-
"line":
|
|
63
|
+
"line": 15904
|
|
64
64
|
},
|
|
65
65
|
"MCP_CALL_TOOL_META": {
|
|
66
66
|
"types": "dist/client/client.d.ts",
|
|
67
67
|
"implementation": "dist/index.js",
|
|
68
|
-
"line":
|
|
68
|
+
"line": 15906
|
|
69
69
|
},
|
|
70
70
|
"MCP_CLIENT_PROTOCOL_VERSION": {
|
|
71
71
|
"types": "dist/client/types.d.ts",
|
|
@@ -75,62 +75,62 @@
|
|
|
75
75
|
"MCP_DISCOVERY_TIMEOUT_CODE": {
|
|
76
76
|
"types": "dist/client/configuration.d.ts",
|
|
77
77
|
"implementation": "dist/index.js",
|
|
78
|
-
"line":
|
|
78
|
+
"line": 18184
|
|
79
79
|
},
|
|
80
80
|
"MCP_PROTOCOL_VERSION": {
|
|
81
81
|
"types": "dist/server/types.d.ts",
|
|
82
82
|
"implementation": "dist/index.js",
|
|
83
|
-
"line":
|
|
83
|
+
"line": 25076
|
|
84
84
|
},
|
|
85
85
|
"ServerEventActions": {
|
|
86
86
|
"types": "dist/server/events/actions.d.ts",
|
|
87
87
|
"implementation": "dist/index.js",
|
|
88
|
-
"line":
|
|
88
|
+
"line": 19595
|
|
89
89
|
},
|
|
90
90
|
"ServerPromptActions": {
|
|
91
91
|
"types": "dist/server/actions.d.ts",
|
|
92
92
|
"implementation": "dist/index.js",
|
|
93
|
-
"line":
|
|
93
|
+
"line": 19575
|
|
94
94
|
},
|
|
95
95
|
"ServerResourceActions": {
|
|
96
96
|
"types": "dist/server/actions.d.ts",
|
|
97
97
|
"implementation": "dist/index.js",
|
|
98
|
-
"line":
|
|
98
|
+
"line": 19561
|
|
99
99
|
},
|
|
100
100
|
"ServerToolActions": {
|
|
101
101
|
"types": "dist/server/actions.d.ts",
|
|
102
102
|
"implementation": "dist/index.js",
|
|
103
|
-
"line":
|
|
103
|
+
"line": 19543
|
|
104
104
|
},
|
|
105
105
|
"createIntrospectionValidator": {
|
|
106
106
|
"types": "dist/server/oauth-middleware.d.ts",
|
|
107
107
|
"implementation": "dist/index.js",
|
|
108
|
-
"line":
|
|
108
|
+
"line": 25268
|
|
109
109
|
},
|
|
110
110
|
"createOAuthCallbackServer": {
|
|
111
111
|
"types": "dist/client/oauth-callback-server.d.ts",
|
|
112
112
|
"implementation": "dist/index.js",
|
|
113
|
-
"line":
|
|
113
|
+
"line": 17604
|
|
114
114
|
},
|
|
115
115
|
"createOAuthMiddleware": {
|
|
116
116
|
"types": "dist/server/oauth-middleware.d.ts",
|
|
117
117
|
"implementation": "dist/index.js",
|
|
118
|
-
"line":
|
|
118
|
+
"line": 25121
|
|
119
119
|
},
|
|
120
120
|
"createSimpleTokenProvider": {
|
|
121
121
|
"types": "dist/client/oauth-provider.d.ts",
|
|
122
122
|
"implementation": "dist/index.js",
|
|
123
|
-
"line":
|
|
123
|
+
"line": 18037
|
|
124
124
|
},
|
|
125
125
|
"createStaticTokenValidator": {
|
|
126
126
|
"types": "dist/server/oauth-middleware.d.ts",
|
|
127
127
|
"implementation": "dist/index.js",
|
|
128
|
-
"line":
|
|
128
|
+
"line": 25237
|
|
129
129
|
},
|
|
130
130
|
"defineEvent": {
|
|
131
131
|
"types": "dist/server/events/define-event.d.ts",
|
|
132
132
|
"implementation": "dist/index.js",
|
|
133
|
-
"line":
|
|
133
|
+
"line": 25339
|
|
134
134
|
},
|
|
135
135
|
"extractBearerToken": {
|
|
136
136
|
"types": "dist/shared/oauth-types.d.ts",
|
|
@@ -150,32 +150,32 @@
|
|
|
150
150
|
"getCallbackUrlCandidates": {
|
|
151
151
|
"types": "dist/client/oauth-callback-server.d.ts",
|
|
152
152
|
"implementation": "dist/index.js",
|
|
153
|
-
"line":
|
|
153
|
+
"line": 17537
|
|
154
154
|
},
|
|
155
155
|
"getMcpCallToolContent": {
|
|
156
156
|
"types": "dist/client/client.d.ts",
|
|
157
157
|
"implementation": "dist/index.js",
|
|
158
|
-
"line":
|
|
158
|
+
"line": 15926
|
|
159
159
|
},
|
|
160
160
|
"getMcpCallToolMeta": {
|
|
161
161
|
"types": "dist/client/client.d.ts",
|
|
162
162
|
"implementation": "dist/index.js",
|
|
163
|
-
"line":
|
|
163
|
+
"line": 15935
|
|
164
164
|
},
|
|
165
165
|
"isMCPTaskStoreAdmin": {
|
|
166
166
|
"types": "dist/server/tasks/store.d.ts",
|
|
167
167
|
"implementation": "dist/index.js",
|
|
168
|
-
"line":
|
|
168
|
+
"line": 21357
|
|
169
169
|
},
|
|
170
170
|
"isWorkflowTaskContext": {
|
|
171
171
|
"types": "dist/server/tasks/workflow-runs.d.ts",
|
|
172
172
|
"implementation": "dist/index.js",
|
|
173
|
-
"line":
|
|
173
|
+
"line": 22897
|
|
174
174
|
},
|
|
175
175
|
"principalKeyOf": {
|
|
176
176
|
"types": "dist/server/tasks/store.d.ts",
|
|
177
177
|
"implementation": "dist/index.js",
|
|
178
|
-
"line":
|
|
178
|
+
"line": 21298
|
|
179
179
|
},
|
|
180
180
|
"taskKeyOf": {
|
|
181
181
|
"types": "dist/shared/tasks/task-id.d.ts",
|
|
@@ -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
|
|
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
|
|
|
@@ -445,7 +445,7 @@ Tools loaded through `listTools()` include a `serverId` in `_meta.ui`, allowing
|
|
|
445
445
|
|
|
446
446
|
### Use prebuilt Mastra apps
|
|
447
447
|
|
|
448
|
-
The `@mastra/mcp-apps-components` package includes prebuilt MCP Apps
|
|
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
449
|
|
|
450
450
|
**npm**:
|
|
451
451
|
|
|
@@ -471,76 +471,42 @@ yarn add @mastra/mcp-apps-components
|
|
|
471
471
|
bun add @mastra/mcp-apps-components
|
|
472
472
|
```
|
|
473
473
|
|
|
474
|
-
|
|
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
475
|
|
|
476
476
|
```typescript
|
|
477
|
-
import type { DashboardDefinition } from '@mastra/core/storage/dashboards'
|
|
478
477
|
import { createTool } from '@mastra/core/tools'
|
|
479
478
|
import { MCPServer } from '@mastra/mcp'
|
|
480
|
-
import {
|
|
481
|
-
dashboardRendererApp,
|
|
482
|
-
dashboardRendererInputSchema,
|
|
483
|
-
} from '@mastra/mcp-apps-components/dashboard-renderer'
|
|
484
|
-
import { observabilityAppTools } from '@mastra/mcp-apps-components/observability-tools'
|
|
479
|
+
import { greetingApp } from '@mastra/mcp-apps-components'
|
|
485
480
|
import { z } from 'zod'
|
|
486
481
|
|
|
487
|
-
const
|
|
488
|
-
|
|
489
|
-
const agentRuns: DashboardDefinition = {
|
|
490
|
-
schemaVersion: 1,
|
|
491
|
-
defaults: { datePreset: '7d' },
|
|
492
|
-
rows: [
|
|
493
|
-
{
|
|
494
|
-
widgets: [
|
|
495
|
-
{
|
|
496
|
-
id: 'runs',
|
|
497
|
-
span: 12,
|
|
498
|
-
kind: 'kpis',
|
|
499
|
-
views: [
|
|
500
|
-
{
|
|
501
|
-
queries: [
|
|
502
|
-
{
|
|
503
|
-
id: 'runs',
|
|
504
|
-
source: 'metrics',
|
|
505
|
-
request: 'aggregate',
|
|
506
|
-
name: ['mastra_agent_duration_ms'],
|
|
507
|
-
aggregation: 'count',
|
|
508
|
-
},
|
|
509
|
-
],
|
|
510
|
-
options: {
|
|
511
|
-
items: [{ label: 'Agent runs', format: 'count', value: { query: 'runs' } }],
|
|
512
|
-
},
|
|
513
|
-
},
|
|
514
|
-
],
|
|
515
|
-
},
|
|
516
|
-
],
|
|
517
|
-
},
|
|
518
|
-
],
|
|
519
|
-
}
|
|
482
|
+
const uri = 'ui://mastra/greeting'
|
|
520
483
|
|
|
521
|
-
const
|
|
522
|
-
id: '
|
|
523
|
-
|
|
524
|
-
inputSchema: z.object({}),
|
|
525
|
-
outputSchema: dashboardRendererInputSchema,
|
|
526
|
-
mcp: { _meta: { ui: { resourceUri: DASHBOARD_APP_URI } } },
|
|
527
|
-
execute: async () => ({ definition: agentRuns, scope: 'project' as const }),
|
|
528
|
-
})
|
|
529
|
-
|
|
530
|
-
export const dashboardServer = new MCPServer({
|
|
531
|
-
id: 'dashboard-server',
|
|
532
|
-
name: 'Dashboard Server',
|
|
484
|
+
export const greetingServer = new MCPServer({
|
|
485
|
+
id: 'greeting-server',
|
|
486
|
+
name: 'Greeting Server',
|
|
533
487
|
version: '1.0.0',
|
|
534
|
-
appResources: { [
|
|
535
|
-
tools: {
|
|
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
|
+
},
|
|
536
506
|
})
|
|
537
507
|
```
|
|
538
508
|
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
Each tool runs its observability route in-process as the signed-in caller through [`invokeRoute()`](https://mastra.ai/reference/server/invoke-route), with the route's own validation, permission, and authorization checks. The app sees the same data the caller can read over HTTP.
|
|
542
|
-
|
|
543
|
-
> **Note:** When server auth is configured, the tools need the caller resolved by Mastra server auth. Serve the MCP server through a Mastra server adapter, such as Hono, Express, Fastify, Koa, Elysia, or NestJS. Calls without an authenticated caller return `401`.
|
|
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.
|
|
544
510
|
|
|
545
511
|
### Sandbox security
|
|
546
512
|
|
|
@@ -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/
|
|
645
|
+
{ uri: 'file://data/readme', name: 'Readme', mimeType: 'text/plain' },
|
|
644
646
|
]
|
|
645
647
|
|
|
646
648
|
const myResourceContents: Record<string, MCPServerResourceContent> = {
|
|
647
|
-
'file://data
|
|
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[] = [
|