@mastra/mcp 1.18.1-alpha.3 → 2.0.0-alpha.4

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.
Files changed (90) hide show
  1. package/dist/client/actions/resource.d.ts +9 -59
  2. package/dist/client/actions/resource.d.ts.map +1 -1
  3. package/dist/client/client.d.ts +71 -124
  4. package/dist/client/client.d.ts.map +1 -1
  5. package/dist/client/configuration.d.ts +30 -120
  6. package/dist/client/configuration.d.ts.map +1 -1
  7. package/dist/client/error-utils.d.ts +9 -0
  8. package/dist/client/error-utils.d.ts.map +1 -1
  9. package/dist/client/index.d.ts +2 -1
  10. package/dist/client/index.d.ts.map +1 -1
  11. package/dist/client/oauth-callback-server.d.ts +8 -4
  12. package/dist/client/oauth-callback-server.d.ts.map +1 -1
  13. package/dist/client/oauth-provider.d.ts +91 -45
  14. package/dist/client/oauth-provider.d.ts.map +1 -1
  15. package/dist/client/server-proxy.d.ts +26 -46
  16. package/dist/client/server-proxy.d.ts.map +1 -1
  17. package/dist/client/types.d.ts +106 -143
  18. package/dist/client/types.d.ts.map +1 -1
  19. package/dist/conformance/fixture.d.ts +3 -0
  20. package/dist/conformance/fixture.d.ts.map +1 -0
  21. package/dist/conformance/run.d.ts +2 -0
  22. package/dist/conformance/run.d.ts.map +1 -0
  23. package/dist/conformance/stdio-server.d.ts +2 -0
  24. package/dist/conformance/stdio-server.d.ts.map +1 -0
  25. package/dist/docs/SKILL.md +2 -1
  26. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  27. package/dist/docs/references/reference-migrations-mcp-v2.md +268 -0
  28. package/dist/docs/references/reference-tools-mcp-client.md +36 -14
  29. package/dist/docs/references/reference-tools-mcp-server.md +24 -83
  30. package/dist/index.cjs +1561 -3323
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.js +1564 -3327
  33. package/dist/index.js.map +1 -1
  34. package/dist/server/actions.d.ts +34 -0
  35. package/dist/server/actions.d.ts.map +1 -0
  36. package/dist/server/oauth-middleware.d.ts +1 -1
  37. package/dist/server/request.d.ts +54 -0
  38. package/dist/server/request.d.ts.map +1 -0
  39. package/dist/server/server.d.ts +112 -808
  40. package/dist/server/server.d.ts.map +1 -1
  41. package/dist/server/types.d.ts +82 -138
  42. package/dist/server/types.d.ts.map +1 -1
  43. package/dist/shared/index.d.ts +1 -0
  44. package/dist/shared/index.d.ts.map +1 -1
  45. package/dist/shared/oauth-types.d.ts +3 -3
  46. package/dist/shared/oauth-types.d.ts.map +1 -1
  47. package/dist/shared/trace-context.d.ts +20 -0
  48. package/dist/shared/trace-context.d.ts.map +1 -0
  49. package/package.json +11 -16
  50. package/dist/_types/hono/dist/types/client/client.d.ts +0 -4
  51. package/dist/_types/hono/dist/types/client/fetch-result-please.d.ts +0 -35
  52. package/dist/_types/hono/dist/types/client/index.d.ts +0 -7
  53. package/dist/_types/hono/dist/types/client/types.d.ts +0 -229
  54. package/dist/_types/hono/dist/types/client/utils.d.ts +0 -18
  55. package/dist/_types/hono/dist/types/context.d.ts +0 -459
  56. package/dist/_types/hono/dist/types/helper/streaming/index.d.ts +0 -8
  57. package/dist/_types/hono/dist/types/helper/streaming/sse.d.ts +0 -13
  58. package/dist/_types/hono/dist/types/helper/streaming/stream.d.ts +0 -3
  59. package/dist/_types/hono/dist/types/helper/streaming/text.d.ts +0 -3
  60. package/dist/_types/hono/dist/types/hono-base.d.ts +0 -221
  61. package/dist/_types/hono/dist/types/hono.d.ts +0 -19
  62. package/dist/_types/hono/dist/types/index.d.ts +0 -37
  63. package/dist/_types/hono/dist/types/request/constants.d.ts +0 -1
  64. package/dist/_types/hono/dist/types/request.d.ts +0 -324
  65. package/dist/_types/hono/dist/types/router.d.ts +0 -97
  66. package/dist/_types/hono/dist/types/types.d.ts +0 -573
  67. package/dist/_types/hono/dist/types/utils/body.d.ts +0 -79
  68. package/dist/_types/hono/dist/types/utils/headers.d.ts +0 -8
  69. package/dist/_types/hono/dist/types/utils/http-status.d.ts +0 -32
  70. package/dist/_types/hono/dist/types/utils/mime.d.ts +0 -70
  71. package/dist/_types/hono/dist/types/utils/stream.d.ts +0 -31
  72. package/dist/_types/hono/dist/types/utils/types.d.ts +0 -74
  73. package/dist/_types/hono/package.json +0 -1
  74. package/dist/_types/hono-mcp-server-sse-transport/build/index.d.ts +0 -1
  75. package/dist/_types/hono-mcp-server-sse-transport/build/sse.d.ts +0 -25
  76. package/dist/_types/hono-mcp-server-sse-transport/package.json +0 -1
  77. package/dist/client/actions/elicitation.d.ts +0 -63
  78. package/dist/client/actions/elicitation.d.ts.map +0 -1
  79. package/dist/server/__tests__/mock-extra.d.ts +0 -15
  80. package/dist/server/__tests__/mock-extra.d.ts.map +0 -1
  81. package/dist/server/mrtrElicitation.d.ts +0 -39
  82. package/dist/server/mrtrElicitation.d.ts.map +0 -1
  83. package/dist/server/notificationBroadcast.d.ts +0 -24
  84. package/dist/server/notificationBroadcast.d.ts.map +0 -1
  85. package/dist/server/promptActions.d.ts +0 -49
  86. package/dist/server/promptActions.d.ts.map +0 -1
  87. package/dist/server/resourceActions.d.ts +0 -72
  88. package/dist/server/resourceActions.d.ts.map +0 -1
  89. package/dist/server/toolActions.d.ts +0 -84
  90. package/dist/server/toolActions.d.ts.map +0 -1
