@casys/mcp-server 0.27.0 → 0.27.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.
Files changed (253) hide show
  1. package/CHANGELOG.md +6 -1770
  2. package/README.md +10 -638
  3. package/esm/mod.d.ts +1 -102
  4. package/esm/mod.js +1 -103
  5. package/package.json +17 -25
  6. package/esm/_dnt.polyfills.d.ts +0 -12
  7. package/esm/_dnt.polyfills.d.ts.map +0 -1
  8. package/esm/_dnt.polyfills.js +0 -15
  9. package/esm/_dnt.shims.d.ts +0 -2
  10. package/esm/_dnt.shims.d.ts.map +0 -1
  11. package/esm/_dnt.shims.js +0 -57
  12. package/esm/deps/jsr.io/@std/yaml/1.2.0/_chars.d.ts +0 -33
  13. package/esm/deps/jsr.io/@std/yaml/1.2.0/_chars.d.ts.map +0 -1
  14. package/esm/deps/jsr.io/@std/yaml/1.2.0/_chars.js +0 -48
  15. package/esm/deps/jsr.io/@std/yaml/1.2.0/_dumper_state.d.ts +0 -106
  16. package/esm/deps/jsr.io/@std/yaml/1.2.0/_dumper_state.d.ts.map +0 -1
  17. package/esm/deps/jsr.io/@std/yaml/1.2.0/_dumper_state.js +0 -636
  18. package/esm/deps/jsr.io/@std/yaml/1.2.0/_loader_state.d.ts +0 -67
  19. package/esm/deps/jsr.io/@std/yaml/1.2.0/_loader_state.d.ts.map +0 -1
  20. package/esm/deps/jsr.io/@std/yaml/1.2.0/_loader_state.js +0 -1393
  21. package/esm/deps/jsr.io/@std/yaml/1.2.0/_schema.d.ts +0 -44
  22. package/esm/deps/jsr.io/@std/yaml/1.2.0/_schema.d.ts.map +0 -1
  23. package/esm/deps/jsr.io/@std/yaml/1.2.0/_schema.js +0 -117
  24. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/binary.d.ts +0 -3
  25. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/binary.d.ts.map +0 -1
  26. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/binary.js +0 -103
  27. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/bool.d.ts +0 -3
  28. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/bool.d.ts.map +0 -1
  29. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/bool.js +0 -32
  30. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/float.d.ts +0 -3
  31. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/float.d.ts.map +0 -1
  32. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/float.js +0 -96
  33. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/int.d.ts +0 -3
  34. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/int.d.ts.map +0 -1
  35. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/int.js +0 -159
  36. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/map.d.ts +0 -3
  37. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/map.d.ts.map +0 -1
  38. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/map.js +0 -14
  39. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/merge.d.ts +0 -3
  40. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/merge.d.ts.map +0 -1
  41. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/merge.js +0 -10
  42. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/nil.d.ts +0 -3
  43. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/nil.d.ts.map +0 -1
  44. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/nil.js +0 -22
  45. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/omap.d.ts +0 -3
  46. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/omap.d.ts.map +0 -1
  47. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/omap.js +0 -29
  48. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/pairs.d.ts +0 -3
  49. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/pairs.d.ts.map +0 -1
  50. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/pairs.js +0 -19
  51. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/regexp.d.ts +0 -3
  52. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/regexp.d.ts.map +0 -1
  53. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/regexp.js +0 -30
  54. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/seq.d.ts +0 -3
  55. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/seq.d.ts.map +0 -1
  56. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/seq.js +0 -10
  57. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/set.d.ts +0 -3
  58. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/set.d.ts.map +0 -1
  59. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/set.js +0 -14
  60. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/str.d.ts +0 -3
  61. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/str.d.ts.map +0 -1
  62. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/str.js +0 -9
  63. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/timestamp.d.ts +0 -3
  64. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/timestamp.d.ts.map +0 -1
  65. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/timestamp.js +0 -81
  66. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/undefined.d.ts +0 -3
  67. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/undefined.d.ts.map +0 -1
  68. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/undefined.js +0 -20
  69. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type.d.ts +0 -32
  70. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type.d.ts.map +0 -1
  71. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type.js +0 -6
  72. package/esm/deps/jsr.io/@std/yaml/1.2.0/_utils.d.ts +0 -4
  73. package/esm/deps/jsr.io/@std/yaml/1.2.0/_utils.d.ts.map +0 -1
  74. package/esm/deps/jsr.io/@std/yaml/1.2.0/_utils.js +0 -13
  75. package/esm/deps/jsr.io/@std/yaml/1.2.0/mod.d.ts +0 -51
  76. package/esm/deps/jsr.io/@std/yaml/1.2.0/mod.d.ts.map +0 -1
  77. package/esm/deps/jsr.io/@std/yaml/1.2.0/mod.js +0 -53
  78. package/esm/deps/jsr.io/@std/yaml/1.2.0/parse.d.ts +0 -79
  79. package/esm/deps/jsr.io/@std/yaml/1.2.0/parse.d.ts.map +0 -1
  80. package/esm/deps/jsr.io/@std/yaml/1.2.0/parse.js +0 -91
  81. package/esm/deps/jsr.io/@std/yaml/1.2.0/stringify.d.ts +0 -100
  82. package/esm/deps/jsr.io/@std/yaml/1.2.0/stringify.d.ts.map +0 -1
  83. package/esm/deps/jsr.io/@std/yaml/1.2.0/stringify.js +0 -33
  84. package/esm/deps/jsr.io/@std/yaml/1.2.0/types.d.ts +0 -111
  85. package/esm/deps/jsr.io/@std/yaml/1.2.0/types.d.ts.map +0 -1
  86. package/esm/deps/jsr.io/@std/yaml/1.2.0/types.js +0 -104
  87. package/esm/mod.d.ts.map +0 -1
  88. package/esm/package.json +0 -3
  89. package/esm/src/auth/as-metadata-proxy.d.ts +0 -112
  90. package/esm/src/auth/as-metadata-proxy.d.ts.map +0 -1
  91. package/esm/src/auth/as-metadata-proxy.js +0 -171
  92. package/esm/src/auth/config.d.ts +0 -117
  93. package/esm/src/auth/config.d.ts.map +0 -1
  94. package/esm/src/auth/config.js +0 -219
  95. package/esm/src/auth/jwt-provider.d.ts +0 -157
  96. package/esm/src/auth/jwt-provider.d.ts.map +0 -1
  97. package/esm/src/auth/jwt-provider.js +0 -187
  98. package/esm/src/auth/middleware.d.ts +0 -61
  99. package/esm/src/auth/middleware.d.ts.map +0 -1
  100. package/esm/src/auth/middleware.js +0 -209
  101. package/esm/src/auth/mod.d.ts +0 -23
  102. package/esm/src/auth/mod.d.ts.map +0 -1
  103. package/esm/src/auth/mod.js +0 -27
  104. package/esm/src/auth/multi-tenant-middleware.d.ts +0 -131
  105. package/esm/src/auth/multi-tenant-middleware.d.ts.map +0 -1
  106. package/esm/src/auth/multi-tenant-middleware.js +0 -128
  107. package/esm/src/auth/presets.d.ts +0 -231
  108. package/esm/src/auth/presets.d.ts.map +0 -1
  109. package/esm/src/auth/presets.js +0 -223
  110. package/esm/src/auth/provider.d.ts +0 -47
  111. package/esm/src/auth/provider.d.ts.map +0 -1
  112. package/esm/src/auth/provider.js +0 -34
  113. package/esm/src/auth/scope-middleware.d.ts +0 -30
  114. package/esm/src/auth/scope-middleware.d.ts.map +0 -1
  115. package/esm/src/auth/scope-middleware.js +0 -48
  116. package/esm/src/auth/static-token-provider.d.ts +0 -155
  117. package/esm/src/auth/static-token-provider.d.ts.map +0 -1
  118. package/esm/src/auth/static-token-provider.js +0 -256
  119. package/esm/src/auth/types.d.ts +0 -151
  120. package/esm/src/auth/types.d.ts.map +0 -1
  121. package/esm/src/auth/types.js +0 -64
  122. package/esm/src/client-auth/callback-server.d.ts +0 -34
  123. package/esm/src/client-auth/callback-server.d.ts.map +0 -1
  124. package/esm/src/client-auth/callback-server.js +0 -141
  125. package/esm/src/client-auth/client-id-metadata.d.ts +0 -29
  126. package/esm/src/client-auth/client-id-metadata.d.ts.map +0 -1
  127. package/esm/src/client-auth/client-id-metadata.js +0 -149
  128. package/esm/src/client-auth/connect.d.ts +0 -32
  129. package/esm/src/client-auth/connect.d.ts.map +0 -1
  130. package/esm/src/client-auth/connect.js +0 -47
  131. package/esm/src/client-auth/mod.d.ts +0 -19
  132. package/esm/src/client-auth/mod.d.ts.map +0 -1
  133. package/esm/src/client-auth/mod.js +0 -19
  134. package/esm/src/client-auth/provider.d.ts +0 -78
  135. package/esm/src/client-auth/provider.d.ts.map +0 -1
  136. package/esm/src/client-auth/provider.js +0 -246
  137. package/esm/src/client-auth/token-store/file-store.d.ts +0 -20
  138. package/esm/src/client-auth/token-store/file-store.d.ts.map +0 -1
  139. package/esm/src/client-auth/token-store/file-store.js +0 -62
  140. package/esm/src/client-auth/token-store/memory-store.d.ts +0 -14
  141. package/esm/src/client-auth/token-store/memory-store.d.ts.map +0 -1
  142. package/esm/src/client-auth/token-store/memory-store.js +0 -25
  143. package/esm/src/client-auth/types.d.ts +0 -89
  144. package/esm/src/client-auth/types.d.ts.map +0 -1
  145. package/esm/src/client-auth/types.js +0 -10
  146. package/esm/src/concurrency/rate-limiter.d.ts +0 -87
  147. package/esm/src/concurrency/rate-limiter.d.ts.map +0 -1
  148. package/esm/src/concurrency/rate-limiter.js +0 -165
  149. package/esm/src/concurrency/request-queue.d.ts +0 -71
  150. package/esm/src/concurrency/request-queue.d.ts.map +0 -1
  151. package/esm/src/concurrency/request-queue.js +0 -128
  152. package/esm/src/http/body.d.ts +0 -20
  153. package/esm/src/http/body.d.ts.map +0 -1
  154. package/esm/src/http/body.js +0 -63
  155. package/esm/src/http/request-guards.d.ts +0 -54
  156. package/esm/src/http/request-guards.d.ts.map +0 -1
  157. package/esm/src/http/request-guards.js +0 -114
  158. package/esm/src/http/wire.d.ts +0 -26
  159. package/esm/src/http/wire.d.ts.map +0 -1
  160. package/esm/src/http/wire.js +0 -35
  161. package/esm/src/inspector/launcher.d.ts +0 -48
  162. package/esm/src/inspector/launcher.d.ts.map +0 -1
  163. package/esm/src/inspector/launcher.js +0 -100
  164. package/esm/src/mcp-app.d.ts +0 -728
  165. package/esm/src/mcp-app.d.ts.map +0 -1
  166. package/esm/src/mcp-app.js +0 -3530
  167. package/esm/src/middleware/backpressure.d.ts +0 -24
  168. package/esm/src/middleware/backpressure.d.ts.map +0 -1
  169. package/esm/src/middleware/backpressure.js +0 -31
  170. package/esm/src/middleware/mod.d.ts +0 -11
  171. package/esm/src/middleware/mod.d.ts.map +0 -1
  172. package/esm/src/middleware/mod.js +0 -11
  173. package/esm/src/middleware/rate-limit.d.ts +0 -22
  174. package/esm/src/middleware/rate-limit.d.ts.map +0 -1
  175. package/esm/src/middleware/rate-limit.js +0 -33
  176. package/esm/src/middleware/runner.d.ts +0 -32
  177. package/esm/src/middleware/runner.d.ts.map +0 -1
  178. package/esm/src/middleware/runner.js +0 -49
  179. package/esm/src/middleware/types.d.ts +0 -76
  180. package/esm/src/middleware/types.d.ts.map +0 -1
  181. package/esm/src/middleware/types.js +0 -9
  182. package/esm/src/middleware/validation.d.ts +0 -24
  183. package/esm/src/middleware/validation.d.ts.map +0 -1
  184. package/esm/src/middleware/validation.js +0 -30
  185. package/esm/src/mrtr/capability-check.d.ts +0 -75
  186. package/esm/src/mrtr/capability-check.d.ts.map +0 -1
  187. package/esm/src/mrtr/capability-check.js +0 -233
  188. package/esm/src/mrtr/mod.d.ts +0 -18
  189. package/esm/src/mrtr/mod.d.ts.map +0 -1
  190. package/esm/src/mrtr/mod.js +0 -12
  191. package/esm/src/mrtr/replay-store.d.ts +0 -50
  192. package/esm/src/mrtr/replay-store.d.ts.map +0 -1
  193. package/esm/src/mrtr/replay-store.js +0 -61
  194. package/esm/src/mrtr/request-state.d.ts +0 -181
  195. package/esm/src/mrtr/request-state.d.ts.map +0 -1
  196. package/esm/src/mrtr/request-state.js +0 -313
  197. package/esm/src/mrtr/retry-guard.d.ts +0 -61
  198. package/esm/src/mrtr/retry-guard.d.ts.map +0 -1
  199. package/esm/src/mrtr/retry-guard.js +0 -53
  200. package/esm/src/mrtr/types.d.ts +0 -99
  201. package/esm/src/mrtr/types.d.ts.map +0 -1
  202. package/esm/src/mrtr/types.js +0 -14
  203. package/esm/src/observability/metrics.d.ts +0 -104
  204. package/esm/src/observability/metrics.d.ts.map +0 -1
  205. package/esm/src/observability/metrics.js +0 -207
  206. package/esm/src/observability/mod.d.ts +0 -12
  207. package/esm/src/observability/mod.d.ts.map +0 -1
  208. package/esm/src/observability/mod.js +0 -11
  209. package/esm/src/observability/otel.d.ts +0 -73
  210. package/esm/src/observability/otel.d.ts.map +0 -1
  211. package/esm/src/observability/otel.js +0 -260
  212. package/esm/src/runtime/runtime.d.ts +0 -10
  213. package/esm/src/runtime/runtime.d.ts.map +0 -1
  214. package/esm/src/runtime/runtime.deno.d.ts +0 -50
  215. package/esm/src/runtime/runtime.deno.d.ts.map +0 -1
  216. package/esm/src/runtime/runtime.deno.js +0 -120
  217. package/esm/src/runtime/runtime.js +0 -41
  218. package/esm/src/runtime/runtime.node.d.ts +0 -51
  219. package/esm/src/runtime/runtime.node.d.ts.map +0 -1
  220. package/esm/src/runtime/runtime.node.js +0 -268
  221. package/esm/src/runtime/types.d.ts +0 -107
  222. package/esm/src/runtime/types.d.ts.map +0 -1
  223. package/esm/src/runtime/types.js +0 -12
  224. package/esm/src/security/channel-hmac.d.ts +0 -43
  225. package/esm/src/security/channel-hmac.d.ts.map +0 -1
  226. package/esm/src/security/channel-hmac.js +0 -135
  227. package/esm/src/security/csp.d.ts +0 -50
  228. package/esm/src/security/csp.d.ts.map +0 -1
  229. package/esm/src/security/csp.js +0 -63
  230. package/esm/src/security/message-signer.d.ts +0 -88
  231. package/esm/src/security/message-signer.d.ts.map +0 -1
  232. package/esm/src/security/message-signer.js +0 -166
  233. package/esm/src/subscriptions/subscription-registry.d.ts +0 -256
  234. package/esm/src/subscriptions/subscription-registry.d.ts.map +0 -1
  235. package/esm/src/subscriptions/subscription-registry.js +0 -406
  236. package/esm/src/tasks/mod.d.ts +0 -13
  237. package/esm/src/tasks/mod.d.ts.map +0 -1
  238. package/esm/src/tasks/mod.js +0 -11
  239. package/esm/src/tasks/task-store.d.ts +0 -342
  240. package/esm/src/tasks/task-store.d.ts.map +0 -1
  241. package/esm/src/tasks/task-store.js +0 -649
  242. package/esm/src/transport/request-headers.d.ts +0 -145
  243. package/esm/src/transport/request-headers.d.ts.map +0 -1
  244. package/esm/src/transport/request-headers.js +0 -525
  245. package/esm/src/types.d.ts +0 -776
  246. package/esm/src/types.d.ts.map +0 -1
  247. package/esm/src/types.js +0 -92
  248. package/esm/src/ui/viewer-utils.d.ts +0 -45
  249. package/esm/src/ui/viewer-utils.d.ts.map +0 -1
  250. package/esm/src/ui/viewer-utils.js +0 -97
  251. package/esm/src/validation/schema-validator.d.ts +0 -115
  252. package/esm/src/validation/schema-validator.d.ts.map +0 -1
  253. package/esm/src/validation/schema-validator.js +0 -249
