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

Function mcpRoute

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

Source from the content-addressed store, hash-verified

267 * JSON-RPC 500 -32603 + CORS, rather than a bare platform 500 with no body.
268 */
269const mcpRoute = (resource: McpResource) =>
270 mcpDispatch(resource).pipe(
271 Effect.catchCause((cause) =>
272 Effect.gen(function* () {
273 const reporter = yield* McpErrorReporter;
274 yield* reporter.report(cause);
275 return HttpServerResponse.raw(jsonRpcResponse(500, -32603, "Internal server error"));
276 }),
277 ),
278 );
279
280const toolkitMcpRoute = Effect.gen(function* () {
281 const params = yield* HttpRouter.params;

Callers 1

envelope.tsFile · 0.85

Calls 2

mcpDispatchFunction · 0.85
jsonRpcResponseFunction · 0.70

Tested by

no test coverage detected