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
What is Casdoor?
Casdoor is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 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, fac...
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
This server falls under the Security category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- An open-source Agent-first Identity and Access Management (I
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx casdoorConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Casdoor
Casdoor is an open-source, agent-first Identity and Access Management (IAM) platform that doubles as an MCP and agent gateway. It supports OAuth 2.0, OIDC, SAML, LDAP, SCIM, WebAuthn, TOTP, MFA, and Face ID authentication, and provides a single unified auth layer for both human users and AI agents. Organizations building multi-tenant AI applications that need robust authentication, access control, and an MCP gateway for routing agent requests will find Casdoor an excellent self-hosted backbone.
Prerequisites
- Docker (for the quickest setup) OR Go 1.20+ and Node.js LTS 20 with Yarn 1.x for building from source
- A supported database: MySQL, PostgreSQL, SQLite, SQL Server, CockroachDB, or TiDB
- An MCP-compatible client such as Claude Desktop
- Redis (optional, for session caching at scale)
Start Casdoor with Docker (quickest path)
Pull and run the all-in-one Docker image which bundles Casdoor with a SQLite database. The UI will be available at http://localhost:8000.
docker run -p 8000:8000 casbin/casdoor-all-in-oneLog in and configure your organization
Open http://localhost:8000 in a browser. Log in with the default credentials (username: built-in/admin, password: 123). Create your organization and configure identity providers, applications, and roles.
Enable the MCP gateway
In the Casdoor admin UI, navigate to the MCP gateway settings. Register your AI agents and MCP servers, configure access policies, and generate gateway tokens for each agent.
Obtain the MCP gateway endpoint URL
The MCP gateway is accessible at the /mcp path of your Casdoor instance. Note this URL for your MCP client configuration.
# Example: http://localhost:8000/mcpConfigure your MCP client to use the Casdoor gateway
Add Casdoor as the MCP server in your client configuration, supplying the gateway URL and your agent token.
{
"mcpServers": {
"casdoor": {
"command": "npx",
"args": ["casdoor"],
"env": {
"CASDOOR_ENDPOINT": "http://localhost:8000",
"CASDOOR_CLIENT_ID": "your_client_id",
"CASDOOR_CLIENT_SECRET": "your_client_secret"
}
}
}
}Test authentication flows
Use the Casdoor Swagger UI at http://localhost:8000/swagger to test the REST APIs. Verify that OAuth tokens issued by Casdoor are accepted by your protected services.
Casdoor Examples
Client configuration
Claude Desktop configuration for the Casdoor MCP gateway server.
{
"mcpServers": {
"casdoor": {
"command": "npx",
"args": ["casdoor"],
"env": {
"CASDOOR_ENDPOINT": "http://localhost:8000",
"CASDOOR_CLIENT_ID": "your_client_id",
"CASDOOR_CLIENT_SECRET": "your_client_secret"
}
}
}
}Prompts to try
Example prompts for managing identity and access control through the Casdoor MCP gateway.
- "Create a new user account in the built-in organization with the role developer"
- "List all OAuth applications registered in Casdoor"
- "Check what permissions the user alice has in the production application"
- "Generate a new TOTP secret for user bob and return the QR code URI"
- "Show all active sessions for organization my-company"Troubleshooting Casdoor
Cannot connect to Casdoor at localhost:8000
Verify the Docker container is running with `docker ps`. If the port is already in use, change the host port mapping: `docker run -p 8080:8000 casbin/casdoor-all-in-one` and update your configuration accordingly.
OAuth token validation fails in connected services
Ensure the application's client ID and client secret in Casdoor match the values configured in your service. Also verify the redirect URIs are correctly registered under the application settings in the Casdoor admin UI.
MCP gateway returns 401 Unauthorized for agent requests
Re-generate the gateway token in the Casdoor admin UI and update the CASDOOR_CLIENT_SECRET in your MCP client config. Check that the agent's IP or origin is not blocked by Casdoor's access control rules.
Frequently Asked Questions about Casdoor
What is Casdoor?
Casdoor is a Model Context Protocol (MCP) server that 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 connects AI assistants to external tools and data sources through a standardized interface.
How do I install Casdoor?
Follow the installation instructions on the Casdoor GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Casdoor?
Casdoor works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Casdoor free to use?
Yes, Casdoor is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.
Casdoor Alternatives — Similar Security Servers
Looking for alternatives to Casdoor? Here are other popular security servers you can use with Claude, Cursor, and VS Code.
ghidraMCP
★ 9.0kAn Model Context Protocol server that enables LLMs to autonomously reverse engineer applications by exposing Ghidra's decompilation and analysis tools. It allows AI agents to list code structures, rename methods, and analyze binaries directly through
HexStrike AI
★ 8.9kHexStrike AI MCP Agents is an advanced MCP server that lets AI agents (Claude, GPT, Copilot, etc.) autonomously run 150+ cybersecurity tools for automated pentesting, vulnerability discovery, bug bounty automation, and security research. Seamlessly b
IDA Pro MCP
★ 8.7kEnables AI-assisted reverse engineering in IDA Pro by providing tools to analyze binaries, decompile functions, manage comments, search patterns, and interact with the IDA database through natural language.
Anthropic Cybersecurity Skills
★ 6.6k754 structured cybersecurity skills for AI agents · Mapped to 5 frameworks: MITRE ATT&CK, NIST CSF 2.0, MITRE ATLAS, D3FEND & NIST AI RMF · agentskills.io standard · Works with Claude Code, GitHub Copilot, Codex CLI, Cursor, Gemini CLI & 20+ platform
Hooker
★ 5.1k🔥🔥 hooker is a Frida-based reverse engineering toolkit for Android. It offers a user-friendly CLI, universal scripts, auto hook generation, memory roaming to detect activities/services, one-click SOCKS5 proxy setup, Frida JustTrustMe, and BoringSSL u
Viper
★ 5.0kAdversary simulation and Red teaming platform with AI
Browse More Security MCP Servers
Explore all security servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Casdoor in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Casdoor?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.