Skip to content
FoxAuth

OAuth 2.1 · OpenID Connect · MCP

The authorization server for the agent era.

FoxAuth is built on OAuth-server.ts, a source-available OAuth 2.1 / OpenID Connect server you run yourself — with a built-in admin console, banking-grade profiles, and administration over MCP for AI agents.

22 specificationsBun + ElysiaFSL-1.1-ALv2

Two commands and a browser tab
curl -O https://raw.githubusercontent.com/RedFox-Soft/OAuth-server.ts/main/docker-compose.yml
docker compose up
# open http://localhost:3000/admin

What those two commands give you

  • MongoDB started and provisioned, with indexes and a signing key
  • Admin console at /admin, with first-run setup for the super administrator
  • Discovery at /.well-known/openid-configuration, reflecting the flags you set
  • No sign-up no tenant, no API key, no phone call

The console

Everything an operator needs, without a second product.

Projects, clients, user buckets, end-users, upstream providers, settings, SMTP, signing keys and an append-only audit trail — one console, signed in through the server's own OpenID Connect flow. The same API is what an AI agent uses over MCP.

The FoxAuth admin console listing the OAuth clients of a project.
A project's clients in the built-in console. Every change here is an audit entry.

Standards

Twenty-two specifications, implemented.

Every entry below is code in the repository, with tests. Each links to the spec it implements; the Reference names the flag that governs it.

Endpoint reference

Administration over MCP

An agent operates it, under the same rules you do.

Turn on mcp.enabled and the management API is served to an AI agent at POST /mcp as an OAuth 2.1 protected resource. Each of the 60 tools rebuilds the request the console would have sent and runs the console's own permission checks, validation and audit write — so there is no privileged back door to keep in step.

Destructive and instance-wide operations need two calls: the first returns a confirmation token, the second carries it. It is off by default.

All 60 MCP tools

agent  → settings_update { "deviceFlow.enabled": false }

server ← Nothing has been changed. Change server settings. The merged
         configuration is validated first …

         Target: settings_update
         To proceed, call settings_update again with
         confirmationToken="<token from the first call>".
         It is valid once, until 2026-09-03T14:12:04.000Z.

agent  → settings_update { "deviceFlow.enabled": false,
                           "confirmationToken": "<token from the first call>" }

server ← { "restartRequired": true,
           "changedKeys": ["deviceFlow.enabled"], … }

         Audit: actor agent:ops-bot, action settings.update.

Licensing

Source-available, honestly.

The code is public and you may read, modify, self-host and redistribute it — for anything except offering it to others as a competing hosted service. Two years after each version ships, that version converts to the Apache License 2.0.

Read the license

Start

Run it yourself this afternoon.

Self-hosting is free and complete. The managed instance is next.