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

Function mcpRoute

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

Source from the content-addressed store, hash-verified

281 * JSON-RPC 500 -32603 + CORS, rather than a bare platform 500 with no body.
282 */
283const mcpRoute = (resource: McpResource) =>
284 mcpDispatch(resource).pipe(
285 Effect.catchCause((cause) =>
286 Effect.gen(function* () {
287 const reporter = yield* McpErrorReporter;
288 yield* reporter.report(cause);
289 return fromWebResponse(jsonRpcResponse(500, -32603, "Internal server error"));
290 }),
291 ),
292 );
293
294const toolkitMcpRoute = Effect.gen(function* () {
295 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