Use cases
Pick the problem you have.
Each page below starts from a concrete job, explains the path through theAuth, and ends in code checked against the package source. Start with the one closest to what you are building.
Guides
- Add auth to an MCP serverYour MCP server needs OAuth 2.1 with discovery, so clients you have never met can register and log in.
- Identity and permissions for AI agentsAgents act for people. You need to know which agent did what, who owns it, and how to stop it.
- Auth for B2B SaaS with organizationsA company customer wants SSO, SCIM and a clear answer on tenant data before it signs.
- Auth for AI startupsYou want auth working today, without a per-user bill and without a rewrite when enterprise asks.
How these are written
Source first, docs second.
The snippets are checked against the package source and types, not copied from marketing pages. Where the published docs and the source disagree, the guides follow the source and say so.
Something here does not match what you see in your version? Open a thread in GitHub Discussions. For the full reference, the docs cover every module.
Get started
Give your first agent an identity.
Install the package, create an agent with scoped permissions, and read its first audit record. The core runs on Postgres, SQLite, MySQL or D1, and the Go module needs a single go get.
npm install @glinr/theauthgo get github.com/glincker/theauth-go