| 357 | }); |
| 358 | |
| 359 | const modernRequest = (url: string): Request => |
| 360 | new Request(url, { |
| 361 | method: "POST", |
| 362 | headers: { |
| 363 | "content-type": "application/json", |
| 364 | "mcp-protocol-version": "2026-07-28", |
| 365 | "mcp-method": "server/discover", |
| 366 | }, |
| 367 | body: JSON.stringify({ |
| 368 | jsonrpc: "2.0", |
| 369 | id: 1, |
| 370 | method: "server/discover", |
| 371 | params: { |
| 372 | _meta: { |
| 373 | "io.modelcontextprotocol/protocolVersion": "2026-07-28", |
| 374 | "io.modelcontextprotocol/clientCapabilities": {}, |
| 375 | }, |
| 376 | }, |
| 377 | }), |
| 378 | }); |
| 379 | |
| 380 | it("dispatches toolkit MCP routes with the parsed toolkit resource", async () => { |
| 381 | const seen = await Effect.runPromise(Ref.make<McpResource | null>(null)); |