| 415 | // cfworker validator does not use code generation and works in every |
| 416 | // runtime we ship to. |
| 417 | const createClient = (sdk: McpClientSdk, versionNegotiation?: { readonly mode: "auto" }): Client => |
| 418 | new sdk.client.Client( |
| 419 | { name: "executor-mcp", version: "0.1.0" }, |
| 420 | { |
| 421 | capabilities: { elicitation: { form: {}, url: {} } }, |
| 422 | jsonSchemaValidator: new sdk.validators.CfWorkerJsonSchemaValidator(), |
| 423 | ...(versionNegotiation === undefined ? {} : { versionNegotiation }), |
| 424 | }, |
| 425 | ); |
| 426 | |
| 427 | const connectionFromClient = (client: Client): McpConnection => ({ |
| 428 | client, |