Asgardeo
Asgardeo is a cloud-native identity as a service (IDaaS) platform that supports OAuth 2.0 and OpenID Connect (OIDC), providing robust identity and access management for modern applications.
If you don't have an Asgardeo account, you can sign up for free.
Get issuer URL
You can find the issuer URL in the Asgardeo Console:
- Log in to the Asgardeo Console and select your organization
- Navigate to the created application and open the Info tab
- The Issuer field will be displayed there
The issuer URL should look like:
https://api.asgardeo.io/t/<your-organization-name>/oauth2/token
You can also discover this endpoint dynamically via the OIDC discovery endpoint.
Create API resource and scopes
Asgardeo supports Role-Based Access Control (RBAC) and fine-grained authorization using API resources and scopes.
- Log in to the Asgardeo Console and select your organization
- Navigate to API Authorization in the left menu
- Click New API Resource and fill in the details:
- Identifier: Your MCP server URL, e.g.,
http://localhost:3001/ - Display Name: e.g., "Todo Manager"
- Identifier: Your MCP server URL, e.g.,
- Add the scopes your MCP server needs, e.g.:
create:todos: "Create new todo items"read:todos: "Read all todo items"delete:todos: "Delete any todo item"
- Click Create
The scopes will be included in the JWT access token's scope claim as a space-separated string.
Create roles
Roles make it easier to manage permissions for groups of users:
- Navigate to User Management > Roles in the left menu
- Click New Role
- Create roles with appropriate scopes, e.g.:
- Admin: Assign all scopes (
create:todos,read:todos,delete:todos) - User: Assign limited scopes (e.g., only
create:todos)
- Admin: Assign all scopes (
- For each role, select the scopes from your API resource
Alternatively, you can configure roles at the application level:
- Navigate to Applications and select your application
- Go to the Roles tab
- Select "Application Role" as the audience type
- Create and configure roles with their respective scope assignments
Assign roles to users
- Navigate to User Management > Roles
- Select a role (e.g., "Admin" or "User")
- Go to the Users tab
- Click Assign User and select the users to assign to this role
Retrieving user identity
User information is encoded inside the ID token returned along with the access token. But as an OIDC provider, Asgardeo exposes a UserInfo endpoint that allows applications to retrieve claims about the authenticated user in the payload.
To fetch an access token that can be used to access the userinfo endpoint, at least two scopes are required: openid and profile.
Register MCP client
While Asgardeo supports dynamic client registration via a standard API, the endpoint is protected and requires an access token with the necessary permissions. You'll need to register the client manually through the Asgardeo Console.
Register a client for VS Code
- Log in to the Asgardeo Console and select your organization
- Create a new application:
- Go to Applications → New Application
- Choose Standard-Based Application → OAuth 2.0/OpenID Connect
- Enter an application name like
VS Code - In the Authorized Redirect URLs field, add:
http://127.0.0.1https://vscode.dev/redirect
- Click Create
- Configure the protocol settings:
- Under the Protocol tab:
- Copy the Client ID for later use
- Ensure switching to
JWTfor theToken Typein Access Token section - Click Update
- Configure API authorization (if using RBAC):
- Go to the API Authorization tab
- Authorize the API resource you created earlier
- Select the scopes the application can request