Skip to main content
kavachExpress(kavach, options?) returns an Express Router with all KavachOS routes pre-mounted. Use app.use to attach it at your chosen path.

Install

Setup

1

Create the kavach instance

2

Mount the adapter

Call express.json() and express.urlencoded() before mounting the adapter. The adapter reads req.body which requires those parsers to be in place.

MCP endpoints

Pass mcp to enable the MCP OAuth 2.1 authorization server. All MCP endpoints are registered on the same router alongside the REST API:

Endpoint reference

Full example

Last modified on April 29, 2026