📄️ Overview
Casdoor exposes its management API as a Model Context Protocol (MCP) server at /api/mcp, and it can register, browse, and scan for external MCP servers.
📄️ MCP authentication
How MCP clients discover the OAuth 2.0 requirements of the Casdoor MCP server, and the ways to authenticate a request.
📄️ MCP tools reference
The tools of the Casdoor MCP server for managing applications and users, how to list and call them, and the format of the results.
📄️ Let agents manage Casdoor
Let an AI agent such as Claude Code or Cursor create applications, connect GitHub and Google sign-in, find why users can't sign in and change providers, roles and permissions through the Casdoor MCP server, with dry runs, change records, approval and rollback.
📄️ MCP authorization and scopes
The OAuth 2.0 scopes that control which tools of the Casdoor MCP server a token can call, how to request them, and how to define scopes for your own MCP server.
📄️ Integration example
A Python example that gets an access token with scopes, initializes a session with the Casdoor MCP server, and calls tools.
📄️ MCP error handling
The JSON-RPC error codes of the Casdoor MCP server, with example responses.
📄️ MCP troubleshooting
Causes and fixes for common problems with the Casdoor MCP server and with MCP servers that use Casdoor as their OAuth 2.0 provider.
📄️ MCP gateway, end to end
A complete example of the Casdoor MCP gateway - one MCP server, published to ChatGPT, Claude, Cursor, and VS Code users of several organizations with single sign-on, per-user access, a tool allowlist, tokens bound to the server, and revocation.
📄️ Connect Claude
Connect Claude Desktop, claude.ai, and Claude Code to the Casdoor MCP server, or to an MCP server behind the Casdoor MCP gateway, with OAuth 2.0 - custom connectors, Claude's client ID metadata document, the callback URL, claude_desktop_config.json with mcp-remote, and claude mcp add.
📄️ Connect Cursor
Connect the Cursor editor to the Casdoor MCP server with OAuth 2.0, so that the AI of Cursor can manage applications and users in Casdoor.
📄️ Connect ChatGPT
Add the Casdoor MCP server to ChatGPT as a custom MCP server with OAuth 2.0 - the steps in ChatGPT Plugins, client ID metadata documents and dynamic client registration, the redirect URI, sign-in, and why ChatGPT asks for permission before tool calls.
📄️ Connect VS Code
Connect GitHub Copilot in VS Code to the Casdoor MCP server, or to an MCP server behind the Casdoor MCP gateway, with OAuth 2.0 - the mcp.json entry, the client ID metadata document of VS Code, the redirect URIs, and sign-out.
📄️ Connect DeepSeek Harness
Sign DeepSeek Harness (dsh) in to Casdoor as an AI agent and give it the MCP servers of your organization through the Casdoor MCP gateway, with tool permissions and call records - set up from the web pages of Casdoor and DeepSeek Harness, without editing configuration files.