kavachAstro(kavach, options?) returns named route handlers { GET, POST, PATCH, DELETE, OPTIONS, ALL }. Mount them in a catch-all API page so all KavachOS paths are handled. Use individual named exports or the ALL catch-all handler.
Install
Setup
1
Create the kavach instance
2
Create the catch-all route
Create Or use the
src/pages/api/kavach/[...path].ts. The [...path] spread catches every sub-path under /api/kavach/.ALL handler to catch every HTTP method in one export:Options
MCP endpoints
Whenmcp is passed, the MCP OAuth 2.1 endpoints are available at: