handleMcpRequest
Handle an incoming MCP JSON-RPC 2.0 request. This method is called automatically
by the /mcp endpoint when enableMcpServer() is active. It
supports the initialize, notifications/initialized, tools/list, tools/call,
and ping methods.
You typically do not need to call this directly — it is invoked by the Hono route handler.
Parameters
body
The parsed JSON-RPC 2.0 request body, containing jsonrpc, method, params,
and id fields.
Returns
Promise<Record<string, unknown>> — The JSON-RPC 2.0 response object.