@kya-os/mcp 1.2.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.
Files changed (182) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/LICENSE +21 -0
  3. package/README.md +135 -0
  4. package/dist/auth/handshake.d.ts +119 -0
  5. package/dist/auth/handshake.d.ts.map +1 -0
  6. package/dist/auth/handshake.js +267 -0
  7. package/dist/auth/handshake.js.map +1 -0
  8. package/dist/auth/index.d.ts +3 -0
  9. package/dist/auth/index.d.ts.map +1 -0
  10. package/dist/auth/index.js +2 -0
  11. package/dist/auth/index.js.map +1 -0
  12. package/dist/auth/types.d.ts +31 -0
  13. package/dist/auth/types.d.ts.map +1 -0
  14. package/dist/auth/types.js +7 -0
  15. package/dist/auth/types.js.map +1 -0
  16. package/dist/delegation/audience-validator.d.ts +9 -0
  17. package/dist/delegation/audience-validator.d.ts.map +1 -0
  18. package/dist/delegation/audience-validator.js +17 -0
  19. package/dist/delegation/audience-validator.js.map +1 -0
  20. package/dist/delegation/bitstring.d.ts +37 -0
  21. package/dist/delegation/bitstring.d.ts.map +1 -0
  22. package/dist/delegation/bitstring.js +117 -0
  23. package/dist/delegation/bitstring.js.map +1 -0
  24. package/dist/delegation/cascading-revocation.d.ts +45 -0
  25. package/dist/delegation/cascading-revocation.d.ts.map +1 -0
  26. package/dist/delegation/cascading-revocation.js +150 -0
  27. package/dist/delegation/cascading-revocation.js.map +1 -0
  28. package/dist/delegation/delegation-graph.d.ts +49 -0
  29. package/dist/delegation/delegation-graph.d.ts.map +1 -0
  30. package/dist/delegation/delegation-graph.js +99 -0
  31. package/dist/delegation/delegation-graph.js.map +1 -0
  32. package/dist/delegation/did-key-resolver.d.ts +64 -0
  33. package/dist/delegation/did-key-resolver.d.ts.map +1 -0
  34. package/dist/delegation/did-key-resolver.js +157 -0
  35. package/dist/delegation/did-key-resolver.js.map +1 -0
  36. package/dist/delegation/did-web-resolver.d.ts +83 -0
  37. package/dist/delegation/did-web-resolver.d.ts.map +1 -0
  38. package/dist/delegation/did-web-resolver.js +218 -0
  39. package/dist/delegation/did-web-resolver.js.map +1 -0
  40. package/dist/delegation/index.d.ts +21 -0
  41. package/dist/delegation/index.d.ts.map +1 -0
  42. package/dist/delegation/index.js +21 -0
  43. package/dist/delegation/index.js.map +1 -0
  44. package/dist/delegation/outbound-headers.d.ts +79 -0
  45. package/dist/delegation/outbound-headers.d.ts.map +1 -0
  46. package/dist/delegation/outbound-headers.js +138 -0
  47. package/dist/delegation/outbound-headers.js.map +1 -0
  48. package/dist/delegation/outbound-proof.d.ts +43 -0
  49. package/dist/delegation/outbound-proof.d.ts.map +1 -0
  50. package/dist/delegation/outbound-proof.js +52 -0
  51. package/dist/delegation/outbound-proof.js.map +1 -0
  52. package/dist/delegation/statuslist-manager.d.ts +47 -0
  53. package/dist/delegation/statuslist-manager.d.ts.map +1 -0
  54. package/dist/delegation/statuslist-manager.js +139 -0
  55. package/dist/delegation/statuslist-manager.js.map +1 -0
  56. package/dist/delegation/storage/memory-graph-storage.d.ts +70 -0
  57. package/dist/delegation/storage/memory-graph-storage.d.ts.map +1 -0
  58. package/dist/delegation/storage/memory-graph-storage.js +145 -0
  59. package/dist/delegation/storage/memory-graph-storage.js.map +1 -0
  60. package/dist/delegation/storage/memory-statuslist-storage.d.ts +19 -0
  61. package/dist/delegation/storage/memory-statuslist-storage.d.ts.map +1 -0
  62. package/dist/delegation/storage/memory-statuslist-storage.js +33 -0
  63. package/dist/delegation/storage/memory-statuslist-storage.js.map +1 -0
  64. package/dist/delegation/utils.d.ts +49 -0
  65. package/dist/delegation/utils.d.ts.map +1 -0
  66. package/dist/delegation/utils.js +131 -0
  67. package/dist/delegation/utils.js.map +1 -0
  68. package/dist/delegation/vc-issuer.d.ts +56 -0
  69. package/dist/delegation/vc-issuer.d.ts.map +1 -0
  70. package/dist/delegation/vc-issuer.js +80 -0
  71. package/dist/delegation/vc-issuer.js.map +1 -0
  72. package/dist/delegation/vc-verifier.d.ts +112 -0
  73. package/dist/delegation/vc-verifier.d.ts.map +1 -0
  74. package/dist/delegation/vc-verifier.js +280 -0
  75. package/dist/delegation/vc-verifier.js.map +1 -0
  76. package/dist/errors.d.ts +42 -0
  77. package/dist/errors.d.ts.map +1 -0
  78. package/dist/errors.js +45 -0
  79. package/dist/errors.js.map +1 -0
  80. package/dist/index.d.ts +47 -0
  81. package/dist/index.d.ts.map +1 -0
  82. package/dist/index.js +56 -0
  83. package/dist/index.js.map +1 -0
  84. package/dist/logging/index.d.ts +2 -0
  85. package/dist/logging/index.d.ts.map +1 -0
  86. package/dist/logging/index.js +2 -0
  87. package/dist/logging/index.js.map +1 -0
  88. package/dist/logging/logger.d.ts +23 -0
  89. package/dist/logging/logger.d.ts.map +1 -0
  90. package/dist/logging/logger.js +82 -0
  91. package/dist/logging/logger.js.map +1 -0
  92. package/dist/middleware/index.d.ts +12 -0
  93. package/dist/middleware/index.d.ts.map +1 -0
  94. package/dist/middleware/index.js +12 -0
  95. package/dist/middleware/index.js.map +1 -0
  96. package/dist/middleware/mcpi-transport.d.ts +39 -0
  97. package/dist/middleware/mcpi-transport.d.ts.map +1 -0
  98. package/dist/middleware/mcpi-transport.js +121 -0
  99. package/dist/middleware/mcpi-transport.js.map +1 -0
  100. package/dist/middleware/with-mcpi-server.d.ts +78 -0
  101. package/dist/middleware/with-mcpi-server.d.ts.map +1 -0
  102. package/dist/middleware/with-mcpi-server.js +109 -0
  103. package/dist/middleware/with-mcpi-server.js.map +1 -0
  104. package/dist/middleware/with-mcpi.d.ts +202 -0
  105. package/dist/middleware/with-mcpi.d.ts.map +1 -0
  106. package/dist/middleware/with-mcpi.js +625 -0
  107. package/dist/middleware/with-mcpi.js.map +1 -0
  108. package/dist/proof/errors.d.ts +49 -0
  109. package/dist/proof/errors.d.ts.map +1 -0
  110. package/dist/proof/errors.js +61 -0
  111. package/dist/proof/errors.js.map +1 -0
  112. package/dist/proof/generator.d.ts +65 -0
  113. package/dist/proof/generator.d.ts.map +1 -0
  114. package/dist/proof/generator.js +163 -0
  115. package/dist/proof/generator.js.map +1 -0
  116. package/dist/proof/index.d.ts +4 -0
  117. package/dist/proof/index.d.ts.map +1 -0
  118. package/dist/proof/index.js +4 -0
  119. package/dist/proof/index.js.map +1 -0
  120. package/dist/proof/verifier.d.ts +108 -0
  121. package/dist/proof/verifier.d.ts.map +1 -0
  122. package/dist/proof/verifier.js +299 -0
  123. package/dist/proof/verifier.js.map +1 -0
  124. package/dist/providers/base.d.ts +64 -0
  125. package/dist/providers/base.d.ts.map +1 -0
  126. package/dist/providers/base.js +19 -0
  127. package/dist/providers/base.js.map +1 -0
  128. package/dist/providers/index.d.ts +4 -0
  129. package/dist/providers/index.d.ts.map +1 -0
  130. package/dist/providers/index.js +4 -0
  131. package/dist/providers/index.js.map +1 -0
  132. package/dist/providers/memory.d.ts +33 -0
  133. package/dist/providers/memory.d.ts.map +1 -0
  134. package/dist/providers/memory.js +102 -0
  135. package/dist/providers/memory.js.map +1 -0
  136. package/dist/providers/node-crypto.d.ts +26 -0
  137. package/dist/providers/node-crypto.d.ts.map +1 -0
  138. package/dist/providers/node-crypto.js +69 -0
  139. package/dist/providers/node-crypto.js.map +1 -0
  140. package/dist/session/index.d.ts +2 -0
  141. package/dist/session/index.d.ts.map +1 -0
  142. package/dist/session/index.js +2 -0
  143. package/dist/session/index.js.map +1 -0
  144. package/dist/session/manager.d.ts +83 -0
  145. package/dist/session/manager.d.ts.map +1 -0
  146. package/dist/session/manager.js +267 -0
  147. package/dist/session/manager.js.map +1 -0
  148. package/dist/types/protocol.d.ts +320 -0
  149. package/dist/types/protocol.d.ts.map +1 -0
  150. package/dist/types/protocol.js +229 -0
  151. package/dist/types/protocol.js.map +1 -0
  152. package/dist/utils/base58.d.ts +31 -0
  153. package/dist/utils/base58.d.ts.map +1 -0
  154. package/dist/utils/base58.js +104 -0
  155. package/dist/utils/base58.js.map +1 -0
  156. package/dist/utils/base64.d.ts +13 -0
  157. package/dist/utils/base64.d.ts.map +1 -0
  158. package/dist/utils/base64.js +99 -0
  159. package/dist/utils/base64.js.map +1 -0
  160. package/dist/utils/crypto-service.d.ts +37 -0
  161. package/dist/utils/crypto-service.d.ts.map +1 -0
  162. package/dist/utils/crypto-service.js +154 -0
  163. package/dist/utils/crypto-service.js.map +1 -0
  164. package/dist/utils/did-helpers.d.ts +168 -0
  165. package/dist/utils/did-helpers.d.ts.map +1 -0
  166. package/dist/utils/did-helpers.js +211 -0
  167. package/dist/utils/did-helpers.js.map +1 -0
  168. package/dist/utils/ed25519-constants.d.ts +18 -0
  169. package/dist/utils/ed25519-constants.d.ts.map +1 -0
  170. package/dist/utils/ed25519-constants.js +21 -0
  171. package/dist/utils/ed25519-constants.js.map +1 -0
  172. package/dist/utils/index.d.ts +5 -0
  173. package/dist/utils/index.d.ts.map +1 -0
  174. package/dist/utils/index.js +5 -0
  175. package/dist/utils/index.js.map +1 -0
  176. package/package.json +115 -0
  177. package/schemas/README.md +117 -0
  178. package/schemas/delegation-credential.json +312 -0
  179. package/schemas/detached-proof.json +97 -0
  180. package/schemas/handshake-request.json +84 -0
  181. package/schemas/handshake-response.json +67 -0
  182. package/schemas/well-known-mcpi.json +176 -0
