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

Function mcpRoute

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

Source from the content-addressed store, hash-verified

301 * JSON-RPC 500 -32603 + CORS, rather than a bare platform 500 with no body.
302 */
303const mcpRoute = (resource: McpResource) =>
304 mcpDispatch(resource).pipe(
305 Effect.catchCause((cause) =>
306 Effect.gen(function* () {
307 const reporter = yield* McpErrorReporter;
308 yield* reporter.report(cause);
309 return fromWebResponse(jsonRpcResponse(500, -32603, "Internal server error"));
310 }),
311 ),
312 );
313
314const toolkitMcpRoute = Effect.gen(function* () {
315 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