theAuth MCP server
Commit Nov 13, 2026Provides identity, scoped permissions, and audit trails for AI agents and humans using OAuth 2.1 and delegation.
Also known as glincker/theauth
- Stars
- 22
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Nov 13, 2026
- License
- MIT
What is theAuth MCP?
theAuth provides identity, scoped permissions, and audit trails for AI agents and humans using OAuth 2.1 and delegation.
Summary generated from the project's README
About theAuth MCP server
Managing distinct identities and scoped permissions for both AI agents and human users is what theAuth enables. Developers can assign specific roles to autonomous agents, allowing them to act as principals with their own owners rather than relying on shared API keys. This system uses OAuth 2.1 and delegation to let a parent agent pass a subset of its permissions to a child agent, with revocations applying immediately on the next call.
This TypeScript library runs locally on Node, Bun, Deno, or Cloudflare Workers using an in-memory SQLite database or other providers like Postgres. It requires Node 20 or newer and utilizes core dependencies such as drizzle-orm, jose, sql.js, and zod. Every authorization decision generates a machine-readable code and an audit row to maintain a clear history of actions. The system is designed for developers building agentic workflows that require granular control over resources like mcp:github:repos.
What you can do with it
- 1Assigning scoped agent permissionsCreate an autonomous agent that only has read access to specific GitHub repositories.
- 2Implementing permission delegationAllow a parent agent to hand part of its permissions to a child agent.
- 3Maintaining security audit trailsTrack every authorization decision with machine-readable codes and audit logs.
Written from the project's README. Every use case is checked against a quote from it.
Automated checks
Ran Nov 14, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachableglincker/theauth is public and reachablegithub.com/glincker/theauth ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-13github.com/glincker/theauth ↗Pass
- OpenSSF ScorecardOpenSSF Scorecard 5.3 / 10; weakest: Code-Review 0, Dangerous-Workflow 0, Token-Permissions 0scorecard.dev/viewer/?uri=github.com/glincker/theauth ↗Partial 8/15
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubtheAuth
Open-source TypeScript auth that gives AI agents their own identity, scoped permissions, delegation and an audit trail, next to normal human sign in.
Website | Docs | Quickstart | Playground | Examples | Go library
Quickstart
Needs Node 20 or newer. This runs as pasted, with an in-memory SQLite database.
The snippet needs 2.0.0, the version in this repo. npm latest was 1.2.0 on 2026-10-31, which has no auth.user. I ran it against a local build and got the output in the comments, so build packages/core until 2.0.0 ships.
npm install @glinr/theauth
import { createTheAuth } from "@glinr/theauth";
const auth = await createTheAuth({
database: { provider: "sqlite", url: ":memory:" },
agents: { enabled: true },
});
// An agent needs an owner row. Human sign in creates these for you.
const owner = await auth.user.create({ email: "owner@example.com", name: "Owner" });
const agent = await auth.agent.create({
ownerId: owner.id,
name: "github-reader",
type: "autonomous",
permissions: [{ resource: "mcp:github:*", actions: ["read"] }],
});
const read = await auth.authorize(agent.id, { action: "read", resource: "mcp:github:repos" });
const write = await auth.authorize(agent.id, { action: "write", resource: "mcp:github:repos" });
console.log(read.allowed, read.code); // true allowed
console.log(write.allowed, write.code); // false no_permission
agent.token starts with ta_ and is shown once. To serve this over HTTP, mount a framework adapter.
Why
Agents are principals with owners, not shared API keys. A parent agent can hand part of its permissions to a child, and revoking any link takes effect on the next call. Every decision returns a machine-readable code and writes an audit row.
It runs on Node, Bun, Deno and Cloudflare Workers with four runtime dependencies in core (drizzle-orm, jose, sql.js, zod). No hosted service needed.
Status
Versions follow STABILITY.md: stable is 1.0 or later, beta is 0.2 to 0.9, experimental is 0.1.
| Area | Status | Notes |
|---|---|---|
| Core, email, MCP, gateway, CLI, client | Stable | SemVer, breaking changes only in majors. Repo is at core 2.0.0, npm is at 1.2.0 |
| React, Vue, Svelte, Expo, Electron, UI, dashboard, test utils | Beta | May change between minor releases |
| Browser extension package | Experimental | 0.1.0 |
| SAML | Experimental | Our own verifier, no independent audit |
| Cookie session cache | Experimental, opt in | Can lag a revocation by up to its maxAge |
| Databases | SQLite tested in CI | Postgres run by hand, D1 untested, MySQL unsupported |
All 30-odd packages, versions and every known limit: Packages and status. Not sure it fits? Read When not to use theAuth.
Packages
The full table with versions and maturity lives in Packages and status. Core is in packages/core.
Related
- theauth-go: the Go server library (v2), with the same model. It is separate from the Go REST client in
sdks/go. - Python client and Terraform provider.
- Formerly kavachOS: see the rename map.
How this was built
Parts of this codebase were written with AI assistance. The code is covered by about 5,000 test cases (a textual count, see by the numbers) plus CodeQL in CI. It has had no third party security audit. If you find a problem, open an issue or report it privately as described in SECURITY.md.
Contributing and license
Questions: Discussions or the GLINR Discord. See CONTRIBUTING.md and CHANGELOG.md.
MIT. Built by GLINCKER, a GLINR STUDIOS company.
theAuth MCP questions
What runtimes are supported?
TheAuth runs on Node, Bun, Deno, and Cloudflare Workers.
Does it require a hosted service?
No, it does not require a hosted service to operate.