Connect ChatGPT to MCP
Connect ChatGPT to Casdoor’s MCP server so you can manage applications, users, and resources from ChatGPT. Requires ChatGPT Plus or Enterprise with MCP support (OpenAI docs).
Prerequisites
- A running Casdoor instance (HTTPS required for ChatGPT integration)
- A ChatGPT Plus or Enterprise account with MCP support
- Admin access to your Casdoor instance to create applications
Step 1: Create an application in Casdoor
Create a Casdoor application for ChatGPT’s OAuth:
-
Log in to your Casdoor admin panel
-
Navigate to Applications and click Add
-
Configure the application with these settings:
-
Name:
chatgpt-mcp(or your preferred name) -
Display Name:
ChatGPT MCP Client -
Organization: Select your organization
-
Redirect URIs: Add the ChatGPT OAuth callback URL:
https://chat.openai.com/auth/callbackcảnh báoChatGPT requires HTTPS for OAuth callbacks. Ensure your Casdoor instance is accessible via HTTPS.
-
-
Grant Types: Enable
Authorization CodeandRefresh Token -
Enable PKCE: Check this option for enhanced security
-
Token Format:
JWT(recommended) -
(Optional) Application Type: Set to
Agent -
(Optional) Category: Set to
MCPfor better organizationthông tinSee Application categories for Category and Type options.
-
Click Save and note the Client ID and Client Secret for the next step.
Step 2: Configure ChatGPT MCP Connection
ChatGPT supports connecting to MCP servers through its settings interface.
Access MCP Settings
- Log in to ChatGPT
- Click on your profile icon in the bottom left
- Go to Settings → Beta Features
- Enable Model Context Protocol (if not already enabled)
- Navigate to Settings → MCP Servers
Add Casdoor MCP Server
-
Click Add Server or + New Server
-
Fill in the server details:
- Server Name:
Casdoor(or your preferred name) - Server URL:
https://your-casdoor.com/api/mcp - Authentication Type: Select
OAuth 2.0 - Client ID: Your Client ID from Step 1
- Client Secret: Your Client Secret from Step 1
- Authorization URL:
https://your-casdoor.com/api/login/oauth/authorize - Token URL:
https://your-casdoor.com/api/login/oauth/access_token - Scopes:
read:application write:application openid profile email
- Server Name:
-
Click Save or Connect
The exact UI and field names may vary depending on ChatGPT's current interface. Refer to ChatGPT's help documentation for the most up-to-date instructions.
Configuring Scopes
The scopes you configure control what permissions ChatGPT has. Common scopes include:
read:application- View applicationswrite:application- Create, update, delete applicationsread:user- View userswrite:user- Create, update, delete usersopenid profile email- Basic user information (required for OAuth)
See Authorization and Scopes for the complete list of available scopes.