I built KavachOS, an open source auth library you can self-host.
It handles human auth (14 methods, 27 OAuth providers) and also
gives AI agents their own identity with scoped permissions,
delegation chains, and audit trails.
SQLite or Postgres. Runs anywhere. MIT licensed. No SaaS required.
- MCP OAuth 2.1 (Model Context Protocol spec)
- 10 framework adapters (Next.js, Hono, Express, etc.)
- 3 runtime deps, edge-compatible
npm install kavachos
GitHub: https://github.com/kavachos/kavachos
Docs: https://docs.kavachos.com
I'm the maintainer, happy to answer questions.