@mastra/mcp 1.17.0-alpha.1 → 1.17.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/CHANGELOG.md +167 -0
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/types.d.ts +29 -0
- package/dist/client/types.d.ts.map +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-auth-fga.md +26 -0
- package/dist/docs/references/docs-connections-overview.md +1 -1
- package/dist/docs/references/reference-tools-mcp-client.md +2 -0
- package/dist/docs/references/reference-tools-mcp-server.md +50 -2
- package/dist/index.cjs +315 -58
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +318 -61
- package/dist/index.js.map +1 -1
- package/dist/server/mrtrElicitation.d.ts +39 -0
- package/dist/server/mrtrElicitation.d.ts.map +1 -0
- package/dist/server/promptActions.d.ts +8 -1
- package/dist/server/promptActions.d.ts.map +1 -1
- package/dist/server/resourceActions.d.ts +8 -1
- package/dist/server/resourceActions.d.ts.map +1 -1
- package/dist/server/server.d.ts +83 -17
- package/dist/server/server.d.ts.map +1 -1
- package/dist/server/toolActions.d.ts +8 -1
- package/dist/server/toolActions.d.ts.map +1 -1
- package/dist/server/types.d.ts +29 -1
- package/dist/server/types.d.ts.map +1 -1
- package/package.json +9 -9
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { MCPServerContext } from '@mastra/core/tools';
|
|
2
|
+
import type { ElicitRequest, ElicitResult, InputRequiredResult } from '@modelcontextprotocol/server';
|
|
3
|
+
import type { ElicitationActions } from './types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Thrown by the replay-based `sendRequest` when the current round carries no
|
|
6
|
+
* answer for the elicitation. Never surfaces to tools or clients: the
|
|
7
|
+
* `tools/call` handler converts it into an `input_required` result.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ElicitationReplayInterrupt extends Error {
|
|
10
|
+
readonly key: string;
|
|
11
|
+
readonly params: ElicitRequest['params'];
|
|
12
|
+
readonly answered: Record<string, ElicitResult>;
|
|
13
|
+
constructor(key: string, params: ElicitRequest['params'], answered: Record<string, ElicitResult>);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Whether this request is served on the 2026-07-28 era. Modern clients always
|
|
17
|
+
* attach the reserved per-request `_meta` envelope (the 2026 codec enforces the
|
|
18
|
+
* required keys at dispatch); legacy requests never carry it.
|
|
19
|
+
*/
|
|
20
|
+
export declare const isModernEraRequest: (extra: MCPServerContext) => boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Builds the replay-based {@link ElicitationActions} for one modern-era tool
|
|
23
|
+
* execution. Answers already provided by the client resolve immediately; the
|
|
24
|
+
* first unanswered elicitation throws {@link ElicitationReplayInterrupt}.
|
|
25
|
+
*
|
|
26
|
+
* The interrupt is also reported through `onInterrupt` before it is thrown:
|
|
27
|
+
* tool wrappers (e.g. Mastra's tool builder) re-wrap thrown errors, so the
|
|
28
|
+
* `tools/call` handler cannot rely on `instanceof` on whatever escapes the
|
|
29
|
+
* tool — the out-of-band capture is the authoritative signal.
|
|
30
|
+
*/
|
|
31
|
+
export declare const createReplayElicitation: (extra: MCPServerContext, onInterrupt: (interrupt: ElicitationReplayInterrupt) => void) => ElicitationActions;
|
|
32
|
+
/**
|
|
33
|
+
* Converts a caught {@link ElicitationReplayInterrupt} into the
|
|
34
|
+
* `input_required` result the `tools/call` handler returns to the client.
|
|
35
|
+
* Prior answers travel in `requestState` because each retry only carries the
|
|
36
|
+
* current round's `inputResponses`.
|
|
37
|
+
*/
|
|
38
|
+
export declare const replayInterruptToInputRequired: (interrupt: ElicitationReplayInterrupt) => InputRequiredResult;
|
|
39
|
+
//# sourceMappingURL=mrtrElicitation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mrtrElicitation.d.ts","sourceRoot":"","sources":["../../src/server/mrtrElicitation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAErG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA6BlD;;;;GAIG;AACH,qBAAa,0BAA2B,SAAQ,KAAK;aAEjC,GAAG,EAAE,MAAM;aACX,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC;aAC/B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC;gBAFtC,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,EAC/B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC;CAKzD;AAyCD;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,OAAO,gBAAgB,KAAG,OAA8C,CAAC;AAE5G;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,GAClC,OAAO,gBAAgB,EACvB,aAAa,CAAC,SAAS,EAAE,0BAA0B,KAAK,IAAI,KAC3D,kBAgBF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,GAAI,WAAW,0BAA0B,KAAG,mBAStF,CAAC"}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import type { IMastraLogger } from '@mastra/core/logger';
|
|
2
|
-
import type { Server } from '@modelcontextprotocol/server';
|
|
2
|
+
import type { Server, ServerNotifier } from '@modelcontextprotocol/server';
|
|
3
3
|
interface ServerPromptActionsDependencies {
|
|
4
4
|
getLogger: () => IMastraLogger;
|
|
5
5
|
getSdkServers: () => Server[];
|
|
6
6
|
clearDefinedPrompts: () => void;
|
|
7
|
+
/**
|
|
8
|
+
* Publish-side facade of the 2026-07-28 handler's subscription bus, when the
|
|
9
|
+
* server is pinned to that revision and the handler exists. Modern clients
|
|
10
|
+
* receive change events via `subscriptions/listen` instead of server push.
|
|
11
|
+
*/
|
|
12
|
+
getModernEraNotifier?: () => ServerNotifier | undefined;
|
|
7
13
|
}
|
|
8
14
|
/**
|
|
9
15
|
* Server-side prompt actions for notifying clients about prompt changes.
|
|
@@ -20,6 +26,7 @@ export declare class ServerPromptActions {
|
|
|
20
26
|
private readonly getLogger;
|
|
21
27
|
private readonly getSdkServers;
|
|
22
28
|
private readonly clearDefinedPrompts;
|
|
29
|
+
private readonly getModernEraNotifier?;
|
|
23
30
|
/**
|
|
24
31
|
* @internal
|
|
25
32
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promptActions.d.ts","sourceRoot":"","sources":["../../src/server/promptActions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"promptActions.d.ts","sourceRoot":"","sources":["../../src/server/promptActions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG3E,UAAU,+BAA+B;IACvC,SAAS,EAAE,MAAM,aAAa,CAAC;IAC/B,aAAa,EAAE,MAAM,MAAM,EAAE,CAAC;IAC9B,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,cAAc,GAAG,SAAS,CAAC;CACzD;AAED;;;;;;;;;;GAUG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAsB;IAChD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAiB;IAC/C,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAa;IACjD,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAmC;IAEzE;;OAEG;gBACS,YAAY,EAAE,+BAA+B;IAOzD;;;;;;;;;;;;;OAaG;IACU,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;CAahD"}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import type { IMastraLogger } from '@mastra/core/logger';
|
|
2
|
-
import type { Server } from '@modelcontextprotocol/server';
|
|
2
|
+
import type { Server, ServerNotifier } from '@modelcontextprotocol/server';
|
|
3
3
|
interface ServerResourceActionsDependencies {
|
|
4
4
|
getSubscribedServers: (uri: string) => Server[];
|
|
5
5
|
getLogger: () => IMastraLogger;
|
|
6
6
|
getSdkServers: () => Server[];
|
|
7
|
+
/**
|
|
8
|
+
* Publish-side facade of the 2026-07-28 handler's subscription bus, when the
|
|
9
|
+
* server is pinned to that revision and the handler exists. Modern clients
|
|
10
|
+
* receive change events via `subscriptions/listen` instead of server push.
|
|
11
|
+
*/
|
|
12
|
+
getModernEraNotifier?: () => ServerNotifier | undefined;
|
|
7
13
|
}
|
|
8
14
|
/**
|
|
9
15
|
* Server-side resource actions for notifying clients about resource changes.
|
|
@@ -20,6 +26,7 @@ export declare class ServerResourceActions {
|
|
|
20
26
|
private readonly getSubscribedServers;
|
|
21
27
|
private readonly getLogger;
|
|
22
28
|
private readonly getSdkServers;
|
|
29
|
+
private readonly getModernEraNotifier?;
|
|
23
30
|
/**
|
|
24
31
|
* @internal
|
|
25
32
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resourceActions.d.ts","sourceRoot":"","sources":["../../src/server/resourceActions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"resourceActions.d.ts","sourceRoot":"","sources":["../../src/server/resourceActions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG3E,UAAU,iCAAiC;IACzC,oBAAoB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;IAChD,SAAS,EAAE,MAAM,aAAa,CAAC;IAC/B,aAAa,EAAE,MAAM,MAAM,EAAE,CAAC;IAC9B;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,cAAc,GAAG,SAAS,CAAC;CACzD;AAED;;;;;;;;;;GAUG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAA4B;IACjE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAsB;IAChD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAiB;IAC/C,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAmC;IAEzE;;OAEG;gBACS,YAAY,EAAE,iCAAiC;IAO3D;;;;;;;;;;;;;;;;OAgBG;IACU,aAAa,CAAC,EAAE,GAAG,EAAE,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAoBnE;;;;;;;;;;;;;;OAcG;IACU,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;CAYhD"}
|
package/dist/server/server.d.ts
CHANGED
|
@@ -15,7 +15,17 @@ import { SSETransport } from '../_types/hono-mcp-server-sse-transport/build/inde
|
|
|
15
15
|
import { ServerPromptActions } from './promptActions.js';
|
|
16
16
|
import { ServerResourceActions } from './resourceActions.js';
|
|
17
17
|
import { ServerToolActions } from './toolActions.js';
|
|
18
|
-
import type { MCPServerPrompts, MCPServerResources, ElicitationActions, AppResources } from './types.js';
|
|
18
|
+
import type { MCPServerPrompts, MCPServerResources, ElicitationActions, AppResources, MCPServerProtocolVersion, MCPServerCacheHints } from './types.js';
|
|
19
|
+
type MCPServerStreamableHTTPOptions = Partial<StreamableHTTPServerTransportOptions> & {
|
|
20
|
+
serverless?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Opt into request-scoped SSE streaming for legacy serverless requests.
|
|
23
|
+
*
|
|
24
|
+
* The `2026-07-28` handler accepts `true` as a compatibility declaration because
|
|
25
|
+
* its automatic response mode already streams request-scoped messages when needed.
|
|
26
|
+
*/
|
|
27
|
+
serverlessStreaming?: boolean;
|
|
28
|
+
};
|
|
19
29
|
/**
|
|
20
30
|
* MCPServer exposes Mastra tools, agents, and workflows as a Model Context Protocol (MCP) server.
|
|
21
31
|
*
|
|
@@ -62,6 +72,12 @@ export declare class MCPServer extends MCPServerBase {
|
|
|
62
72
|
private fga?;
|
|
63
73
|
private subscriptionsByInstance;
|
|
64
74
|
private loggingLevels;
|
|
75
|
+
private protocolVersion?;
|
|
76
|
+
private cacheHints?;
|
|
77
|
+
private modernEraHandler?;
|
|
78
|
+
private modernEraNodeHandler?;
|
|
79
|
+
private stdioHandle?;
|
|
80
|
+
private stdioServerInstance?;
|
|
65
81
|
/**
|
|
66
82
|
* Provides methods to notify clients about resource changes.
|
|
67
83
|
*
|
|
@@ -255,6 +271,44 @@ export declare class MCPServer extends MCPServerBase {
|
|
|
255
271
|
* ```
|
|
256
272
|
*/
|
|
257
273
|
jsonSchemaValidator?: jsonSchemaValidator;
|
|
274
|
+
/**
|
|
275
|
+
* Opt-in MCP protocol revision.
|
|
276
|
+
*
|
|
277
|
+
* Omitted (or `'2025-11-25'`) keeps today's behavior exactly. Set to
|
|
278
|
+
* `'2026-07-28'` to serve the stateless MCP revision: HTTP and serverless
|
|
279
|
+
* requests go through the SDK's dual-era handler (modern clients served
|
|
280
|
+
* natively, legacy clients via the built-in stateless fallback on the same
|
|
281
|
+
* endpoint), and stdio serves both eras via the `server/discover` probe.
|
|
282
|
+
*
|
|
283
|
+
* @example
|
|
284
|
+
* ```typescript
|
|
285
|
+
* const server = new MCPServer({
|
|
286
|
+
* name: 'My Server',
|
|
287
|
+
* version: '1.0.0',
|
|
288
|
+
* tools: { ... },
|
|
289
|
+
* protocolVersion: '2026-07-28',
|
|
290
|
+
* });
|
|
291
|
+
* ```
|
|
292
|
+
*/
|
|
293
|
+
protocolVersion?: MCPServerProtocolVersion;
|
|
294
|
+
/**
|
|
295
|
+
* Cache hints (`ttlMs` / `cacheScope`) advertised on cacheable results of the
|
|
296
|
+
* `2026-07-28` protocol revision, keyed by operation (e.g. `'tools/list'`).
|
|
297
|
+
* Only applied when `protocolVersion: '2026-07-28'` is set; legacy responses
|
|
298
|
+
* are never affected.
|
|
299
|
+
*
|
|
300
|
+
* @example
|
|
301
|
+
* ```typescript
|
|
302
|
+
* const server = new MCPServer({
|
|
303
|
+
* name: 'My Server',
|
|
304
|
+
* version: '1.0.0',
|
|
305
|
+
* tools: { ... },
|
|
306
|
+
* protocolVersion: '2026-07-28',
|
|
307
|
+
* cacheHints: { 'tools/list': { ttlMs: 60_000, cacheScope: 'private' } },
|
|
308
|
+
* });
|
|
309
|
+
* ```
|
|
310
|
+
*/
|
|
311
|
+
cacheHints?: MCPServerCacheHints;
|
|
258
312
|
});
|
|
259
313
|
/**
|
|
260
314
|
* Returns every connected SDK server instance: the main instance (stdio/SSE
|
|
@@ -266,6 +320,25 @@ export declare class MCPServer extends MCPServerBase {
|
|
|
266
320
|
* cannot receive notifications.
|
|
267
321
|
*/
|
|
268
322
|
private getAllSdkServers;
|
|
323
|
+
/**
|
|
324
|
+
* Whether the server is pinned to the `2026-07-28` protocol revision.
|
|
325
|
+
* When false (the default), all behavior is byte-identical to the legacy era.
|
|
326
|
+
*/
|
|
327
|
+
private servesModernEra;
|
|
328
|
+
private assertModernEraHTTPOptions;
|
|
329
|
+
private validateHTTPRequestHeaders;
|
|
330
|
+
/**
|
|
331
|
+
* Lazily creates the dual-era HTTP handler used when `protocolVersion: '2026-07-28'`
|
|
332
|
+
* is set: modern (per-request envelope) clients are served natively and legacy
|
|
333
|
+
* clients are served through the SDK's built-in stateless fallback, both from the
|
|
334
|
+
* same endpoint. Each request gets a fresh server instance from
|
|
335
|
+
* `createServerInstance()`, so all registered handlers apply to both eras.
|
|
336
|
+
*/
|
|
337
|
+
private getModernEraHandler;
|
|
338
|
+
/**
|
|
339
|
+
* Node `(req, res)` adapter over the dual-era handler's web-standard `fetch`.
|
|
340
|
+
*/
|
|
341
|
+
private getModernEraNodeHandler;
|
|
269
342
|
/**
|
|
270
343
|
* Determines whether a log message at the given level should be sent to the
|
|
271
344
|
* client connected to the given server instance, honoring the minimum level
|
|
@@ -535,22 +608,14 @@ export declare class MCPServer extends MCPServerBase {
|
|
|
535
608
|
httpPath: string;
|
|
536
609
|
req: http.IncomingMessage;
|
|
537
610
|
res: http.ServerResponse<http.IncomingMessage>;
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
* preserving the JSON-response behavior that buffers only the final result.
|
|
547
|
-
*
|
|
548
|
-
* This only enables notifications scoped to the current request (e.g. progress).
|
|
549
|
-
* Elicitation, subscriptions, and out-of-request resource/list-change
|
|
550
|
-
* notifications still require a stateful session or another protocol model.
|
|
551
|
-
*/
|
|
552
|
-
serverlessStreaming?: boolean;
|
|
553
|
-
};
|
|
611
|
+
/**
|
|
612
|
+
* Streamable HTTP transport options for the legacy protocol path.
|
|
613
|
+
*
|
|
614
|
+
* With `protocolVersion: '2026-07-28'`, stateless declarations and DNS rebinding
|
|
615
|
+
* protection remain supported. Session and response-mode options are rejected
|
|
616
|
+
* because they cannot configure the shared modern-era handler per request.
|
|
617
|
+
*/
|
|
618
|
+
options?: MCPServerStreamableHTTPOptions;
|
|
554
619
|
}): Promise<void>;
|
|
555
620
|
/**
|
|
556
621
|
* Handles a stateless, serverless HTTP request without session management.
|
|
@@ -791,4 +856,5 @@ export declare class MCPServer extends MCPServerBase {
|
|
|
791
856
|
resources: Resource[];
|
|
792
857
|
}>;
|
|
793
858
|
}
|
|
859
|
+
export {};
|
|
794
860
|
//# sourceMappingURL=server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server/server.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,IAAI,MAAM,WAAW,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAGV,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAA+B,MAAM,oBAAoB,CAAC;AAErG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server/server.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,IAAI,MAAM,WAAW,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAGV,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAA+B,MAAM,oBAAoB,CAAC;AAErG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AASvD,OAAO,KAAK,EAAE,oCAAoC,EAAyB,MAAM,4BAA4B,CAAC;AAC9G,OAAO,EAAE,MAAM,EAAsD,MAAM,8BAA8B,CAAC;AAC1G,OAAO,KAAK,EAKV,Q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YAiBC,2BAA2B;YAiB3B,oBAAoB;YAkCpB,iCAAiC;YA+BjC,uBAAuB;IAqCrC,OAAO,CAAC,oBAAoB;IA8B5B;;;;;;;;;;;;;;;;;;;;;OAqBG;IACU,WAAW,CACtB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,GAAG,EACT,gBAAgB,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,cAAc,CAAC,EAAE,cAAc,CAAA;KAAE,GAC5F,OAAO,CAAC,GAAG,CAAC;IAsGf;;;;;;;OAOG;IACU,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,QAAQ,EAAE,KAAK,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC;IAuBnH;;;;;;OAMG;IACU,aAAa,IAAI,OAAO,CAAC;QAAE,SAAS,EAAE,QAAQ,EAAE,CAAA;KAAE,CAAC;CASjE"}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import type { ToolsInput } from '@mastra/core/agent';
|
|
2
2
|
import type { IMastraLogger } from '@mastra/core/logger';
|
|
3
|
-
import type { Server } from '@modelcontextprotocol/server';
|
|
3
|
+
import type { Server, ServerNotifier } from '@modelcontextprotocol/server';
|
|
4
4
|
interface ServerToolActionsDependencies {
|
|
5
5
|
getLogger: () => IMastraLogger;
|
|
6
6
|
getSdkServers: () => Server[];
|
|
7
7
|
addTools: (tools: ToolsInput) => void;
|
|
8
8
|
removeTools: (toolIds: string[]) => string[];
|
|
9
|
+
/**
|
|
10
|
+
* Publish-side facade of the 2026-07-28 handler's subscription bus, when the
|
|
11
|
+
* server is pinned to that revision and the handler exists. Modern clients
|
|
12
|
+
* receive change events via `subscriptions/listen` instead of server push.
|
|
13
|
+
*/
|
|
14
|
+
getModernEraNotifier?: () => ServerNotifier | undefined;
|
|
9
15
|
}
|
|
10
16
|
/**
|
|
11
17
|
* Server-side tool actions for dynamic tool management and notifying clients
|
|
@@ -21,6 +27,7 @@ export declare class ServerToolActions {
|
|
|
21
27
|
private readonly getSdkServers;
|
|
22
28
|
private readonly addTools;
|
|
23
29
|
private readonly removeTools;
|
|
30
|
+
private readonly getModernEraNotifier?;
|
|
24
31
|
/**
|
|
25
32
|
* @internal
|
|
26
33
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolActions.d.ts","sourceRoot":"","sources":["../../src/server/toolActions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"toolActions.d.ts","sourceRoot":"","sources":["../../src/server/toolActions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG3E,UAAU,6BAA6B;IACrC,SAAS,EAAE,MAAM,aAAa,CAAC;IAC/B,aAAa,EAAE,MAAM,MAAM,EAAE,CAAC;IAC9B,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IACtC,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,MAAM,EAAE,CAAC;IAC7C;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,cAAc,GAAG,SAAS,CAAC;CACzD;AAED;;;;;;;;GAQG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAsB;IAChD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAiB;IAC/C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA8B;IACvD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAkC;IAC9D,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAmC;IAEzE;;OAEG;gBACS,YAAY,EAAE,6BAA6B;IAQvD;;;;;;;;;;;;;;OAcG;IACU,GAAG,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAKlD;;;;;;;;;;;;;;OAcG;IACU,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IASrD;;;;;;;;;;;;;OAaG;IACU,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;CAYhD"}
|
package/dist/server/types.d.ts
CHANGED
|
@@ -1,6 +1,34 @@
|
|
|
1
1
|
import type { MCPServerContext } from '@mastra/core/tools';
|
|
2
2
|
import type { McpUiResourceMeta } from '@modelcontextprotocol/ext-apps';
|
|
3
|
-
import type { RequestOptions, ElicitRequest, ElicitResult, Prompt, PromptMessage, Resource, ResourceTemplateType } from '@modelcontextprotocol/server';
|
|
3
|
+
import type { CacheHint, RequestOptions, ElicitRequest, ElicitResult, Prompt, PromptMessage, Resource, ResourceTemplateType } from '@modelcontextprotocol/server';
|
|
4
|
+
/**
|
|
5
|
+
* MCP protocol revisions the server can be pinned to.
|
|
6
|
+
*
|
|
7
|
+
* - `'2025-11-25'` — the legacy (2025) protocol era. This is the default and matches
|
|
8
|
+
* the server's behavior when the option is omitted: sessionful streamable HTTP,
|
|
9
|
+
* `initialize` handshake, server→client push notifications.
|
|
10
|
+
* - `'2026-07-28'` — the stateless protocol revision. HTTP and serverless requests are
|
|
11
|
+
* served through the SDK's dual-era handler: modern (per-request envelope) clients are
|
|
12
|
+
* served natively, and legacy clients are served through the built-in stateless
|
|
13
|
+
* fallback on the same endpoint. Stdio serves both eras via the `server/discover`
|
|
14
|
+
* probe. List-changed/resource-updated notifications additionally reach modern
|
|
15
|
+
* clients via `subscriptions/listen`, tool log emission honors the per-request
|
|
16
|
+
* `logLevel` opt-in, and configured {@link MCPServerCacheHints} are advertised.
|
|
17
|
+
*/
|
|
18
|
+
export type MCPServerProtocolVersion = '2025-11-25' | '2026-07-28';
|
|
19
|
+
/**
|
|
20
|
+
* The operations whose results are cacheable on the `2026-07-28` protocol revision.
|
|
21
|
+
*/
|
|
22
|
+
export type MCPServerCacheableMethod = 'tools/list' | 'prompts/list' | 'resources/list' | 'resources/templates/list' | 'resources/read' | 'server/discover';
|
|
23
|
+
/**
|
|
24
|
+
* Cache hints (`ttlMs` / `cacheScope`) advertised on cacheable results of the
|
|
25
|
+
* `2026-07-28` protocol revision, keyed by operation.
|
|
26
|
+
*
|
|
27
|
+
* Only used when `protocolVersion: '2026-07-28'` is set. Absent hints keep the SDK's
|
|
28
|
+
* conservative defaults (`ttlMs: 0`, `cacheScope: 'private'`). Responses to legacy
|
|
29
|
+
* (2025-era) requests are never affected.
|
|
30
|
+
*/
|
|
31
|
+
export type MCPServerCacheHints = Partial<Record<MCPServerCacheableMethod, CacheHint>>;
|
|
4
32
|
/**
|
|
5
33
|
* Callback function to retrieve content for a specific resource.
|
|
6
34
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/server/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,YAAY,EACZ,MAAM,EACN,aAAa,EACb,QAAQ,EACR,oBAAoB,EACrB,MAAM,8BAA8B,CAAC;AAEtC;;;;;;;GAOG;AACH,MAAM,MAAM,gCAAgC,GAAG,CAAC,EAC9C,GAAG,EACH,KAAK,GAC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;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp",
|
|
3
|
-
"version": "1.17.0
|
|
3
|
+
"version": "1.17.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -55,14 +55,14 @@
|
|
|
55
55
|
"vitest": "4.1.10",
|
|
56
56
|
"zod": "^4.4.3",
|
|
57
57
|
"zod-to-json-schema": "^3.25.1",
|
|
58
|
-
"@internal/ai-sdk-v5": "0.0.
|
|
59
|
-
"@internal/
|
|
60
|
-
"@
|
|
61
|
-
"@
|
|
62
|
-
"@internal/
|
|
63
|
-
"@mastra/observability": "1.17.1
|
|
64
|
-
"@
|
|
65
|
-
"@
|
|
58
|
+
"@internal/ai-sdk-v5": "0.0.71",
|
|
59
|
+
"@internal/test-utils": "0.0.60",
|
|
60
|
+
"@mastra/core": "1.60.0",
|
|
61
|
+
"@internal/llm-recorder": "0.0.60",
|
|
62
|
+
"@internal/types-builder": "0.0.99",
|
|
63
|
+
"@mastra/observability": "1.17.1",
|
|
64
|
+
"@internal/lint": "0.0.124",
|
|
65
|
+
"@mastra/schema-compat": "1.3.7"
|
|
66
66
|
},
|
|
67
67
|
"homepage": "https://mastra.ai",
|
|
68
68
|
"repository": {
|