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

Function mcpRoute

packages/hosts/mcp/src/envelope.ts:405–414  ·  view source on GitHub ↗
(resource: McpResource)

Source from the content-addressed store, hash-verified

403 * JSON-RPC 500 -32603 + CORS, rather than a bare platform 500 with no body.
404 */
405const mcpRoute = (resource: McpResource) =>
406 mcpDispatch(resource).pipe(
407 Effect.catchCause((cause) =>
408 Effect.gen(function* () {
409 const reporter = yield* McpErrorReporter;
410 yield* reporter.report(cause);
411 return fromWebResponse(jsonRpcResponse(500, -32603, "Internal server error"));
412 }),
413 ),
414 );
415
416const toolkitMcpRoute = Effect.gen(function* () {
417 const params = yield* HttpRouter.params;

Callers 1

envelope.tsFile · 0.85

Calls 3

mcpDispatchFunction · 0.85
fromWebResponseFunction · 0.85
jsonRpcResponseFunction · 0.70

Tested by

no test coverage detected