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

Function mcpRoute

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

Source from the content-addressed store, hash-verified

245 * JSON-RPC 500 -32603 + CORS, rather than a bare platform 500 with no body.
246 */
247const mcpRoute = (resource: McpResource) =>
248 mcpDispatch(resource).pipe(
249 Effect.catchCause((cause) =>
250 Effect.gen(function* () {
251 const reporter = yield* McpErrorReporter;
252 yield* reporter.report(cause);
253 return HttpServerResponse.raw(jsonRpcResponse(500, -32603, "Internal server error"));
254 }),
255 ),
256 );
257
258const toolkitMcpRoute = Effect.gen(function* () {
259 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