@lark-apaas/nestjs-mcp 0.1.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/LICENSE +13 -0
- package/README.md +165 -0
- package/bin/miaoda-mcp.cjs +3 -0
- package/dist/cli.cjs +231618 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/index.cjs +1753 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +360 -0
- package/dist/index.d.ts +360 -0
- package/dist/index.js +1704 -0
- package/dist/index.js.map +1 -0
- package/package.json +73 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
import { Request } from 'express';
|
|
2
|
+
import { Tool, Resource, ServerRequest, ServerNotification, ToolAnnotations } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import { AnySchema, SchemaOutput, ZodRawShapeCompat, ShapeOutput, AnyObjectSchema } from '@modelcontextprotocol/sdk/server/zod-compat.js';
|
|
4
|
+
import { RequestHandlerExtra } from '@modelcontextprotocol/sdk/shared/protocol.js';
|
|
5
|
+
import { DynamicModule } from '@nestjs/common';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* MCP 端点相对应用根的挂载路径。
|
|
9
|
+
*
|
|
10
|
+
* 与 `/__innerapi__/automation/invoke` 同属平台内部端点:不走 `/api/*` 的 CSRF 与响应包装,
|
|
11
|
+
* 由 MCP Gateway 完成凭证校验后以当前用户身份转发到此路径。
|
|
12
|
+
* 应用设置了 `CLIENT_BASE_PATH`(如 `/app/<appId>`)时,完整路径为 `${CLIENT_BASE_PATH}/__innerapi__/mcp`。
|
|
13
|
+
*/
|
|
14
|
+
declare const MCP_ENDPOINT_PATH = "/__innerapi__/mcp";
|
|
15
|
+
/**
|
|
16
|
+
* Nest 控制器路径(不带前导斜杠,与仓库内其他 `__innerapi__` 控制器写法一致)。
|
|
17
|
+
*/
|
|
18
|
+
declare const MCP_CONTROLLER_PATH = "__innerapi__/mcp";
|
|
19
|
+
/**
|
|
20
|
+
* 清单文件在用户工程内的相对路径(相对 process.cwd())。
|
|
21
|
+
*
|
|
22
|
+
* 代码是唯一事实来源,清单由 SDK 在开发态启动时以及 `miaoda-mcp validate` 命令导出,
|
|
23
|
+
* 用于离线校验;在线面板通过运行时 manifest 接口读取。
|
|
24
|
+
*/
|
|
25
|
+
declare const MCP_MANIFEST_PATH = ".spark/mcp/manifest.json";
|
|
26
|
+
/**
|
|
27
|
+
* MCP Apps 单文件 HTML 产物目录(相对 process.cwd()),由构建预设产出 `<entry>.html`。
|
|
28
|
+
*/
|
|
29
|
+
declare const MCP_UI_DIST_DIR = "dist/mcp-ui";
|
|
30
|
+
/**
|
|
31
|
+
* MCP Apps 资源 URI 约定前缀。
|
|
32
|
+
*/
|
|
33
|
+
declare const MCP_UI_RESOURCE_SCHEME = "ui://";
|
|
34
|
+
/** 类装饰器元数据键:标记一个类为 MCP 工具类 */
|
|
35
|
+
declare const MCP_TOOLS_METADATA_KEY = "mcp:tools";
|
|
36
|
+
/** 方法装饰器元数据键:标记一个方法为 MCP 工具 */
|
|
37
|
+
declare const MCP_TOOL_METADATA_KEY = "mcp:tool";
|
|
38
|
+
/** 方法装饰器元数据键:标记一个方法为 MCP Apps 资源 */
|
|
39
|
+
declare const MCP_UI_RESOURCE_METADATA_KEY = "mcp:ui-resource";
|
|
40
|
+
/** 模块配置注入令牌 */
|
|
41
|
+
declare const MCP_MODULE_OPTIONS: unique symbol;
|
|
42
|
+
/** 服务端默认名称(可通过模块配置覆盖) */
|
|
43
|
+
declare const MCP_DEFAULT_SERVER_NAME = "miaoda-app";
|
|
44
|
+
/** 服务端默认版本 */
|
|
45
|
+
declare const MCP_DEFAULT_SERVER_VERSION = "1.0.0";
|
|
46
|
+
/** 清单文件格式版本 */
|
|
47
|
+
declare const MCP_MANIFEST_VERSION = 1;
|
|
48
|
+
/**
|
|
49
|
+
* 工具名合法字符(MCP 规范 SEP-986):1~128 位,字母、数字、下划线、连字符、点。
|
|
50
|
+
*/
|
|
51
|
+
declare const MCP_TOOL_NAME_PATTERN: RegExp;
|
|
52
|
+
/** 应用使用说明:普通 Markdown Resource,不声明 Skills 扩展能力。 */
|
|
53
|
+
declare const MCP_SKILL_PATH = "server/mcp/SKILL.md";
|
|
54
|
+
declare const MCP_SKILL_URI = "skill://app/SKILL.md";
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* zod 原始形状:`{ field: z.string() }`,与 `@modelcontextprotocol/sdk` 的 `registerTool` 保持一致。
|
|
58
|
+
* 类型来自 SDK 的 zod 兼容层,zod v3(3.25+)与 v4 均可。
|
|
59
|
+
*/
|
|
60
|
+
type McpRawShape = ZodRawShapeCompat;
|
|
61
|
+
/**
|
|
62
|
+
* 工具入参 / 出参 schema:既可以是原始形状,也可以是 `z.object(...)`。
|
|
63
|
+
*/
|
|
64
|
+
type McpSchema = McpRawShape | AnyObjectSchema;
|
|
65
|
+
/**
|
|
66
|
+
* 从 schema 推导 TypeScript 类型。
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* const Input = { orderId: z.string() };
|
|
70
|
+
* type Input = Infer<typeof Input>; // { orderId: string }
|
|
71
|
+
*/
|
|
72
|
+
type Infer<S> = S extends AnySchema ? SchemaOutput<S> : S extends ZodRawShapeCompat ? ShapeOutput<S> : never;
|
|
73
|
+
/**
|
|
74
|
+
* 当前调用者身份,来源于网关注入并由 `UserContextMiddleware` 解析的 `req.userContext`。
|
|
75
|
+
*/
|
|
76
|
+
interface McpUser {
|
|
77
|
+
userId?: string;
|
|
78
|
+
tenantId?: number;
|
|
79
|
+
appId?: string;
|
|
80
|
+
userType?: string;
|
|
81
|
+
env?: 'preview' | 'runtime';
|
|
82
|
+
userName?: string;
|
|
83
|
+
userNameEn?: string;
|
|
84
|
+
userNameI18n?: Record<string, string>;
|
|
85
|
+
isSystemAccount?: boolean;
|
|
86
|
+
roles?: string[];
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* 工具执行上下文,作为工具方法的第二个参数传入。
|
|
90
|
+
*/
|
|
91
|
+
interface McpContext {
|
|
92
|
+
/** 当前用户身份,与 REST 接口中的 `req.userContext` 一致 */
|
|
93
|
+
user: McpUser;
|
|
94
|
+
/** 原始 HTTP 请求,用于读取 header、logid 等 */
|
|
95
|
+
request: Request;
|
|
96
|
+
/** 客户端取消调用时触发 */
|
|
97
|
+
signal: AbortSignal;
|
|
98
|
+
/** MCP 请求 id */
|
|
99
|
+
requestId: string | number;
|
|
100
|
+
/** SDK 透传的完整附加信息(进度通知、会话信息等) */
|
|
101
|
+
extra: RequestHandlerExtra<ServerRequest, ServerNotification>;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* 工具返回的内容块(文本 / 图片 / 资源链接),与 MCP `CallToolResult.content` 对齐。
|
|
105
|
+
*/
|
|
106
|
+
type McpContentBlock = {
|
|
107
|
+
type: 'text';
|
|
108
|
+
text: string;
|
|
109
|
+
_meta?: Record<string, unknown>;
|
|
110
|
+
} | {
|
|
111
|
+
type: 'image';
|
|
112
|
+
data: string;
|
|
113
|
+
mimeType: string;
|
|
114
|
+
_meta?: Record<string, unknown>;
|
|
115
|
+
} | {
|
|
116
|
+
type: 'audio';
|
|
117
|
+
data: string;
|
|
118
|
+
mimeType: string;
|
|
119
|
+
_meta?: Record<string, unknown>;
|
|
120
|
+
} | {
|
|
121
|
+
type: 'resource_link';
|
|
122
|
+
uri: string;
|
|
123
|
+
name: string;
|
|
124
|
+
title?: string;
|
|
125
|
+
description?: string;
|
|
126
|
+
mimeType?: string;
|
|
127
|
+
_meta?: Record<string, unknown>;
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* 工具方法的返回值。
|
|
131
|
+
*
|
|
132
|
+
* - 声明了 `outputSchema` 时,`structuredContent` 必填且类型受 schema 约束;
|
|
133
|
+
* `content` 可省略,SDK 会自动补一份 JSON 文本供不支持结构化输出的客户端使用。
|
|
134
|
+
* - 未声明 `outputSchema` 时,可直接返回 `{ content: [...] }`。
|
|
135
|
+
*/
|
|
136
|
+
type McpToolResult<O = undefined> = O extends undefined ? {
|
|
137
|
+
content: McpContentBlock[];
|
|
138
|
+
structuredContent?: Record<string, unknown>;
|
|
139
|
+
isError?: boolean;
|
|
140
|
+
_meta?: Record<string, unknown>;
|
|
141
|
+
} : {
|
|
142
|
+
structuredContent: Infer<O>;
|
|
143
|
+
content?: McpContentBlock[];
|
|
144
|
+
isError?: boolean;
|
|
145
|
+
_meta?: Record<string, unknown>;
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* MCP Apps 关联配置:声明该工具的结果由哪个 `ui://` 资源渲染。
|
|
149
|
+
*/
|
|
150
|
+
interface McpToolUiOptions {
|
|
151
|
+
/** 关联的 MCP Apps 资源 URI,如 `ui://order/detail` */
|
|
152
|
+
resourceUri: string;
|
|
153
|
+
/**
|
|
154
|
+
* 可见范围:`model` 表示模型可调用,`app` 表示仅供界面内调用。
|
|
155
|
+
* 默认 `['model', 'app']`。
|
|
156
|
+
*/
|
|
157
|
+
visibility?: Array<'model' | 'app'>;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* `@McpTool()` 装饰器配置。
|
|
161
|
+
*/
|
|
162
|
+
interface McpToolOptions<I extends McpSchema | undefined = undefined, O extends McpSchema | undefined = undefined> {
|
|
163
|
+
/** 工具名,默认取方法名;需满足 `^[A-Za-z0-9_.-]{1,128}$` */
|
|
164
|
+
name?: string;
|
|
165
|
+
/** 面向人的标题 */
|
|
166
|
+
title?: string;
|
|
167
|
+
/** 面向模型的描述,应说明用途、何时调用与返回内容 */
|
|
168
|
+
description: string;
|
|
169
|
+
/** 入参 schema(zod) */
|
|
170
|
+
inputSchema?: I;
|
|
171
|
+
/** 出参 schema(zod),声明后返回值需带 `structuredContent` */
|
|
172
|
+
outputSchema?: O;
|
|
173
|
+
/** MCP 工具注解(readOnlyHint / destructiveHint / idempotentHint / openWorldHint) */
|
|
174
|
+
annotations?: ToolAnnotations;
|
|
175
|
+
/** MCP Apps:结果由指定 `ui://` 资源渲染 */
|
|
176
|
+
ui?: McpToolUiOptions;
|
|
177
|
+
/** 额外 `_meta`,与 `ui` 生成的字段合并 */
|
|
178
|
+
meta?: Record<string, unknown>;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* `@McpTools()` 类装饰器配置。
|
|
182
|
+
*/
|
|
183
|
+
interface McpToolsOptions {
|
|
184
|
+
/** 为该类下所有工具名加前缀,如 `order_` */
|
|
185
|
+
prefix?: string;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* `@McpUiResource()` 方法装饰器配置。方法需返回单文件 HTML 字符串。
|
|
189
|
+
*/
|
|
190
|
+
interface McpUiResourceOptions {
|
|
191
|
+
/** 资源 URI,须以 `ui://` 开头 */
|
|
192
|
+
uri: string;
|
|
193
|
+
/** 资源名,默认取方法名 */
|
|
194
|
+
name?: string;
|
|
195
|
+
title?: string;
|
|
196
|
+
description?: string;
|
|
197
|
+
/** 内容安全策略:允许连接 / 加载资源的域 */
|
|
198
|
+
csp?: {
|
|
199
|
+
connectDomains?: string[];
|
|
200
|
+
resourceDomains?: string[];
|
|
201
|
+
frameDomains?: string[];
|
|
202
|
+
baseUriDomains?: string[];
|
|
203
|
+
};
|
|
204
|
+
/** 宿主权限声明 */
|
|
205
|
+
permissions?: Record<string, unknown>;
|
|
206
|
+
/** 额外 `_meta.ui` 字段 */
|
|
207
|
+
meta?: Record<string, unknown>;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* 工具方法签名(装饰器用于校验方法类型)。
|
|
211
|
+
*/
|
|
212
|
+
type McpToolHandler<I extends McpSchema | undefined, O extends McpSchema | undefined> = (input: I extends undefined ? Record<string, never> : Infer<I>, ctx: McpContext) => McpToolResult<O> | Promise<McpToolResult<O>>;
|
|
213
|
+
/**
|
|
214
|
+
* MCP Apps 资源方法签名。
|
|
215
|
+
*/
|
|
216
|
+
type McpUiResourceHandler = (ctx: McpContext) => string | Promise<string>;
|
|
217
|
+
/**
|
|
218
|
+
* 模块配置。
|
|
219
|
+
*/
|
|
220
|
+
interface McpModuleOptions {
|
|
221
|
+
/** 是否启用 MCP 端点,默认 true */
|
|
222
|
+
enabled?: boolean;
|
|
223
|
+
/**
|
|
224
|
+
* 执行工具 / 读取资源时是否要求携带用户身份(`req.userContext.userId`),默认 true。
|
|
225
|
+
* 正常链路由 MCP Gateway 或开发服务入口注入身份;缺失时返回 isError 结果而不执行业务代码。
|
|
226
|
+
*/
|
|
227
|
+
requireUser?: boolean;
|
|
228
|
+
/** 对外声明的服务端名称,默认取 `SUDA_APP_ID` 或 `miaoda-app` */
|
|
229
|
+
serverName?: string;
|
|
230
|
+
/** 对外声明的服务端版本,默认 `1.0.0` */
|
|
231
|
+
serverVersion?: string;
|
|
232
|
+
/** 服务端说明(initialize 响应中的 `instructions`) */
|
|
233
|
+
instructions?: string;
|
|
234
|
+
/**
|
|
235
|
+
* 清单导出配置。默认在非生产环境启动时写入 `.spark/mcp/manifest.json`。
|
|
236
|
+
*/
|
|
237
|
+
manifest?: {
|
|
238
|
+
/** 是否在启动时写文件,默认 `NODE_ENV !== 'production'` */
|
|
239
|
+
writeOnBoot?: boolean;
|
|
240
|
+
/** 清单路径(相对 cwd),默认 `.spark/mcp/manifest.json` */
|
|
241
|
+
path?: string;
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
/** 平台面板聚合协议;标准 MCP 客户端使用 tools/list、resources/list/read。 */
|
|
245
|
+
interface McpSkill {
|
|
246
|
+
uri: string;
|
|
247
|
+
path: string;
|
|
248
|
+
content: string;
|
|
249
|
+
}
|
|
250
|
+
interface McpSourceLocation {
|
|
251
|
+
path: string;
|
|
252
|
+
line?: number;
|
|
253
|
+
}
|
|
254
|
+
interface McpSources {
|
|
255
|
+
tools: Record<string, McpSourceLocation>;
|
|
256
|
+
resources: Record<string, McpSourceLocation>;
|
|
257
|
+
}
|
|
258
|
+
interface McpCatalog {
|
|
259
|
+
version: number;
|
|
260
|
+
generatedAt: string;
|
|
261
|
+
endpoint: string;
|
|
262
|
+
tools: Tool[];
|
|
263
|
+
resources: Resource[];
|
|
264
|
+
skill: McpSkill | null;
|
|
265
|
+
sources: McpSources;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* 工具执行期间可预期的业务错误。
|
|
270
|
+
*
|
|
271
|
+
* 在工具方法中抛出该错误时,SDK 会将其转换为 `isError: true` 的工具结果并把 message 原样返回给 Agent,
|
|
272
|
+
* 适合表达“订单不存在”“无权访问”这类需要 Agent 感知并调整策略的失败。
|
|
273
|
+
* 其他未捕获异常会被记录日志,并以通用的失败提示返回,避免泄露内部细节。
|
|
274
|
+
*/
|
|
275
|
+
declare class McpToolError extends Error {
|
|
276
|
+
/** 可选的机器可读错误码,会一并放入返回内容 */
|
|
277
|
+
readonly code?: string;
|
|
278
|
+
/** 附加数据,会以 JSON 形式放入返回内容 */
|
|
279
|
+
readonly data?: unknown;
|
|
280
|
+
constructor(message: string, options?: {
|
|
281
|
+
code?: string;
|
|
282
|
+
data?: unknown;
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* `@McpTools()` 类装饰器:标记一个类为 MCP 工具类。
|
|
288
|
+
*
|
|
289
|
+
* 自动附加 `@Injectable()`,类内可正常注入业务 Service。
|
|
290
|
+
* 工具类需作为 provider 注册到所属业务模块,应用启动时由 `McpModule` 自动发现,
|
|
291
|
+
* 无需改动 `app.module.ts`。
|
|
292
|
+
*
|
|
293
|
+
* @example
|
|
294
|
+
* ```typescript
|
|
295
|
+
* @McpTools({ prefix: 'order_' })
|
|
296
|
+
* export class OrderMcpTools {
|
|
297
|
+
* constructor(private readonly orders: OrderService) {}
|
|
298
|
+
*
|
|
299
|
+
* @McpTool({ description: '按 ID 查询订单', inputSchema: GetOrderInput, outputSchema: GetOrderOutput })
|
|
300
|
+
* async get(input: Infer<typeof GetOrderInput>, ctx: McpContext): Promise<McpToolResult<typeof GetOrderOutput>> {
|
|
301
|
+
* const order = await this.orders.findById(input.orderId, ctx.user);
|
|
302
|
+
* return { structuredContent: order };
|
|
303
|
+
* }
|
|
304
|
+
* }
|
|
305
|
+
* ```
|
|
306
|
+
*/
|
|
307
|
+
declare const McpTools: (options?: McpToolsOptions) => ClassDecorator;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* `@McpTool()` 方法装饰器:把工具类中的一个方法注册为 MCP 工具。
|
|
311
|
+
*
|
|
312
|
+
* 方法签名约定为 `(input, ctx) => McpToolResult`:
|
|
313
|
+
* - `input` 已按 `inputSchema` 校验并推导类型,可写作 `Infer<typeof InputSchema>`;
|
|
314
|
+
* - `ctx.user` 为网关注入的当前用户身份,与 REST 接口中的 `req.userContext` 一致;
|
|
315
|
+
* - 声明 `outputSchema` 时返回 `{ structuredContent }`,否则返回 `{ content: [...] }`。
|
|
316
|
+
*
|
|
317
|
+
* TypeScript 方法装饰器只能校验、不能改写方法类型,因此入参与返回值类型需在方法签名上显式标注。
|
|
318
|
+
*/
|
|
319
|
+
declare function McpTool<I extends McpSchema | undefined = undefined, O extends McpSchema | undefined = undefined>(options: McpToolOptions<I, O>): <M extends McpToolHandler<I, O>>(target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<M>) => void;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* `@McpUiResource()` 方法装饰器:把方法注册为 MCP Apps 资源(`ui://` 单文件 HTML)。
|
|
323
|
+
*
|
|
324
|
+
* 方法返回完整 HTML 字符串。界面源码放在 `client/mcp-ui/<entry>/` 下(浏览器代码归客户端 tsconfig 管),
|
|
325
|
+
* 由构建预设打包为 `dist/mcp-ui/<entry>.html`,方法内通过 `readMcpUiTemplate('<entry>')` 读取即可。
|
|
326
|
+
*
|
|
327
|
+
* @example
|
|
328
|
+
* ```typescript
|
|
329
|
+
* @McpUiResource({ uri: 'ui://order/detail', title: '订单详情' })
|
|
330
|
+
* orderDetailView() {
|
|
331
|
+
* return readMcpUiTemplate('order-detail');
|
|
332
|
+
* }
|
|
333
|
+
* ```
|
|
334
|
+
*/
|
|
335
|
+
declare function McpUiResource(options: McpUiResourceOptions): <M extends McpUiResourceHandler>(target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<M>) => void;
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* McpModule
|
|
339
|
+
*
|
|
340
|
+
* 为全栈应用提供 MCP Server 能力:自动发现 `@McpTools()` 类,
|
|
341
|
+
* 在 `/__innerapi__/mcp` 暴露无状态 Streamable HTTP 端点,并导出 `.spark/mcp/manifest.json`。
|
|
342
|
+
*
|
|
343
|
+
* 由 `PlatformModule` 默认引入,业务工程无需手动导入;
|
|
344
|
+
* 需要关闭时传 `PlatformModule.forRoot({ mcp: { enabled: false } })`。
|
|
345
|
+
*/
|
|
346
|
+
declare class McpModule {
|
|
347
|
+
static forRoot(options?: McpModuleOptions): DynamicModule;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* 读取构建预设产出的 MCP Apps 单文件 HTML(`dist/mcp-ui/<entry>.html`)。
|
|
352
|
+
*
|
|
353
|
+
* 生产环境读取一次后缓存;开发环境每次重新读取,配合预设的 watch 构建实现界面热更新。
|
|
354
|
+
*
|
|
355
|
+
* @param entry `client/mcp-ui/<entry>/` 目录名
|
|
356
|
+
* @param cwd 工程根目录,默认 process.cwd()
|
|
357
|
+
*/
|
|
358
|
+
declare function readMcpUiTemplate(entry: string, cwd?: string): Promise<string>;
|
|
359
|
+
|
|
360
|
+
export { type Infer, MCP_CONTROLLER_PATH, MCP_DEFAULT_SERVER_NAME, MCP_DEFAULT_SERVER_VERSION, MCP_ENDPOINT_PATH, MCP_MANIFEST_PATH, MCP_MANIFEST_VERSION, MCP_MODULE_OPTIONS, MCP_SKILL_PATH, MCP_SKILL_URI, MCP_TOOLS_METADATA_KEY, MCP_TOOL_METADATA_KEY, MCP_TOOL_NAME_PATTERN, MCP_UI_DIST_DIR, MCP_UI_RESOURCE_METADATA_KEY, MCP_UI_RESOURCE_SCHEME, type McpCatalog, type McpContentBlock, type McpContext, McpModule, type McpModuleOptions, type McpRawShape, type McpSchema, type McpSkill, type McpSourceLocation, type McpSources, McpTool, McpToolError, type McpToolHandler, type McpToolOptions, type McpToolResult, type McpToolUiOptions, McpTools, type McpToolsOptions, McpUiResource, type McpUiResourceHandler, type McpUiResourceOptions, type McpUser, readMcpUiTemplate };
|