@mastra/mcp 2.8.0 → 2.9.0-alpha.0
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/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +193 -2
- package/dist/docs/references/docs-connections-mcp.md +99 -0
- package/dist/docs/references/reference-tools-mcp-client.md +4 -0
- package/dist/index.cjs +202 -126
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +203 -127
- package/dist/index.js.map +1 -1
- package/dist/server/request.d.ts +3 -1
- package/dist/server/request.d.ts.map +1 -1
- package/dist/server/server.d.ts.map +1 -1
- package/dist/server/tasks/workflow-runs.d.ts +7 -0
- package/dist/server/tasks/workflow-runs.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -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,EA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,GAAG,QAAQ,CAAC,CAE5D;IAED;;;OAGG;IACH,OAAO,CAAC,wBAAwB;IAShC;;;;;OAKG;YACW,aAAa;IA6F3B,OAAO,CAAC,mBAAmB;CAQ5B"}
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -1,6 +1,197 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.
|
|
2
|
+
"version": "2.9.0-alpha.0",
|
|
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": 25157
|
|
9
|
+
},
|
|
10
|
+
"InMemoryMCPTaskStore": {
|
|
11
|
+
"types": "dist/server/tasks/in-memory-store.d.ts",
|
|
12
|
+
"implementation": "dist/index.js",
|
|
13
|
+
"line": 22076
|
|
14
|
+
},
|
|
15
|
+
"InMemoryOAuthStorage": {
|
|
16
|
+
"types": "dist/client/oauth-provider.d.ts",
|
|
17
|
+
"implementation": "dist/index.js",
|
|
18
|
+
"line": 17674
|
|
19
|
+
},
|
|
20
|
+
"InMemoryWebhookSubscriptionStore": {
|
|
21
|
+
"types": "dist/server/events/webhook-store.d.ts",
|
|
22
|
+
"implementation": "dist/index.js",
|
|
23
|
+
"line": 20446
|
|
24
|
+
},
|
|
25
|
+
"InternalMastraMCPClient": {
|
|
26
|
+
"types": "dist/client/client.d.ts",
|
|
27
|
+
"implementation": "dist/index.js",
|
|
28
|
+
"line": 16031
|
|
29
|
+
},
|
|
30
|
+
"MCPClient": {
|
|
31
|
+
"types": "dist/client/configuration.d.ts",
|
|
32
|
+
"implementation": "dist/index.js",
|
|
33
|
+
"line": 18167
|
|
34
|
+
},
|
|
35
|
+
"MCPClientServerProxy": {
|
|
36
|
+
"types": "dist/client/server-proxy.d.ts",
|
|
37
|
+
"implementation": "dist/index.js",
|
|
38
|
+
"line": 18015
|
|
39
|
+
},
|
|
40
|
+
"MCPEventsSignalProvider": {
|
|
41
|
+
"types": "dist/integrations/events-signals.d.ts",
|
|
42
|
+
"implementation": "dist/index.js",
|
|
43
|
+
"line": 25342
|
|
44
|
+
},
|
|
45
|
+
"MCPOAuthClientProvider": {
|
|
46
|
+
"types": "dist/client/oauth-provider.d.ts",
|
|
47
|
+
"implementation": "dist/index.js",
|
|
48
|
+
"line": 17726
|
|
49
|
+
},
|
|
50
|
+
"MCPServer": {
|
|
51
|
+
"types": "dist/server/server.d.ts",
|
|
52
|
+
"implementation": "dist/index.js",
|
|
53
|
+
"line": 22961
|
|
54
|
+
},
|
|
55
|
+
"MCPTaskLimitError": {
|
|
56
|
+
"types": "dist/server/tasks/store.d.ts",
|
|
57
|
+
"implementation": "dist/index.js",
|
|
58
|
+
"line": 21258
|
|
59
|
+
},
|
|
60
|
+
"MCP_CALL_TOOL_CONTENT": {
|
|
61
|
+
"types": "dist/client/client.d.ts",
|
|
62
|
+
"implementation": "dist/index.js",
|
|
63
|
+
"line": 15875
|
|
64
|
+
},
|
|
65
|
+
"MCP_CALL_TOOL_META": {
|
|
66
|
+
"types": "dist/client/client.d.ts",
|
|
67
|
+
"implementation": "dist/index.js",
|
|
68
|
+
"line": 15877
|
|
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": 18136
|
|
79
|
+
},
|
|
80
|
+
"MCP_PROTOCOL_VERSION": {
|
|
81
|
+
"types": "dist/server/types.d.ts",
|
|
82
|
+
"implementation": "dist/index.js",
|
|
83
|
+
"line": 24884
|
|
84
|
+
},
|
|
85
|
+
"ServerEventActions": {
|
|
86
|
+
"types": "dist/server/events/actions.d.ts",
|
|
87
|
+
"implementation": "dist/index.js",
|
|
88
|
+
"line": 19547
|
|
89
|
+
},
|
|
90
|
+
"ServerPromptActions": {
|
|
91
|
+
"types": "dist/server/actions.d.ts",
|
|
92
|
+
"implementation": "dist/index.js",
|
|
93
|
+
"line": 19527
|
|
94
|
+
},
|
|
95
|
+
"ServerResourceActions": {
|
|
96
|
+
"types": "dist/server/actions.d.ts",
|
|
97
|
+
"implementation": "dist/index.js",
|
|
98
|
+
"line": 19513
|
|
99
|
+
},
|
|
100
|
+
"ServerToolActions": {
|
|
101
|
+
"types": "dist/server/actions.d.ts",
|
|
102
|
+
"implementation": "dist/index.js",
|
|
103
|
+
"line": 19495
|
|
104
|
+
},
|
|
105
|
+
"createIntrospectionValidator": {
|
|
106
|
+
"types": "dist/server/oauth-middleware.d.ts",
|
|
107
|
+
"implementation": "dist/index.js",
|
|
108
|
+
"line": 25076
|
|
109
|
+
},
|
|
110
|
+
"createOAuthCallbackServer": {
|
|
111
|
+
"types": "dist/client/oauth-callback-server.d.ts",
|
|
112
|
+
"implementation": "dist/index.js",
|
|
113
|
+
"line": 17556
|
|
114
|
+
},
|
|
115
|
+
"createOAuthMiddleware": {
|
|
116
|
+
"types": "dist/server/oauth-middleware.d.ts",
|
|
117
|
+
"implementation": "dist/index.js",
|
|
118
|
+
"line": 24929
|
|
119
|
+
},
|
|
120
|
+
"createSimpleTokenProvider": {
|
|
121
|
+
"types": "dist/client/oauth-provider.d.ts",
|
|
122
|
+
"implementation": "dist/index.js",
|
|
123
|
+
"line": 17989
|
|
124
|
+
},
|
|
125
|
+
"createStaticTokenValidator": {
|
|
126
|
+
"types": "dist/server/oauth-middleware.d.ts",
|
|
127
|
+
"implementation": "dist/index.js",
|
|
128
|
+
"line": 25045
|
|
129
|
+
},
|
|
130
|
+
"defineEvent": {
|
|
131
|
+
"types": "dist/server/events/define-event.d.ts",
|
|
132
|
+
"implementation": "dist/index.js",
|
|
133
|
+
"line": 25147
|
|
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": 17489
|
|
154
|
+
},
|
|
155
|
+
"getMcpCallToolContent": {
|
|
156
|
+
"types": "dist/client/client.d.ts",
|
|
157
|
+
"implementation": "dist/index.js",
|
|
158
|
+
"line": 15897
|
|
159
|
+
},
|
|
160
|
+
"getMcpCallToolMeta": {
|
|
161
|
+
"types": "dist/client/client.d.ts",
|
|
162
|
+
"implementation": "dist/index.js",
|
|
163
|
+
"line": 15906
|
|
164
|
+
},
|
|
165
|
+
"isMCPTaskStoreAdmin": {
|
|
166
|
+
"types": "dist/server/tasks/store.d.ts",
|
|
167
|
+
"implementation": "dist/index.js",
|
|
168
|
+
"line": 21309
|
|
169
|
+
},
|
|
170
|
+
"isWorkflowTaskContext": {
|
|
171
|
+
"types": "dist/server/tasks/workflow-runs.d.ts",
|
|
172
|
+
"implementation": "dist/index.js",
|
|
173
|
+
"line": 22849
|
|
174
|
+
},
|
|
175
|
+
"principalKeyOf": {
|
|
176
|
+
"types": "dist/server/tasks/store.d.ts",
|
|
177
|
+
"implementation": "dist/index.js",
|
|
178
|
+
"line": 21250
|
|
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
|
}
|
|
@@ -443,6 +443,105 @@ 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 that render Mastra UI. `dashboardRendererApp` renders a dashboard definition with live observability data, such as agent runs, token usage, or scores.
|
|
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
|
+
Register the app and `observabilityAppTools` on the same `MCPServer`, then return a dashboard definition from a tool linked to the app's `ui://` URI:
|
|
475
|
+
|
|
476
|
+
```typescript
|
|
477
|
+
import type { DashboardDefinition } from '@mastra/core/storage/dashboards'
|
|
478
|
+
import { createTool } from '@mastra/core/tools'
|
|
479
|
+
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'
|
|
485
|
+
import { z } from 'zod'
|
|
486
|
+
|
|
487
|
+
const DASHBOARD_APP_URI = 'ui://mastra/dashboard'
|
|
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
|
+
}
|
|
520
|
+
|
|
521
|
+
const showAgentRuns = createTool({
|
|
522
|
+
id: 'showAgentRuns',
|
|
523
|
+
description: 'Shows how many agent runs happened in the last 7 days',
|
|
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',
|
|
533
|
+
version: '1.0.0',
|
|
534
|
+
appResources: { [DASHBOARD_APP_URI]: dashboardRendererApp() },
|
|
535
|
+
tools: { showAgentRuns, ...observabilityAppTools },
|
|
536
|
+
})
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
The app never reaches the network from its iframe. It reads data by calling the observability tools over the host's MCP connection. These tools are marked app-only, so `MCPClient.listTools()` hides them from agents.
|
|
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`.
|
|
544
|
+
|
|
446
545
|
### Sandbox security
|
|
447
546
|
|
|
448
547
|
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
|