@@ -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+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S,CAGhD;IAED;;;;OAIG;IACG,WAAW,CACf,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,OAAO,EACb,gBAAgB,GAAE,UAAU,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAM,GACjE,OAAO,CAAC,wBAAwB,CAAC,CAgDnC;IAED,uFAAuF;IACjF,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,CAY3G;IAED,qFAAqF;IAC/E,aAAa,IAAI,OAAO,CAAC;QAAE,SAAS,EAAE,QAAQ,EAAE,CAAA;KAAE,CAAC,CAExD;CACF;AAqBD,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,CAAC"}
@@ -1,179 +1,123 @@
1
+ import type { MCPServerConfig as CoreMCPServerConfig } from '@mastra/core/mcp';
2
+ import type { RequestContext } from '@mastra/core/request-context';
3
+ import type { StandardSchemaWithJSON } from '@mastra/core/schema';
1
4
  import type { MCPServerContext } from '@mastra/core/tools';
2
5
  import type { McpUiResourceMeta } from '@modelcontextprotocol/ext-apps';
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
- */
6
+ import type { CacheHint, InputRequiredResult, Prompt, PromptMessage, Resource, ResourceTemplateType } from '@modelcontextprotocol/server';
7
+ /** The only protocol revision `@mastra/mcp` serves. */
8
+ export declare const MCP_PROTOCOL_VERSION: '2026-07-28';
9
+ /** Operations whose results can advertise cache hints. */
22
10
  export type MCPServerCacheableMethod = 'tools/list' | 'prompts/list' | 'resources/list' | 'resources/templates/list' | 'resources/read' | 'server/discover';
11
+ /** Cache hints (`ttlMs` / `cacheScope`) advertised on cacheable results, keyed by operation. */
12
+ export type MCPServerCacheHints = Partial<Record<MCPServerCacheableMethod, CacheHint>>;
23
13
  /**
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.
14
+ * Protocol context handed to resource and prompt callbacks: the same object tools
15
+ * receive as `context.mcp.extra` (cancellation signal, request id, `_meta`, auth).
30
16
  */
