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
The issuer URL is organization-scoped, so you can compose it from your organization name:
https://api.asgardeo.io/t/<your-organization-name>/oauth2/token
You can also verify it in the Asgardeo Console:
- Log in to the Asgardeo Console and select your organization
- Navigate to any of your applications and open the Info tab
- The Issuer field will be displayed there
Alternatively, discover it dynamically via the OIDC discovery endpoint.
Register MCP server and scopes
Asgardeo has a first-class MCP server resource type that supports Role-Based Access Control (RBAC) and fine-grained authorization through scopes:
- Log in to the Asgardeo Console and select your organization
- Go to Resources → MCP Servers in the left menu
- Click + New MCP Server 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.,
- Click Next, then in the Scopes tab 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.
If your organization doesn't have the MCP Servers menu yet, you can achieve the same result with a generic API resource (API Authorization → New API Resource). Both resource types issue tokens the same way.
See Securing MCP servers in the Asgardeo documentation for more details.
Token audience
Asgardeo does not support RFC 8707 resource indicators, so the resource parameter sent by MCP clients is ignored. Instead, the audience is derived from the requested scopes: when a client requests scopes that belong to your MCP server resource, Asgardeo puts that resource's Identifier in the aud claim of the issued JWT access token.
This means:
- The Identifier is the value your MCP server must validate as the audience. Configure exactly the same value (including the trailing slash, if any) as the
audiencein MCP Auth's Bearer auth config — see Scope and audience validation. - MCP clients must request at least one of your MCP server scopes, otherwise the token won't carry your resource in
aud. Make sure your MCP server advertises the required scopes in its protected resource metadata.
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 MCP server 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
As an OIDC provider, Asgardeo exposes a standard userinfo endpoint that allows applications to retrieve claims about the authenticated user. The same claims are also encoded in the ID token returned along with the access token.
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. Since MCP clients cannot obtain such a token on their own, you'll need to register the client manually through the Asgardeo Console.
Asgardeo provides an MCP Client Application template that comes preconfigured according to the MCP authorization specification (authorization code grant with PKCE, public client), so use it instead of the generic standard-based application template.
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 the MCP Client Application template
- Enter an application name like
VS Code - In the Authorized redirect URLs field, add:
http://127.0.0.1https://vscode.dev/redirect
- Keep Public client enabled, since MCP clients such as VS Code cannot securely store a client secret
- Click Create
- Configure the protocol settings under the Protocol tab:
- Copy the Client ID for later use
- In the Access Token section, make sure Token Type is set to
JWT, so that MCP Auth can validate the token locally via the JWKS endpoint instead of calling the introspection endpoint - For browser-based MCP clients (e.g., MCP Inspector), add the client's origin to Allowed Origins so that CORS preflight requests succeed
- Click Update
- Authorize the MCP server:
- Go to the Authorization tab and click Authorize a resource
- Select the MCP server you registered earlier as the resource
- Choose the Authorized Scopes the application can request
- Click Finish
- Configure the copied Client ID in your MCP client