An additional Express route to mount on the HTTP server alongside the MCP endpoint. Useful for health checks, webhooks, or any non-MCP HTTP traffic that should share the same process.
const healthRoute: ExpressRoute = { path: '/health', method: 'GET', handler: async (_req, res) => { res.json({ ok: true }) },} Copy
const healthRoute: ExpressRoute = { path: '/health', method: 'GET', handler: async (_req, res) => { res.json({ ok: true }) },}
Readonly
Async Express request handler.
HTTP method for the route.
URL path for the route (e.g. '/health').
'/health'
An additional Express route to mount on the HTTP server alongside the MCP endpoint. Useful for health checks, webhooks, or any non-MCP HTTP traffic that should share the same process.
Example