31
- export type MCPServerCacheHints = Partial<Record<MCPServerCacheableMethod, CacheHint>>;
17
+ export type MCPRequestHandlerExtra = MCPServerContext;
32
18
  /**
33
- * Callback function to retrieve content for a specific resource.
19
+ * Request-scoped context handed to resource and prompt callbacks.
34
20
  *
35
- * @param params - Parameters for resource content retrieval
36
- * @param params.uri - URI of the resource to retrieve
37
- * @param params.extra - Additional request handler context
38
- * @returns Promise resolving to resource content (single or array)
21
+ * `extra` carries the protocol facilities of the current request and
22
+ * `requestContext` the trusted application context (`authInfo`, mapped `user`).
23
+ * `suspend`, `resumeData` and `suspendPayload` are the same continuation vocabulary
24
+ * tools use: calling `suspend(payload)` ends the request as `input_required`; the
25
+ * continuation re-enters with the client's answer in `resumeData` and the payload it
26
+ * suspended with in `suspendPayload`.
39
27
  */
40
- export type MCPServerResourceContentCallback = ({ uri, extra, }: {
41
- uri: string;
28
+ export interface MCPServerRequest<TSuspend = unknown, TResume = unknown> {
42
29
  extra: MCPRequestHandlerExtra;
43
- }) => Promise<MCPServerResourceContent | MCPServerResourceContent[]>;
44
- /**
45
- * Content for an MCP resource, either text or binary (base64-encoded).
46
- */
30
+ requestContext: RequestContext;
31
+ suspend: (payload: TSuspend) => Promise<void>;
32
+ resumeData?: TResume;
33
+ suspendPayload?: TSuspend;
34
+ }
35
+ /** Content for an MCP resource, either text or binary (base64-encoded). */
47
36
  export type MCPServerResourceContent = {
48
37
  text?: string;
49
38
  } | {
50
39
  blob?: string;
51
40
  };