@@ -0,0 +1,202 @@
1
+ /**
2
+ * MCP-I Middleware — Core Implementation
3
+ *
4
+ * Adds identity, session management, and proof generation to MCP servers.
5
+ *
6
+ * For most use cases, prefer the high-level `withMCPI()` adapter from
7
+ * `./with-mcpi-server.ts` which (by default) auto-registers the handshake
8
+ * tool and auto-attaches proofs to all tool responses:
9
+ *
10
+ * import { withMCPI } from '@kya-os/mcp';
11
+ * await withMCPI(server, { crypto: new NodeCryptoProvider() });
12
+ *
13
+ * `createMCPIMiddleware()` in this file is the lower-level API used
14
+ * internally by `withMCPI()` and for advanced use cases like the
15
+ * low-level `Server` API or custom request handler patterns.
16
+ */
17
+ import { type CryptoProvider, FetchProvider } from "../providers/base.js";
18
+ import { SessionManager, type SessionConfig } from "../session/manager.js";
19
+ import { ProofGenerator } from "../proof/generator.js";
20
+ import { type DIDResolver, type StatusListResolver } from "../delegation/vc-verifier.js";
21
+ import { type DelegationCredential } from "../types/protocol.js";
22
+ export interface MCPIIdentityConfig {
23
+ did: string;
24
+ kid: string;
25
+ privateKey: string;
26
+ publicKey: string;
27
+ agentName?: string;
28
+ }
29
+ export declare const MCPI_ACTIONS: readonly ["handshake", "identity", "reputation"];
30
+ export interface MCPIDelegationConfig {
31
+ /**
32
+ * Optional custom DID resolver. If it returns null, middleware falls back to
33
+ * built-in did:key resolution and fetch-backed did:web resolution.
34
+ */
35
+ didResolver?: DIDResolver;
36
+ /**
37
+ * Optional fetch provider used for did:web resolution.
38
+ * If omitted, middleware falls back to the runtime global fetch when available.
39
+ */
40
+ fetchProvider?: FetchProvider;
41
+ /**
42
+ * Resolver for StatusList2021 checks. Credentials with credentialStatus are
43
+ * rejected when no resolver is configured.
44
+ */
45
+ statusListResolver?: StatusListResolver;
46
+ /**
47
+ * Resolve ancestor credentials for a delegated chain. The returned array may
48
+ * contain only ancestors (root -> parent) or the full chain (root -> leaf).
49
+ */
50
+ resolveDelegationChain?: (leafCredential: DelegationCredential) => Promise<DelegationCredential[]>;
51
+ /**
52
+ * When true, re-delegations (credentials with a `parentId`) MUST include
53
+ * an `audience` constraint binding them to the verifying server's DID.
54
+ *
55
+ * This prevents confused-deputy attacks where a delegated credential is
56
+ * forwarded to an unintended server. Without audience binding, any server
57
+ * that receives the credential will accept it.
58
+ *
59
+ * Recommended for production. See: Alan Karp's transitive access analysis
60
+ * and MCP-I §11.6 (Confused Deputy Attacks).
61
+ *
62
+ * Default is false for backward compatibility.
63
+ */
64
+ requireAudienceOnRedelegation?: boolean;
65
+ /**
66
+ * Compatibility mode for legacy integrations that cannot yet provide
67
+ * full delegation-chain and status-list resolvers.
68
+ *
69
+ * WARNING: Enabling this weakens verification guarantees:
70
+ * - Parent-linked delegations are accepted without chain resolution
71
+ * - credentialStatus is accepted without StatusList checks
72
+ *
73
+ * Default is false (strict security behavior).
74
+ */
75
+ allowLegacyUnsafeDelegation?: boolean;
76
+ }
77
+ export interface MCPIConfig {
78
+ /** Agent identity (DID + key material) */
79
+ identity: MCPIIdentityConfig;
80
+ /** Session configuration overrides */
81
+ session?: Omit<SessionConfig, "nonceCache">;
82
+ /** Delegation verification overrides */
83
+ delegation?: MCPIDelegationConfig;
84
+ /**
85
+ * When true, automatically creates a session on the first tool call
86
+ * if no session exists. Useful for demos and development where
87
+ * MCP clients don't support the `_mcpi` handshake flow.
88
+ * In production, MCP-I-aware runtimes should execute handshake before tool calls.
89
+ */
90
+ autoSession?: boolean;
91
+ }
92
+ export interface MCPIToolDefinition {
93
+ name: string;
94
+ description?: string;
95
+ inputSchema: {
96
+ type: "object";
97
+ properties?: Record<string, unknown>;
98
+ required?: string[];
99
+ [key: string]: unknown;
100
+ };
101
+ }
102
+ export interface MCPIToolHandler<T extends Record<string, unknown> = Record<string, unknown>> {
103
+ (args: T, sessionId?: string): Promise<{
104
+ content: Array<{
105
+ type: string;
106
+ text: string;
107
+ [key: string]: unknown;
108
+ }>;
109
+ isError?: boolean;
110
+ [key: string]: unknown;
111
+ }>;
112
+ }
113
+ /**
114
+ * Server interface — minimal subset of @modelcontextprotocol/sdk Server.
115
+ * This avoids a hard dependency on the SDK at the type level.
116
+ */
117
+ export interface MCPIServer {
118
+ setRequestHandler(schema: unknown, handler: (...args: unknown[]) => unknown): void;
119
+ }
120
+ export interface MCPIMiddleware {
121
+ /** The identity config used by this middleware instance */
122
+ identity: MCPIIdentityConfig;
123
+ /** The SessionManager instance for manual session operations */
124
+ sessionManager: SessionManager;
125
+ /** The ProofGenerator instance for manual proof operations */
126
+ proofGenerator: ProofGenerator;
127
+ /**
128
+ * Unified tool definition for `_mcpi`.
129
+ * Include this in your ListToolsRequest handler's tool list.
130
+ */
131
+ mcpiTool: MCPIToolDefinition;
132
+ /**
133
+ * @deprecated Use `mcpiTool` (`_mcpi` with `action: "handshake"`).
134
+ * Tool definition for `_mcpi_handshake`.
135
+ * Include this in your ListToolsRequest handler's tool list.
136
+ */
137
+ handshakeTool: MCPIToolDefinition;
138
+ /**
139
+ * Handle a unified `_mcpi` action. Use this in your CallToolRequest handler
140
+ * when `request.params.name === '_mcpi'`.
141
+ */
142
+ handleMCPI(args: Record<string, unknown>): Promise<{
143
+ content: Array<{
144
+ type: string;
145
+ text: string;
146
+ }>;
147
+ isError?: boolean;
148
+ }>;
149
+ /**
150
+ * @deprecated Use `handleMCPI` with `action: "handshake"`.
151
+ * Handle a handshake call. Use this in your CallToolRequest handler
152
+ * when `request.params.name === '_mcpi_handshake'`.
153
+ */
154
+ handleHandshake(args: Record<string, unknown>): Promise<{
155
+ content: Array<{
156
+ type: string;
157
+ text: string;
158
+ }>;
159
+ isError?: boolean;
160
+ }>;
161
+ /**
162
+ * Wrap a tool handler to automatically generate proofs.
163
+ * Returns a new handler that appends proof metadata to the response.
164
+ */
165
+ wrapWithProof<T extends Record<string, unknown> = Record<string, unknown>>(toolName: string, handler: MCPIToolHandler<T>): MCPIToolHandler;
166
+ /**
167
+ * Wrap a tool handler to require a valid W3C Delegation Credential.
168
+ *
169
+ * Caller must pass the VC as `_mcpi_delegation` in the tool args.
170
+ * - If absent: returns a `needs_authorization` response with the consentUrl.
171
+ * - If present but invalid: returns a structured error with reason.
172
+ * - If valid with correct scope: strips `_mcpi_delegation` and calls the handler.
173
+ */
174
+ wrapWithDelegation(toolName: string, config: {
175
+ scopeId: string;
176
+ consentUrl: string;
177
+ }, handler: MCPIToolHandler): MCPIToolHandler;
178
+ }
179
+ /**
180
+ * Create MCP-I middleware for a standard MCP SDK Server.
181
+ *
182
+ * For most use cases, prefer {@link withMCPI} from `./with-mcpi-server.ts`
183
+ * which wraps this function and (by default) auto-registers handshake +
184
+ * auto-attaches proofs.
185
+ *
186
+ * Use `createMCPIMiddleware` directly when:
187
+ * - You use the low-level `Server` API (not `McpServer`)
188
+ * - You need custom request handler patterns
189
+ * - You want per-tool control over proof/delegation wrapping
190
+ *
191
+ * @param config - Agent identity and session configuration
192
+ * @param cryptoProvider - Platform-specific crypto implementation
193
+ * @returns Middleware components for session management and proof generation
194
+ *
195
+ * @remarks
196
+ * **Single-process only**: This middleware stores session state in memory using closure
197
+ * variables (`activeSessionId`, `sessionNonces`). It is NOT suitable for multi-instance
198
+ * deployments behind a load balancer. For distributed deployments, implement a custom
199
+ * `SessionStore` backed by Redis, DynamoDB, or similar and pass it via `config.session`.
200
+ */
201
+ export declare function createMCPIMiddleware(config: MCPIConfig, cryptoProvider: CryptoProvider): MCPIMiddleware;
202
+ //# sourceMappingURL=with-mcpi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-mcpi.d.ts","sourceRoot":"","sources":["../../src/middleware/with-mcpi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,KAAK,cAAc,EACnB,aAAa,EACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,cAAc,EACd,KAAK,aAAa,EAEnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,cAAc,EAIf,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAEL,KAAK,WAAW,EAEhB,KAAK,kBAAkB,EACxB,MAAM,8BAA8B,CAAC;AAItC,OAAO,EAGL,KAAK,oBAAoB,EAE1B,MAAM,sBAAsB,CAAC;AAM9B,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,kDAAmD,CAAC;AAG7E,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;OAGG;IACH,kBAAkB,CAAC,EAAE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