MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / modernRequest

Function modernRequest

packages/hosts/mcp/src/envelope.test.ts:359–378  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

357});
358
359const 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
380it("dispatches toolkit MCP routes with the parsed toolkit resource", async () => {
381 const seen = await Effect.runPromise(Ref.make<McpResource | null>(null));

Callers 1

envelope.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected