---
title: "theAuth use cases: MCP servers, agents, SaaS"
description: "Four problems and the code path for each: OAuth 2.1 for an MCP server, identity for AI agents, B2B SaaS with SSO, and auth for AI startups."
canonical: https://theauth.dev/use-cases/
lastmod: 2026-10-31
---

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

1. [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.](https://theauth.dev/use-cases/mcp-servers/)
2. [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.](https://theauth.dev/use-cases/ai-agents/)
3. [Auth for B2B SaaS with organizationsA company customer wants SSO, SCIM and a clear answer on tenant data before it signs.](https://theauth.dev/use-cases/saas/)
4. [Auth for AI startupsYou want auth working today, without a per-user bill and without a rewrite when enterprise asks.](https://theauth.dev/use-cases/ai-startups/)
5. [Auth for multi-agent systemsAn orchestrator spawns sub-agents. Each should hold less than its parent and be stoppable on its own.](https://theauth.dev/use-cases/multi-agent/)
6. [Auth for large organizationsA security review wants to know where data lives, how people and agents are removed, and what the audit trail holds.](https://theauth.dev/use-cases/enterprise/)

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](https://github.com/glincker/theauth/discussions). For the full reference, the [docs](https://docs.theauth.dev) cover every module.