@@ -1,728 +0,0 @@
1
- /**
2
- * McpApp — Hono-style framework for MCP servers
3
- *
4
- * High-performance MCP server with built-in concurrency control
5
- * and backpressure.
6
- *
7
- * Wraps the official MCP server packages with middleware, auth, and
8
- * observability features.
9
- *
10
- * @module lib/server/mcp-app
11
- */
12
- import { RateLimiter } from "./concurrency/rate-limiter.js";
13
- import { SchemaValidator } from "./validation/schema-validator.js";
14
- import type { Middleware } from "./middleware/types.js";
15
- import type { FetchHandler, HttpServerOptions, McpAppOptions, McpAppsClientCapability, MCPResource, MCPTool, QueueMetrics, ResourceContent, ResourceHandler, ToolHandler } from "./types.js";
16
- import type { DiscoverViewersFS } from "./ui/viewer-utils.js";
17
- /**
18
- * McpApp provides a high-performance MCP server
19
- *
20
- * Features:
21
- * - Wraps official @modelcontextprotocol/sdk
22
- * - Concurrency limiting (default: 10 max concurrent)
23
- * - Multiple backpressure strategies (sleep/queue/reject)
24
- * - Metrics for monitoring
25
- * - Graceful shutdown
26
- *
27
- * @example
28
- * ```typescript
29
- * const server = new McpApp({
30
- * name: "my-server",
31
- * version: "1.0.0",
32
- * maxConcurrent: 5,
33
- * backpressureStrategy: 'queue'
34
- * });
35
- *
36
- * server.registerTools(myTools, myHandlers);
37
- * await server.start();
38
- * ```
39
- */
40
- export declare class McpApp {
41
- /**
42
- * Server name — the identifier reported to MCP clients in `InitializeResult.serverInfo.name`.
43
- *
44
- * Exposed as a public readonly field (0.16.1) so consumers can use it for
45
- * log prefixes, tracing context, or any UI that wants to echo the server
46
- * identity without having to thread `options.name` through their code.
47
- * Immutable after construction, same value that appears in the MCP
48
- * `initialize` response.
49
- */
50
- readonly name: string;
51
- private requestQueue;
52
- private rateLimiter;
53
- private schemaValidator;
54
- private tools;
55
- /**
56
- * Tool name → parameters the tool asked clients to mirror into
57
- * `Mcp-Param-{Name}` headers (spec 2026-07-28, `x-mcp-header`).
58
- *
59
- * Populated at registration so the per-request path is a map lookup rather
60
- * than a schema walk. Tools without annotations are simply absent.
61
- */
62
- private mirroredParams;
63
- /**
64
- * Task store for the Tasks extension, or `null` when the consumer did not
65
- * declare it.
66
- *
67
- * Created only on declaration: a server not using Tasks should not pay for a
68
- * sweep timer, and a `tasks/*` call against it must read as the unimplemented
69
- * method it is (404 + -32601) rather than hitting an empty store.
70
- */
71
- private taskStore;
72
- /**
73
- * Set synchronously at the top of `stop()`.
74
- *
75
- * Checked before spawning a task, because the pipeline is async: a handler that
76
- * settles during shutdown would otherwise start work in a store already drained,
77
- * producing a task that outlives its server. A synchronous flag is what makes
78
- * the check reliable — anything awaited leaves the same window open.
79
- */
80
- private stopping;
81
- /**
82
- * Live `subscriptions/listen` streams.
83
- *
84
- * Initialized unconditionally in startHttp(); null before the server starts
85
- * or in stdio mode.
86
- */
87
- private subscriptions;
88
- /** Era-aware stdio serving handle, present only while start() is active. */
89
- private stdioHandle;
90
- /** Protocol instance pinned by the stdio era negotiator, when connected. */
91
- private activeStdioServer;
92
- /**
93
- * Imported HMAC key for sealing `requestState`, or `null` when the deployment
94
- * configured none.
95
- *
96
- * Resolved lazily on first use rather than in the constructor, because
97
- * `importStateKey` is async and a constructor cannot await.
98
- */
99
- /**
100
- * In-flight or resolved key import.
101
- *
102
- * A Promise, not a value plus a loaded flag: the flag was set before the await,
103
- * so a second request arriving during the import saw "loaded" with the key
104
- * still null, received an UNSIGNED requestState, and could then submit raw
105
- * inputResponses past the verification guard. Memoising the Promise makes every
106
- * caller await the same import.
107
- */
108
- private mrtrKeyPromise;
109
- /**
110
- * Consumes a verified requestState nonce before the handler runs.
111
- *
112
- * A signed deployment always has a store: process-local by default, or the
113
- * shared atomic implementation supplied by the consumer.
114
- */
115
- private readonly mrtrReplayStore;
116
- /**
117
- * Validated `ttlMs`. The spec requires servers to provide a value `>= 0`, and
118
- * an integer — clients are told to ignore a negative one, which would make a
119
- * misconfiguration silently do nothing instead of failing.
120
- *
121
- * Resolved once at construction: a per-response check would pay for the same
122
- * validation on every list call, and a bad value is a deployment error that
123
- * should surface at startup (AX: fast fail early).
124
- */
125
- private readonly cacheTtlMs;
126
- private resources;
127
- private options;
128
- private started;
129
- private resourceHandlersInstalled;
130
- private customMiddlewares;
131
- private middlewareRunner;
132
- private authProvider;
133
- private serverMetrics;
134
- constructor(options: McpAppOptions);
135
- /** Build one unconnected SDK server for one negotiated stdio era. */
136
- private createProtocolServer;
137
- /**
138
- * Pre-install the resources handlers on the low-level
139
- * SDK Server. This declares the `resources` capability BEFORE transport
140
- * connection, allowing dynamic resource registration after start().
141
- *
142
- * The handlers read from `this.resources` Map which is populated lazily
143
- * by registerResource() calls (e.g., after async MCP discovery).
144
- */
145
- private installResourceHandlers;
146
- /** Install resource handlers on one fresh protocol instance. */
147
- private installResourceHandlersOn;
148
- /**
149
- * Setup MCP protocol request handlers
150
- */
151
- private setupHandlers;
152
- /**
153
- * The stateless HTTP `server/discover` result (spec 2026-07-28, SEP-2575).
154
- *
155
- * The stdio adapter deliberately does not call this builder: the official v2
156
- * serving entry owns discover, era selection, result stamping and its final
157
- * wire shape. Keeping this method HTTP-specific prevents a custom payload
158
- * from bypassing that authority again.
159
- */
160
- private buildDiscoverResult;
161
- /**
162
- * Register tools with their handlers
163
- *
164
- * @param tools - Array of tool definitions (MCP format)
165
- * @param handlers - Map of tool name to handler function
166
- */
167
- registerTools(tools: MCPTool[], handlers: Map<string, ToolHandler>): void;
168
- /**
169
- * Register a single tool
170
- *
171
- * @param tool - Tool definition
172
- * @param handler - Tool handler function
173
- */
174
- /**
175
- * Validate and index a tool's `x-mcp-header` annotations (spec 2026-07-28).
176
- *
177
- * Every registration path must go through here. Wiring it into `registerTools`
178
- * alone was a real bypass: a tool registered via `registerTool` or
179
- * `registerToolLive` carried annotations that clients would mirror into
180
- * `Mcp-Param-*` headers, while the server never required or checked them.
181
- *
182
- * Throws *before* the caller inserts the tool, so a rejected definition cannot
183
- * leave a half-registered tool behind.
184
- */
185
- private collectToolMirroredParams;
186
- /**
187
- * Validate and atomically commit one tool definition.
188
- *
189
- * Schema compilation and mirrored-header validation happen before any public
190
- * registry state changes. Re-registering an invalid live definition therefore
191
- * leaves the previous handler, scopes, schema and header policy intact.
192
- */
193
- private commitToolRegistration;
194
- registerTool(tool: MCPTool, handler: ToolHandler): void;
195
- /**
196
- * Register a tool after the server has started (live registration).
197
- *
198
- * Unlike registerTool(), this can be called while the server is running.
199
- * The tool becomes immediately available for tools/list and tools/call.
200
- *
201
- * Use case: relay proxy where tools are registered dynamically
202
- * when remote owners connect/disconnect their tunnels.
203
- *
204
- * @param tool - Tool definition
205
- * @param handler - Tool handler function
206
- */
207
- registerToolLive(tool: MCPTool, handler: ToolHandler): void;
208
- /**
209
- * Register a tool that is only visible to the MCP App (UI layer),
210
- * not to the model via tools/list.
211
- *
212
- * Equivalent to registerTool() with _meta.ui.visibility: ["app"].
213
- * The tool is still callable via tools/call if the caller knows its name.
214
- *
215
- * @param tool - Tool definition
216
- * @param handler - Tool handler function
217
- */
218
- registerAppOnlyTool(tool: MCPTool, handler: ToolHandler): void;
219
- /**
220
- * Unregister a tool (removes it from tools/list and tools/call).
221
- *
222
- * Can be called before or after start.
223
- * In-flight calls to this tool will complete normally.
224
- *
225
- * @param toolName - Name of the tool to remove
226
- * @returns true if the tool was found and removed
227
- */
228
- unregisterTool(toolName: string): boolean;
229
- /**
230
- * Add a custom middleware to the pipeline.
231
- * Must be called before start()/startHttp().
232
- *
233
- * Custom middlewares execute between rate-limit and validation:
234
- * rate-limit → **custom middlewares** → validation → backpressure → handler
235
- *
236
- * @param middleware - Middleware function
237
- * @returns this (for chaining)
238
- *
239
- * @example
240
- * ```typescript
241
- * server.use(async (ctx, next) => {
242
- * console.log(`Calling ${ctx.toolName}`);
243
- * const result = await next();
244
- * console.log(`Done ${ctx.toolName}`);
245
- * return result;
246
- * });
247
- * ```
248
- */
249
- use(middleware: Middleware): this;
250
- /**
251
- * Build the middleware pipeline from config + custom middlewares.
252
- * Called once at start()/startHttp() time.
253
- *
254
- * Pipeline order:
255
- * rate-limit → auth → custom middlewares → scope-check → validation → backpressure → handler
256
- */
257
- private buildPipeline;
258
- /**
259
- * Execute a tool call through the middleware pipeline.
260
- * Unified entry point for both STDIO and HTTP transports.
261
- *
262
- * @param toolName - Name of the tool to call
263
- * @param args - Tool arguments
264
- * @param request - HTTP request (undefined for STDIO)
265
- * @param sessionId - HTTP session ID (undefined for STDIO)
266
- * @returns Tool execution result
267
- */
268
- private executeToolCall;
269
- /**
270
- * Apply CSP meta tag injection to HTML resource content (if configured).
271
- * Only transforms text HTML content; blob responses pass through unchanged.
272
- */
273
- private applyResourceCsp;
274
- private isTextResourceContent;
275
- /** Standard padded base64 with zero pad bits, without whitespace or URL-safe substitutions. */
276
- private isCanonicalBase64;
277
- /**
278
- * Validate an untrusted handler result at the API boundary.
279
- *
280
- * TypeScript callers get the discriminated `ResourceContent` union at compile
281
- * time. This check closes the equivalent JavaScript, `any`, and unchecked
282
- * TypeScript paths before a malformed result reaches an MCP client.
283
- */
284
- private validateResourceContent;
285
- /** Run, validate, and CSP-harden a handler for a protocol response. */
286
- private readResourceForProtocol;
287
- /** Convert public metadata into the exact wire listing shape. */
288
- private toResourceListing;
289
- /** Fail early rather than publishing a metadata value clients must ignore. */
290
- private validateResourceMetadata;
291
- /**
292
- * Resources are keyed by their wire URI, so accepting a spelling which URL
293
- * canonicalisation changes would make list/read/handler identity ambiguous.
294
- * Refuse it at registration instead of silently normalising a caller-owned
295
- * identifier. Non-`ui:` schemes are valid MCP resources and remain allowed.
296
- */
297
- private validateResourceUri;
298
- /** A consumer logger is observability, never a resource-commit dependency. */
299
- private resourceLog;
300
- /**
301
- * Publish the one post-commit list-changed projection for a mutation.
302
- * It is best-effort by design: registry state is authoritative and callers
303
- * must not receive a false failure after it changes.
304
- */
305
- private notifyResourceListChanged;
306
- /**
307
- * Register a single resource
308
- *
309
- * @param resource - Resource definition with uri, name, description
310
- * @param handler - Callback that returns ResourceContent when resource is read
311
- * @throws Error if resource with same URI already registered
312
- *
313
- * @example
314
- * ```typescript
315
- * server.registerResource(
316
- * { uri: "ui://my-server/viewer", name: "Viewer", description: "Data viewer" },
317
- * async (uri) => ({
318
- * uri: uri.toString(),
319
- * mimeType: MCP_APP_MIME_TYPE,
320
- * text: "<html>...</html>"
321
- * })
322
- * );
323
- * ```
324
- */
325
- registerResource(resource: MCPResource, handler: ResourceHandler): void;
326
- /**
327
- * Remove a resource from this server.
328
- *
329
- * It is safe before or after either transport starts once resources are
330
- * installed. Returns `false` when no such URI is present, so callers can make
331
- * idempotent cleanup calls without catching an error.
332
- */
333
- unregisterResource(uri: string): boolean;
334
- /**
335
- * Register multiple resources
336
- *
337
- * @param resources - Array of resource definitions
338
- * @param handlers - Map of URI to handler function
339
- * @throws Error if any resource is missing a handler (fail-fast)
340
- */
341
- registerResources(resources: MCPResource[], handlers: Map<string, ResourceHandler>): void;
342
- /**
343
- * Register MCP Apps viewers with automatic dist path resolution.
344
- *
345
- * Replaces the manual pattern of: enumerate viewers → resolve paths → register resources.
346
- * Each viewer gets a `ui://{prefix}/{viewerName}` resource URI.
347
- *
348
- * Viewers whose dist is not found are skipped with a warning (not an error),
349
- * so that the server can start in dev without building UIs first.
350
- *
351
- * @returns Summary of registered and skipped viewers
352
- */
353
- registerViewers(config: RegisterViewersConfig): RegisterViewersSummary;
354
- /**
355
- * Start the MCP server with stdio transport
356
- */
357
- start(): Promise<void>;
358
- /**
359
- * Restore the invariants a running server relies on.
360
- *
361
- * Called by both transports' start paths. `stop()` disposes the task store and
362
- * leaves it disposed — rebuilding it mid-teardown is what let an in-flight call
363
- * spawn into a store nobody would drain — so coming back up is where a live one
364
- * is created.
365
- */
366
- private prepareForStart;
367
- stop(): Promise<void>;
368
- private httpServer;
369
- /**
370
- * Start the MCP server with HTTP transport (Streamable HTTP compatible)
371
- *
372
- * This creates an HTTP server that handles MCP JSON-RPC requests.
373
- * Supports tools/list, tools/call, resources/list, resources/read.
374
- *
375
- * @param options - HTTP server options
376
- * @returns Server instance with shutdown method
377
- *
378
- * @example
379
- * ```typescript
380
- * const server = new McpApp({ name: "my-server", version: "1.0.0" });
381
- * server.registerTools(tools, handlers);
382
- * server.registerResource(resource, handler);
383
- *
384
- * const http = await server.startHttp({ port: 3000 });
385
- * // Server running on http://localhost:3000
386
- *
387
- * // Later: await http.shutdown();
388
- * ```
389
- */
390
- startHttp(options: HttpServerOptions): Promise<{
391
- shutdown: () => Promise<void>;
392
- addr: {
393
- hostname: string;
394
- port: number;
395
- };
396
- }>;
397
- /**
398
- * Build the HTTP middleware stack and return its fetch handler without
399
- * binding a port. Use this when you want to mount the MCP HTTP layer
400
- * inside another HTTP framework on Deno (Fresh, Hono, `Deno.serve`) or
401
- * Node (Express, Hono-on-Node) instead of giving up port ownership to
402
- * {@link startHttp}.
403
- *
404
- * **Runtime targets:** `@casys/mcp-server` is Deno-first — the canonical
405
- * deployment path is Deno 2.x on Deno Deploy or self-hosted Deno, with
406
- * a Node 20+ distribution via `scripts/build-node.sh` as a secondary
407
- * target. Cloudflare Workers, workerd, and browser runtimes are not
408
- * supported — if you target those, use
409
- * [`@modelcontextprotocol/server`](https://www.npmjs.com/package/@modelcontextprotocol/server)
410
- * directly instead.
411
- *
412
- * The returned handler accepts a Web Standard {@link Request} and returns
413
- * a Web Standard {@link Response}. It exposes the same routes as
414
- * {@link startHttp}: `POST /mcp`, `GET /health`, `GET /metrics`, and
415
- * `GET /.well-known/oauth-protected-resource`. `GET /mcp` returns 405.
416
- *
417
- * Auth, multi-tenant middleware, scope checks, and rate limiting are all
418
- * applied identically. OTel hooks are started, so the server is fully
419
- * live after this returns — just without its own listening socket.
420
- *
421
- * Multi-tenant SaaS pattern: cache one `McpApp` per tenant
422
- * and call `getFetchHandler()` once per server, then dispatch each
423
- * inbound request to the right cached handler from your framework's
424
- * routing layer.
425
- *
426
- * @example
427
- * ```typescript
428
- * // In a Fresh route at routes/mcp/[...path].tsx
429
- * const server = new McpApp({ name: "my-mcp", version: "1.0.0" });
430
- * server.registerTools(tools, handlers);
431
- * const handler = await server.getFetchHandler({
432
- * requireAuth: true,
433
- * auth: { provider: myAuthProvider },
434
- * });
435
- * // Later, in your route handler:
436
- * return await handler(ctx.req);
437
- * ```
438
- *
439
- * @param options - Same as {@link startHttp}, minus `port`/`hostname`/`onListen`.
440
- * @returns A Web Standard fetch handler.
441
- */
442
- getFetchHandler(options?: Omit<HttpServerOptions, "port" | "hostname" | "onListen">): Promise<FetchHandler>;
443
- /**
444
- * Read the MCP Apps capability advertised by the connected client.
445
- *
446
- * Returns the capability object (possibly empty `{}`) when the client
447
- * advertised support for MCP Apps via its `extensions` capability,
448
- * or `undefined` when:
449
- * - the client did not send capabilities yet (called before initialize)
450
- * - the client did not advertise the MCP Apps extension at all
451
- * - the client sent a malformed extension value
452
- *
453
- * Use this from a tool handler to decide whether to return a UI
454
- * resource (`_meta.ui`) or a text-only fallback. Hosts that don't
455
- * support MCP Apps will silently drop the `_meta.ui` field, but
456
- * checking explicitly lets you serve a richer text response when
457
- * the UI path isn't available.
458
- *
459
- * @returns MCP Apps capability or `undefined` if not supported.
460
- *
461
- * @example
462
- * ```typescript
463
- * const cap = app.getClientMcpAppsCapability();
464
- * if (cap?.mimeTypes?.includes(MCP_APP_MIME_TYPE)) {
465
- * return {
466
- * content: [{ type: "text", text: summary }],
467
- * _meta: { ui: { resourceUri: "ui://my-app/dashboard" } },
468
- * };
469
- * }
470
- * return { content: [{ type: "text", text: detailedTextFallback }] };
471
- * ```
472
- *
473
- * @see {@link getMcpAppsCapability} for the standalone reader
474
- * @see {@link MCP_APPS_EXTENSION_ID} for the extension key
475
- */
476
- getClientMcpAppsCapability(): McpAppsClientCapability | undefined;
477
- /**
478
- * Get queue metrics for monitoring
479
- */
480
- getMetrics(): QueueMetrics;
481
- /**
482
- * Get full server metrics (counters, histograms, gauges)
483
- */
484
- getServerMetrics(): import("./observability/metrics.js").ServerMetricsSnapshot;
485
- /**
486
- * Get Prometheus text format metrics
487
- */
488
- getPrometheusMetrics(): string;
489
- /**
490
- * Get rate limiter metrics (if rate limiting is enabled)
491
- */
492
- getRateLimitMetrics(): {
493
- keys: number;
494
- totalRequests: number;
495
- } | null;
496
- /**
497
- * Get rate limiter instance (for advanced use cases)
498
- */
499
- getRateLimiter(): RateLimiter | null;
500
- /**
501
- * Get schema validator instance (for advanced use cases)
502
- */
503
- getSchemaValidator(): SchemaValidator | null;
504
- /**
505
- * Check if server is started
506
- */
507
- isStarted(): boolean;
508
- /**
509
- * Get number of registered tools
510
- */
511
- getToolCount(): number;
512
- /**
513
- * Get tool names
514
- */
515
- getToolNames(): string[];
516
- /**
517
- * Get number of registered resources
518
- */
519
- getResourceCount(): number;
520
- /**
521
- * Get registered resource URIs
522
- */
523
- getResourceUris(): string[];
524
- /**
525
- * Check if a resource is registered
526
- */
527
- hasResource(uri: string): boolean;
528
- /**
529
- * Get resource info by URI (for testing/debugging)
530
- */
531
- getResourceInfo(uri: string): MCPResource | undefined;
532
- /**
533
- * Read resource content by URI.
534
- * Invokes the registered handler directly (no MCP protocol round-trip).
535
- * Returns null if the resource is not registered.
536
- */
537
- readResourceContent(uri: string): Promise<ResourceContent | null>;
538
- /**
539
- * Send a JSON-RPC notification to the connected transport.
540
- *
541
- * Routing depends on the transport:
542
- * - **HTTP**: fanned out to `subscriptions/listen` streams, only to
543
- * subscribers that opted into that notification type.
544
- * - **stdio**: written to stdout via the SDK transport.
545
- *
546
- * @param method - Notification method (e.g. "notifications/tools/list_changed")
547
- * @param params - Notification parameters
548
- */
549
- sendNotification(method: string, params?: Record<string, unknown>): void;
550
- /**
551
- * Register a callback for the "initialized" notification.
552
- * Called after client sends "initialized" (post-handshake).
553
- */
554
- onInitialized(callback: () => void): void;
555
- private initializedCallback;
556
- /**
557
- * Check if a handler result is a pre-formatted MCP result.
558
- * Pre-formatted results have a `content` array and are passed through
559
- * without re-wrapping. This supports proxy/gateway patterns.
560
- */
561
- private isPreformattedResult;
562
- /**
563
- * Apply the spec-2026-07-28 result envelope when — and only when — the peer
564
- * negotiated that revision.
565
- *
566
- * This helper applies on the custom stateless HTTP transport, which only
567
- * accepts 2026-07-28. Stdio results are neutral here: the official v2 codec
568
- * stamps modern responses and leaves a negotiated legacy connection clean.
569
- *
570
- * Omitting the envelope for a genuinely legacy peer is safe in the other
571
- * direction too: the spec instructs clients to read a missing `resultType` as
572
- * `"complete"`.
573
- *
574
- * Every HTTP result path funnels through here. Adding a new one without it is
575
- * the failure mode to watch for — hence the conformance test that walks the
576
- * method table rather than asserting one endpoint at a time.
577
- *
578
- * @param negotiatedVersion Version from the request's `_meta`, or `undefined`
579
- * where no per-request negotiation happens.
580
- */
581
- private stampResult;
582
- /**
583
- * Validate one MRTR retry delivered through the v2 protocol server.
584
- *
585
- * The SDK owns era-specific lifting and legacy fulfilment; Casys owns the
586
- * integrity bindings and nonce consumption of its sealed requestState.
587
- * Protocol errors deliberately escape the tool-error wrapper so clients see
588
- * a JSON-RPC error instead of a successful tools/call result with isError.
589
- */
590
- private prepareProtocolMrtrRetry;
591
- /**
592
- * Resolve the MRTR signing key once, warning if a deployment has none.
593
- *
594
- * A missing key is not an error: the spec permits unprotected `requestState`
595
- * when tampering can cause nothing worse than the request failing. It is a
596
- * loud warning because that condition is easy to believe and hard to verify.
597
- */
598
- /**
599
- * Key lookup that reports failure instead of throwing.
600
- *
601
- * The `tools/call` call sites sit outside the tool try/catch, so a throw would
602
- * reach the POST-level catch and surface as -32700 "Parse error" — the same trap
603
- * the earlier throwing principal guard fell into. Returns a ready response
604
- * instead.
605
- */
606
- private getMrtrKeySafe;
607
- private getMrtrKey;
608
- /**
609
- * Turn a handler's `InputRequiredSignal` into the wire result.
610
- *
611
- * Validates what the spec puts on the server rather than the client:
612
- * - at least one of `inputRequests` / `requestState` must be present;
613
- * - no input request may name a capability the client did not declare.
614
- *
615
- * A violation is the server author's bug, so it surfaces as `-32603` rather
616
- * than being emitted as an invalid MRTR result for the client to puzzle over.
617
- */
618
- private buildInputRequiredResult;
619
- /**
620
- * Reject a Tasks request from a client that did not declare the extension.
621
- *
622
- * Returns a ready 400 response to return, or `null` when the client is
623
- * entitled to proceed. Two distinct spec rules converge here: a server
624
- * **MUST NOT** hand a task to a non-declaring client, and **MUST** answer the
625
- * missing-capability error when one calls `tasks/*`.
626
- *
627
- * `-32021` (`MissingRequiredClientCapability`) is the code, and
628
- * `data.requiredCapabilities` is required to list what was missing — a client
629
- * that gets this back needs to know which capability to add, not just that
630
- * something was absent.
631
- */
632
- private requireTasksCapability;
633
- /**
634
- * Task status transitions, for pushing to subscribers.
635
- *
636
- * The spec's notification method is `notifications/tasks` — not a
637
- * `tasks/`-prefixed name, which would collide with the request methods.
638
- *
639
- * Delivery goes out over `subscriptions/listen` once that route is wired
640
- * (Track G); the registry exists but the transport does not yet open streams.
641
- * Until then this is intentionally a no-op beyond the log: polling via
642
- * `tasks/get` is the spec's default and works without it.
643
- */
644
- private onTaskChanged;
645
- /**
646
- * Add the required `CacheableResult` fields (spec 2026-07-28, SEP-2549).
647
- *
648
- * Applies to `tools/list`, `prompts/list`, `resources/list`, `resources/read`
649
- * and `resources/templates/list`, where the final spec makes both fields
650
- * required rather than optional. Same version gate as {@link stampResult}:
651
- * neither field exists in an earlier revision.
652
- *
653
- * Both are hints — a client that ignores them stays correct, it just polls
654
- * more often.
655
- */
656
- private withCacheHints;
657
- /**
658
- * Capabilities advertised on `server/discover` and `initialize`.
659
- *
660
- * Single source of truth: these two responses used to build the same object
661
- * independently, which is how they drift.
662
- *
663
- * `extensions` (spec 2026-07-28) is the declaration point for opt-in
664
- * extensions such as `io.modelcontextprotocol/tasks`. It is emitted only when
665
- * the consumer actually declares one — an empty `extensions: {}` would read as
666
- * "this server supports no extensions", which is a stronger claim than we can
667
- * make while MCP Apps support is de-facto (via `ui://` resources) rather than
668
- * declared. Wire it up here once the Apps extension identifier is pinned.
669
- */
670
- private buildServerCapabilities;
671
- /**
672
- * Build the tools/list response, filtering out app-only tools
673
- * and passing through outputSchema/annotations when defined.
674
- */
675
- private buildToolListing;
676
- /**
677
- * Check if a handler result is a StructuredToolResult
678
- * (has content as string + structuredContent as object).
679
- */
680
- private isStructuredToolResult;
681
- /**
682
- * Build a CallToolResult from the handler's return value.
683
- * Priority: preformatted > structuredToolResult > plain value.
684
- */
685
- private buildToolCallResult;
686
- /**
687
- * Handle a tool execution error using the configured toolErrorMapper.
688
- * Returns an isError result if the mapper handles it, otherwise rethrows.
689
- */
690
- private handleToolError;
691
- /**
692
- * Log message using custom logger or stderr
693
- */
694
- private log;
695
- }
696
- /** Configuration for registerViewers() */
697
- export interface RegisterViewersConfig {
698
- /** URI prefix — viewers get `ui://{prefix}/{viewerName}` */
699
- prefix: string;
700
- /** import.meta.url of the consumer's server.ts (for resolving dist paths) */
701
- moduleUrl: string;
702
- /** Check if a path or URL exists. Receives a filesystem path for local
703
- * modules (file://) or an HTTPS URL for remote modules (JSR, CDN). */
704
- exists: (path: string) => boolean;
705
- /** Read a file and return its content as string */
706
- readFile: (path: string) => string | Promise<string>;
707
- /** Explicit list of viewer names. If omitted, use `discover`. */
708
- viewers?: string[];
709
- /** Auto-discover viewers by scanning a directory */
710
- discover?: {
711
- uiDir: string;
712
- } & DiscoverViewersFS;
713
- /** Custom function to generate human-readable names. Default: kebab-to-Title. */
714
- humanName?: (viewerName: string) => string;
715
- /** MCP Apps CSP — declares external domains the viewer needs (tiles, APIs, CDNs).
716
- * Uses McpUiCsp from @casys/mcp-compose (resourceDomains, connectDomains). */
717
- csp?: {
718
- resourceDomains?: string[];
719
- connectDomains?: string[];
720
- frameDomains?: string[];
721
- };
722
- }
723
- /** Summary returned by registerViewers() */
724
- export interface RegisterViewersSummary {
725
- registered: string[];
726
- skipped: string[];
727
- }
728
- //# sourceMappingURL=mcp-app.d.ts.map