casdoor
An open-source Agent-first Identity and Access Management (IAM) /LLM MCP & agent gateway and auth server with web UI supporting OpenClaw, MCP, OAuth, OIDC, SAML, CAS, LDAP, SCIM, WebAuthn, TOTP, MFA, Face ID, Google Workspace, Azure AD
- 14.6k stars
- 1.9k forks
- 93 open issues
- Language: Go
- License: Apache-2.0
- updated
Install
git clone https://github.com/casdoor/casdoor && cp casdoor/*.md ~/.claude/agents/- Clone the repository and copy the agent .md definitions into ~/.claude/agents (or .claude/agents inside a project).
- Start a new Claude Code session to load the agents.
- Delegate work to them with the Task/Agent tool or by name.
Editor's note
Casdoor is an open-source identity and access management server written in Go that doubles as an MCP gateway, giving AI agents and human users a single authentication layer. It handles user login, organization management, and application access through a web UI, while supporting a broad range of protocols including OAuth 2.0, OIDC, SAML, CAS, LDAP, SCIM, WebAuthn, TOTP, MFA, and Face ID, alongside integrations with Google Workspace and Azure AD. The MCP gateway role is the most relevant connection to Claude: it acts as a proxy that brokers authentication between MCP clients such as Claude Desktop or Claude Code and backend MCP servers, enforcing access policies defined through Casbin, which supports ACL, RBAC, and ABAC rule models. Developers building multi-tenant applications or agentic pipelines who need centralized identity control without a commercial identity provider will find the most use here. The project ships an all-in-one Docker image for quick trials and has accumulated over 13,000 GitHub stars.
Subagents overview
An open-source, self-hosted identity and access management platform
Casdoor is a single sign-on (SSO) and authentication server with a web console. It speaks OAuth 2.0, OIDC, SAML 2.0, CAS, LDAP, SCIM 2.0, WebAuthn, TOTP/MFA and MCP, and connects to Google Workspace, Microsoft Entra ID (Azure AD), GitHub and many other identity providers.
Website · Documentation · Live demo · Casdoor Cloud · Discord
The sign-in page your users see: password, email/SMS code, WebAuthn and Face ID, plus every social provider you enable.
Admin console. Users, tokens, organizations and providers at a glance. Applications. Every app that delegates login to Casdoor, across all organizations. Application settings. OAuth, SAML, providers and branding — no redeploy, no config file.
❤️ Sponsors
🚀 Try it in 30 seconds
No database and no config file needed. This runs Casdoor on SQLite with sample data:
docker run -p 8000:8000 casbin/casdoor-all-in-oneOpen http://localhost:8000 and sign in:
| Field | Value |
|---|---|
| Organization | built-in |
| Username | admin |
| Password | 123 |
The sign-in form has separate organization and username fields. Docs sometimes write this pair as
built-in/admin— that is the same thing, not a username containing a slash.
Prefer not to install anything? Use the hosted demos:
| Demo | URL | Notes |
|---|---|---|
| Writable | demo.casdoor.com | Full access, so you can click through everything. All data resets about every 5 minutes. |
| Read-only | door.casdoor.com | Stable global demo. Every write operation fails by design. |
Both accept the same built-in / admin / 123 credentials.
Want it hosted for production instead? Casdoor Cloud runs a dedicated Casdoor instance and database for you, kept up to date by the Casdoor team. It is the same open-source Casdoor, so you can move between Cloud and self-hosting at any time. New accounts get $20 in free credit to try it, so you can start a free trial without talking to anyone.
🤔 Why Casdoor
Casdoor is a complete identity provider, not an authentication proxy and not a library you embed. It stores your users, issues the tokens, and gives you an admin console to manage all of it — so your applications can delegate login entirely and never handle a password themselves.
One server, many protocols. The same user directory is reachable over OAuth 2.0, OIDC, SAML 2.0, CAS, LDAP and SCIM, so a modern SPA and a legacy CAS-only app can share one set of accounts.
Everything is editable in the UI. Organizations, applications, providers, sign-in methods, email and SMS templates, and login-page branding are configured in the web console instead of in files you have to redeploy.
Policy-based authorization built in. Access rules are expressed with Casbin — ACL, RBAC, ABAC and custom models — rather than a fixed permission scheme.
Straightforward to self-host. A single Go binary plus a database. No JVM, no operator, no cluster required.
If all you need is a login screen in front of an existing reverse proxy, a smaller tool may suit you better. Casdoor is for when you want to own the user directory itself.
Coming from another product? See how Casdoor compares with Keycloak, Auth0, Okta and others.
📦 Installation
Four supported paths, fastest first. All of them end up at http://localhost:8000.
Rather not run the server, database and upgrades yourself? Casdoor Cloud gives you a dedicated Casdoor instance in the region you choose, with flat monthly pricing and no per-user fees.
Docker — all-in-one (evaluation)
docker run -p 8000:8000 casbin/casdoor-all-in-oneBundles SQLite and demo data into a single container. Ideal for a first look, but not intended for production: the data lives inside the container and disappears with it.
Guide: Try with Docker
Docker Compose — Casdoor with MySQL
docker-compose.yml starts Casdoor next to a MySQL 8 container.
Two things to know before running it:
Compose builds the image from source (Go backend plus React frontend). The first
docker compose uptakes several minutes, so it is not the quick-trial path — use the all-in-one image above for that.You have to point Casdoor at the bundled database first.
Set the MySQL settings in conf/app.conf to match the db service:
driverName = mysql
dataSourceName = root:123456@tcp(localhost:3306)/
dbName = casdoorUse localhost here even though MySQL runs in a separate container: the compose file sets RUNNING_IN_DOCKER=true, and Casdoor rewrites localhost to the Docker host address at startup (see conf/conf.go). Then start everything:
docker compose upThe compose entrypoint already passes --createDatabase=true, so the casdoor database is created for you.
Guide: Try with Docker
Kubernetes — Helm
Requires Helm v3 and a running cluster:
helm install casdoor oci://ghcr.io/casdoor/helm-charts/casdoorThe chart does not expose Casdoor outside the cluster by default. To reach it, find the service and forward a port:
kubectl get svckubectl port-forward svc/<service-name-from-above> 8000:8000What people ask about casdoor
What is casdoor/casdoor?
casdoor/casdoor is subagents for the Claude AI ecosystem. An open-source Agent-first Identity and Access Management (IAM) /LLM MCP & agent gateway and auth server with web UI supporting OpenClaw, MCP, OAuth, OIDC, SAML, CAS, LDAP, SCIM, WebAuthn, TOTP, MFA, Face ID, Google Workspace, Azure AD It has 14.6k GitHub stars and its last recorded update is dated 2026-10-23.
How do I install casdoor?
You can install casdoor by cloning the repository (https://github.com/casdoor/casdoor) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is casdoor/casdoor safe to use?
Our security agent has analyzed casdoor/casdoor and assigned a Trust Score of 100/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.
Who maintains casdoor/casdoor?
casdoor/casdoor is maintained by casdoor. The last recorded GitHub activity is dated 2026-10-23, with 93 open issues.
Are there alternatives to casdoor?
Yes. On ClaudeWave you can browse similar subagents at /categories/agents, sorted by popularity or recent activity.
Maintain this repo? Show its Trust Score in your README
The badge shows this repository's current Trust Score and verdict, and links back to this page. It follows the catalogue data: nobody can buy or edit the score it displays.
[](https://claudewave.com/en/repo/casdoor-casdoor)<a href="https://claudewave.com/en/repo/casdoor-casdoor"><img src="https://claudewave.com/api/badge/casdoor-casdoor" alt="ClaudeWave Trust Score for casdoor/casdoor" width="320" height="64"></a>