52
- /**
53
- * Configuration for MCP server resource handling.
54
- *
55
- * Defines callbacks for listing resources, retrieving content, and optionally listing templates.
56
- */
41
+ export type MCPServerResourceContentCallback = (params: {
42
+ uri: string;
43
+ } & MCPServerRequest) => Promise<MCPServerResourceContent | MCPServerResourceContent[] | void>;
44
+ /** Configuration for MCP server resource handling. */
57
45
  export type MCPServerResources = {
58
- /** Function to list all available resources */
59
- listResources: ({ extra }: {
46
+ listResources: (params: {
60
47
  extra: MCPRequestHandlerExtra;
48
+ requestContext: RequestContext;
61
49
  }) => Promise<Resource[]>;
62
- /** Function to get content for a specific resource */
63
50
  getResourceContent: MCPServerResourceContentCallback;
64
- /** Optional function to list resource templates */
65
- resourceTemplates?: ({ extra }: {
51
+ resourceTemplates?: (params: {
66
52
  extra: MCPRequestHandlerExtra;
53
+ requestContext: RequestContext;
67
54
  }) => Promise<ResourceTemplateType[]>;
68
- };
69
- /**
70
- * Extends the MCP Prompt type with an optional version field.
71
- *
72
- * The MCP protocol does not include `version` on prompts, so this field is
73
- * only used server-side for internal prompt lookup and is not sent over the wire.
74
- *
75
- * @deprecated The `version` field is not part of the MCP protocol and will be removed in a future release.
76
- * Use distinct prompt names instead (e.g., `explain-code-v1`, `explain-code-v2`).
77
- */
78
- export type MastraPrompt = Prompt & {
79
55
  /**
80
- * @deprecated The `version` field is not part of the MCP protocol and will be removed in a future release.
81
- * Use distinct prompt names instead (e.g., `explain-code-v1`, `explain-code-v2`).
56
+ * Shape of the answer a suspended `getResourceContent` expects. Required for
57
+ * `suspend` to be usable; it must describe a flat object of primitives because it
58
+ * becomes the form the client fills in.
82
59
  */
83
- version?: string;
60
+ resumeSchema?: StandardSchemaWithJSON;
84
61
  };
85
- /**
86
- * Callback function to retrieve messages for a specific prompt.
87
- *
88
- * @param params - Parameters for prompt message retrieval
89
- * @param params.name - Name of the prompt
90
- * @param params.version - Optional version of the prompt
91
- * @param params.args - Optional arguments for the prompt
92
- * @param params.extra - Additional request handler context
93
- * @returns Promise resolving to array of prompt messages
94
- */
95
- export type MCPServerPromptMessagesCallback = ({ name, version, args, extra, }: {
62
+ export type MCPServerPromptMessagesCallback = (params: {
96
63
  name: string;
97
- /**
98
- * @deprecated The `version` field is not part of the MCP protocol and will be removed in a future release.
99
- * Use distinct prompt names instead (e.g., `explain-code-v1`, `explain-code-v2`).
100
- */
101
- version?: string;
102
- args?: any;
103
- extra: MCPRequestHandlerExtra;
104
- }) => Promise<PromptMessage[]>;
105
- /**
106
- * Configuration for MCP server prompt handling.
107
- *
108
- * Defines callbacks for listing prompts and retrieving prompt messages.
109
- */
64
+ args?: Record<string, unknown>;
65
+ } & MCPServerRequest) => Promise<PromptMessage[] | void>;
66
+ /** Configuration for MCP server prompt handling. */
110
67
  export type MCPServerPrompts = {
111
- /** Function to list all available prompts */
112
- listPrompts: ({ extra }: {
68
+ listPrompts: (params: {
113
69
  extra: MCPRequestHandlerExtra;
114
- }) => Promise<MastraPrompt[]>;
115
- /** Optional function to get messages for a specific prompt */
70
+ requestContext: RequestContext;
71
+ }) => Promise<Prompt[]>;
116
72
  getPromptMessages?: MCPServerPromptMessagesCallback;
73
+ /** Shape of the answer a suspended `getPromptMessages` expects; see `MCPServerResources.resumeSchema`. */
74
+ resumeSchema?: StandardSchemaWithJSON;
117
75
  };
118
76
  /**
119
- * Actions for handling elicitation requests (interactive user input collection).
120
- */
121
- export type ElicitationActions = {
122
- /**
123
- * Function to send an elicitation request to the client.
124
- *
125
- * @param request - The elicitation request parameters
126
- * @param options - Optional request options (timeout, signal, etc.)
127
- * @returns Promise resolving to the client's elicitation response
128
- */
129
- sendRequest: (request: ElicitRequest['params'], options?: RequestOptions) => Promise<ElicitResult>;
130
- };
131
- /**
132
- * Extra context passed to MCP request handlers.
133
- */
134
- export type MCPRequestHandlerExtra = MCPServerContext;
135
- /**
136
- * Re-exported MCP types for resource handling.
77
+ * Integrity protection for continuation state. `requestState` round-trips through
78
+ * the client on every `input_required` round: the server signs it with `key` so a
79
+ * tampered, expired or foreign envelope is rejected before any handler runs.
137
80
  *
138
- * - `Resource`: Represents a data resource exposed by the server
139
- * - `ResourceTemplate`: URI template for dynamic resource generation
140
- * - `RequestOptions`: Options for MCP requests (timeout, signal, etc.)
141
- */
142
- export type { Resource, ResourceTemplateType as ResourceTemplate, RequestOptions };
143
- /**
144
- * Configuration for a single MCP App resource.
81
+ * Every instance that may answer a continuation must share the same key (set it from
82
+ * the environment in multi-instance and serverless deployments). Without a key the
83
+ * server generates one per process and continuations only succeed on that process.
145
84
  *
146
- * App resources serve interactive HTML UIs via the `ui://` URI scheme
147
- * as defined by the MCP Apps extension (SEP-1865).
85
+ * The envelope is bound to the authenticated caller. On a server without
86
+ * authorization every caller shares one anonymous principal, so a `requestState`
87
+ * acts as a bearer credential for its round until `ttlSeconds` elapse.
148
88
  */
89
+ export interface MCPServerRequestStateOptions {
90
+ /** HMAC key, at least 32 bytes. */
91
+ key?: string | Uint8Array;
92
+ /** How long a suspended round stays answerable. Defaults to 600 seconds. */
93
+ ttlSeconds?: number;
94
+ }
95
+ /** Request-security options accepted by `startHTTP`. */
96
+ export interface MCPServerHTTPRequestOptions {
97
+ /**
98
+ * Check the `Host` header against `allowedHosts` and the `Origin` header against
99
+ * `allowedOrigins` before handling the request. A check only runs when its list is
100
+ * non-empty; a rejected request receives a `403` JSON-RPC error.
101
+ */
102
+ enableDnsRebindingProtection?: boolean;
103
+ /** Hostnames accepted in the `Host` header. Ports are ignored when matching. */
104
+ allowedHosts?: string[];
105
+ /**
106
+ * Origins accepted in the `Origin` header. Only the hostname is compared, and
107
+ * requests without an `Origin` header pass because non-browser clients don't send one.
108
+ */
109
+ allowedOrigins?: string[];
110
+ }
111
+ export type MCPAuthInfoToUserMapper = NonNullable<CoreMCPServerConfig['mapAuthInfoToUser']>;
112
+ export type { Prompt, PromptMessage, Resource, ResourceTemplateType as ResourceTemplate, InputRequiredResult };
113
+ /** Configuration for a single MCP App resource served under the `ui://` scheme. */
149
114
  export interface AppResource {
150
- /** Display name for the UI resource */
151
115
  name: string;
152
- /** Optional description of the UI resource */
153
116
  description?: string;
154
- /** Inline HTML content for the UI */
155
117
  html?: string;
156
- /** Path to an HTML file (resolved at startup) */
157
118
  htmlPath?: string;
158
- /** UI resource metadata (CSP, permissions, rendering preferences) from the official ext-apps SDK */
159
119
  meta?: McpUiResourceMeta;
160
120
  }
161
- /**
162
- * Map of `ui://` URIs to their app resource configurations.
163
- *
164
- * Used as a convenience config on MCPServer to auto-register UI resources
165
- * that are served via the MCP Apps extension.
166
- *
167
- * @example
168
- * ```typescript
169
- * const appResources: AppResources = {
170
- * 'ui://weather/dashboard': {
171
- * name: 'Weather Dashboard',
172
- * html: '<html>...</html>',
173
- * meta: { csp: { connectDomains: ['https://api.weather.com'] } },
174
- * },
175
- * };
176
- * ```
177
- */
121
+ /** Map of `ui://` URIs to their app resource configurations. */
178
122
  export type AppResources = Record<string, AppResource>;
179
123
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/server/types.ts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M,EAAE,WAAW,CAAC,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from './oauth-types.js';
2
+ export * from './trace-context.js';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"}
@@ -6,11 +6,11 @@
6
6
  * MCP packages, so both sides source them from `@modelcontextprotocol/client`
7
7
  * alongside the OAuth flow helpers below.
8
8
  *
9
- * @see https://modelcontextprotocol.io/specification/2025-06-18/basic/authorization
9
+ * @see https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization
10
10
  */
11
11
  import type { OAuthProtectedResourceMetadata as SDKOAuthProtectedResourceMetadata } from '@modelcontextprotocol/client';
12
- export type { OAuthMetadata, OAuthTokens, OAuthErrorResponse, OAuthClientMetadata, OAuthClientInformation, OAuthClientInformationFull, OAuthClientRegistrationError, OAuthTokenRevocationRequest, OAuthProtectedResourceMetadata, AuthorizationServerMetadata, } from '@modelcontextprotocol/client';
13
- export { auth, discoverOAuthProtectedResourceMetadata, discoverOAuthMetadata, discoverAuthorizationServerMetadata, startAuthorization, exchangeAuthorization, refreshAuthorization, registerClient, extractResourceMetadataUrl, selectResourceURL, parseErrorResponse, UnauthorizedError, buildDiscoveryUrls, } from '@modelcontextprotocol/client';
12
+ export type { OAuthMetadata, OAuthTokens, OAuthErrorResponse, OAuthClientMetadata, OAuthClientInformation, OAuthClientInformationContext, OAuthDiscoveryState, StoredOAuthTokens, OAuthTokenRevocationRequest, OAuthProtectedResourceMetadata, AuthorizationServerMetadata, } from '@modelcontextprotocol/client';
13
+ export { auth, discoverOAuthProtectedResourceMetadata, discoverOAuthMetadata, discoverAuthorizationServerMetadata, startAuthorization, exchangeAuthorization, refreshAuthorization, extractResourceMetadataUrl, selectResourceURL, parseErrorResponse, UnauthorizedError, buildDiscoveryUrls, } from '@modelcontextprotocol/client';
14
14
  export type { OAuthClientProvider, AuthResult } from '@modelcontextprotocol/client';
15
15
  /**
16
16
  * Configuration for OAuth-protected MCP server.
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-types.d.ts","sourceRoot":"","sources":["../../src/shared/oauth-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,8BAA8B,IAAI,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AAExH,YAAY,EACV,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,0BAA0B,EAC1B,4BAA4B,EAC5B,2BAA2B,EAC3B,8BAA8B,EAC9B,2BAA2B,GAC5B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,IAAI,EACJ,sCAAsC,EACtC,qBAAqB,EACrB,mCAAmC,EACnC,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,0BAA0B,EAC1B,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AAGtC,YAAY,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAEpF;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAE/B;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAE3B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EA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H,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC3C;AASD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,GAAE,oBAAyB,GAAG,MAAM,CAkBxF;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,oBAAoB,GAAG,iCAAiC,CAWjH;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAU5F"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * W3C trace fields carried in MCP request `_meta` (SEP-414).
3
+ *
4
+ * Mastra passes these strings through without creating spans or validating
5
+ * their format. Treat inbound values, especially `baggage`, as untrusted
6
+ * observability data: never use them for authentication or authorization.
7
+ */
8
+ export interface MCPTraceContext {
9
+ traceparent: string;
10
+ tracestate?: string;
11
+ baggage?: string;
12
+ }
13
+ /**
14
+ * Reads the W3C trace fields out of request metadata. Only string values are
15
+ * accepted; a request without a `traceparent` carries no trace context.
16
+ */
17
+ export declare function traceContextFromMeta(meta: Record<string, unknown> | undefined): MCPTraceContext | undefined;
18
+ /** Projects a trace context onto the `_meta` keys the specification defines. */
19
+ export declare function traceContextToMeta(traceContext: MCPTraceContext): Record<string, string>;
20
+ //# sourceMappingURL=trace-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trace-context.d.ts","sourceRoot":"","sources":["../../src/shared/trace-context.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAOD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,eAAe,GAAG,SAAS,CAU3G;AAED,gFAAgF;AAChF,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAMxF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp",
3
- "version": "1.18.1-alpha.3",
3
+ "version": "2.0.0-alpha.4",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -27,30 +27,23 @@
27
27
  "dependencies": {
28
28
  "@modelcontextprotocol/client": "2.0.0",
29
29
  "@modelcontextprotocol/core": "2.0.0",
30
- "@modelcontextprotocol/ext-apps": "^1.7.1",
30
+ "@modelcontextprotocol/ext-apps": "^2.0.0",
31
31
  "@modelcontextprotocol/node": "2.0.0",
32
- "@modelcontextprotocol/sdk": "^1.29.0",
33
32
  "@modelcontextprotocol/server": "2.0.0",
34
- "@modelcontextprotocol/server-legacy": "2.0.0",
35
33
  "exit-hook": "^5.1.0",
36
34
  "fast-deep-equal": "^3.1.3"
37
35
  },
38
36
  "peerDependencies": {
39
- "@mastra/core": ">=1.64.0-0 <2.0.0-0"
37
+ "@mastra/core": ">=1.68.0-0 <2.0.0-0"
40
38
  },
41
39
  "devDependencies": {
42
- "@hono/node-server": "^2.0.0",
43
40
  "@mendable/firecrawl-js": "^1.29.3",
44
- "@modelcontextprotocol/server-filesystem": "2026.8.31",
41
+ "@modelcontextprotocol/conformance": "0.2.0-alpha.11",
45
42
  "@types/node": "22.20.1",
46
43
  "@types/semver": "^7.7.1",
47
44
  "@vitest/coverage-v8": "4.1.11",
48
45
  "@vitest/ui": "4.1.11",
49
- "ai": "^5.0.221",
50
46
  "eslint": "^10.7.0",
51
- "get-port": "^7.1.0",
52
- "hono": "^4.13.5",
53
- "hono-mcp-server-sse-transport": "0.0.7",
54
47
  "semver": "^7.8.5",
55
48
  "tsdown": "0.22.9",
56
49
  "tsx": "^4.23.1",
@@ -60,12 +53,12 @@
60
53
  "zod-to-json-schema": "^3.25.1",
61
54
  "@internal/ai-sdk-v5": "0.0.80",
62
55
  "@internal/lint": "0.0.133",
63
- "@internal/llm-recorder": "0.0.69",
64
- "@internal/test-utils": "0.0.69",
65
56
  "@internal/types-builder": "0.0.108",
57
+ "@internal/test-utils": "0.0.69",
58
+ "@internal/llm-recorder": "0.0.69",
59
+ "@mastra/core": "1.68.0-alpha.6",
66
60
  "@mastra/observability": "1.17.9-alpha.1",
67
- "@mastra/schema-compat": "1.3.11-alpha.1",
68
- "@mastra/core": "1.68.0-alpha.5"
61
+ "@mastra/schema-compat": "1.3.11-alpha.1"
69
62
  },
70
63
  "homepage": "https://mastra.ai",
71
64
  "repository": {
@@ -82,10 +75,12 @@
82
75
  "scripts": {
83
76
  "build:lib": "tsdown --silent --config tsdown.config.ts",
84
77
  "build:watch": "pnpm build:lib --watch",
85
- "test:client": "vitest run ./src/client/client.test.ts ./src/client/configuration.test.ts ./src/client/error-utils.test.ts ./src/client/oauth.test.ts ./src/client/oauth-callback-server.test.ts ./src/client/oauth-flow.test.ts ./src/client/url-policy.test.ts ./src/client/stdio-env.test.ts",
78
+ "test:client": "vitest run --project unit:packages/mcp ./src/client",
79
+ "test:client:e2e": "vitest run --project e2e:packages/mcp ./src/client",
86
80
  "test:server": "vitest run ./src/server",
87
81
  "test:integration": "cd integration-tests && pnpm test:mcp",
88
82
  "test:compat": "bash integration-tests/compat.sh",
83
+ "test:conformance": "tsx ./src/conformance/run.ts",
89
84
  "test": "pnpm test:server && pnpm test:client && pnpm test:integration",
90
85
  "lint": "oxlint . && eslint .",
91
86
  "lint:fix": "oxlint --fix . && eslint --fix ."
@@ -1,4 +0,0 @@
1
- import type { Hono } from '../hono';
2
- import type { UnionToIntersection } from '../utils/types';
3
- import type { Client, ClientRequestOptions } from './types';
4
- export declare const hc: <T extends Hono<any, any, any>, Prefix extends string = string>(baseUrl: Prefix, options?: ClientRequestOptions) => UnionToIntersection<Client<T, Prefix>>;
@@ -1,35 +0,0 @@
1
- /**
2
- * @description This file is a modified version of `fetch-result-please` (`ofetch`), minimalized and adapted to Hono's custom needs.
3
- *
4
- * @link https://www.npmjs.com/package/fetch-result-please
5
- */
6
- /**
7
- * Smartly parses and return the consumable result from a fetch `Response`.
8
- *
9
- * Throwing a structured error if the response is not `ok`. ({@link DetailedError})
10
- */
11
- export declare function fetchRP(fetchRes: Response | Promise<Response>): Promise<any>;
12
- export declare class DetailedError extends Error {
13
- /**
14
- * Additional `message` that will be logged AND returned to client
15
- */
16
- detail?: any;
17
- /**
18
- * Additional `code` that will be logged AND returned to client
19
- */
20
- code?: any;
21
- /**
22
- * Additional value that will be logged AND NOT returned to client
23
- */
24
- log?: any;
25
- /**
26
- * Optionally set the status code to return, in a web server context
27
- */
28
- statusCode?: any;
29
- constructor(message: string, options?: {
30
- detail?: any;
31
- code?: any;
32
- statusCode?: number;
33
- log?: any;
34
- });
35
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * @module
3
- * The HTTP Client for Hono.
4
- */
5
- export { hc } from './client';
6
- export { parseResponse, DetailedError } from './utils';
7
- export type { InferResponseType, InferRequestType, Fetch, ClientRequestOptions, ClientRequest, ClientResponse, ApplyGlobalResponse, PickResponseByStatusCode, } from './types';