Resources
A Resource is an OAuth Resource Server: the API or MCP server a client requests access to. The client can be a third-party app that a partner or customer builds against your platform, one of your own services, or an AI agent.
When a client authenticates, it specifies which Resource it needs and what scopes it's asking for. Descope evaluates those requests against the scope catalog on that Resource and the Policies you've defined, and issues an access token carrying only the permissions granted. Your server then validates the token's aud, scope, and other claims before serving any request.
Resource access is dictated by Policies. They govern which subjects can receive which scopes on which Resources, across your Descope Applications (Inbound Apps and Agentic Clients).
Manage Resources in the Resources section of the Descope Console. There are two types:
| Type | What it protects | Scope model |
|---|---|---|
| API | REST, GraphQL, or other backends you build | OAuth scopes mapped to Descope RBAC roles |
| MCP Server | An MCP endpoint serving tools over the Model Context Protocol | MCP OAuth scopes, optionally mapped to Connection scopes for third-party APIs |
MCP Server Resources and the Agentic Identity Hub
MCP Server Resources created here also appear under MCP Servers in the Agentic Identity Hub, where you manage clients, policies, and runtime agent governance.
When You Need a Resource
You need a Resource whenever an OAuth client needs scoped access to a service and you want Descope to act as the authorization server in front of that service. A few cases come up often:
- Third-party apps calling your API: A partner or customer may build an integration against your platform. You register that integration as an Inbound App and define your API as a Resource. The app requests only the scopes it needs, the user consents to them, and your API receives a token whose
audnames your API. - Internal services without proper OAuth: If an internal API has no scoping of its own, define it as a Resource. The API gets an audience, a scope catalog, and Descope-validated tokens without you building any OAuth infrastructure.
- M2M services whose permissions you want to control: A machine-to-machine client authenticating with
client_credentialshas no user consent in the loop, so the Resource's scopes are the only permission boundary it has. You define scopes on the Resource the M2M client accesses, then use policies to decide which of those scopes each client receives. The client only ever holds the access you granted it. - Clients reaching external services: A client that needs data from a provider such as Google or HubSpot should not hold that provider's tokens directly. Instead, define a Resource whose scopes map to the underlying provider scopes. The client authenticates to the Resource with a Descope token, and the Resource uses that token to fetch the Connection token when it serves the request. For AI agents, this Resource is most often an MCP server, but it can be a plain API.
Scopes Live on the Resource
Only your API or MCP server knows the full set of actions it can perform. That's why scopes are defined on the Resource rather than on each client that calls it. Clients request the scopes they need; the Resource defines which scopes exist and what rules govern them.
Keeping the permission catalog in one place also means clients don't drift out of sync as your API evolves. Add a new scope to the Resource and any associated client can request it immediately, with no client-side config changes required.
Note
See Managing Resources for docs on how to create, associate, and delete Resources.
Three things follow from that model:
- Register the service: Add an API or MCP Server Resource with its audience (
aud) and scope list. - Grant client access: Register the Inbound Apps or Agentic Clients that will access this Resource.
- Set access rules: Apply Policies to control which subjects can receive which scopes at token issuance, across all applications and agentic clients. For API Resources, you can also map scopes to RBAC roles so users can only approve permissions that their roles allow.
Multiple clients can access the same Resource, and a single client can access multiple Resources:
Clients
Each line is a token relationship: the client authenticates and receives an access token scoped to that Resource's audience and scopes. One client can access many Resources; one Resource can be shared by many clients — each with its own allowed scope set.
Note
Federated Applications do not support Resource association. Use Inbound Apps or Agentic Clients when you need tokens scoped to a Resource.
Modeling Resources
A Resource token carries the Resource's identifier in its aud claim, and a service accepts only tokens whose aud matches its own identifier. Modeling Resources comes down to one question: how many services should accept the same token?
You can answer that question in three ways. Each answer trades the number of tokens a client manages against how far one token can reach.
One Resource per service
In the per-service model, each API or MCP server is its own Resource, with its own audience and scope catalog. A token for the billing API fails the audience check at the reporting API, so each service only accepts tokens meant for it.
A client that calls several services directly needs a token for each one, and it requests each token separately, naming that Resource. When one service needs to call another on the client's behalf, that service exchanges the token it received for a token scoped to the next Resource.
The per-service model is the default to start from. A leaked or over-scoped token reaches one service and nothing else.
One Resource shared by several services
Sometimes several services are parts of one product, and a client should reach all of them with one token. In that case you can define a single Resource and have every service accept its identifier as the audience. Scopes then carry the whole permission boundary: the contacts service enforces contacts:read, and the calendar service enforces calendar:read.
The shared model removes the audience as a boundary between those services. Any token for the shared Resource passes the audience check on every service behind it. A service that does not check scope accepts calls that were meant for its neighbors.
One Resource for a gateway
A gateway is a single endpoint that routes calls to many downstream APIs and MCP servers. The client sees one Resource, the gateway's, and gets one token for it. The gateway model looks like the shared model from the client's side, but the downstream services never receive the client's token.
The gateway validates the client's token, then exchanges it for a token scoped to each downstream Resource, or for a Connection credential when the target is a third-party API.
Downstream services keep their own Resources, so the per-service boundary still holds behind the gateway. The gateway also gives you one place to apply policies, per-customer limits, and auditing to every call. Gateways covers when that extra hop is worth adding.
In all three models, Descope is the authorization server. Descope issues each token for a Resource's audience, and the service that receives the token validates it before serving the request.
Keep credentials off the client
Resources are also how you avoid handing long-lived secrets to a client. A client can fetch a Connection token directly with a user JWT, and agents can do so with the Agent Auth SDK. The recommended pattern puts a Resource, such as your API, MCP server, or gateway, between the client and the Connections vault:
- The client authenticates to the Resource and receives a short-lived, scoped token for it.
- The Resource pulls the API key or external OAuth token from Connections at runtime.
- The Resource calls the downstream service and returns only the result.
The client never sees the third-party API key or OAuth token, which are often not short-lived. On MCP Server Resources, the MCP scope to Connection scope mapping exists for this pattern.
Using a Resource Token
Descope issues the access token when the client authenticates at the authorization server: through the authorize flow (login and consent where required) and a call to the token endpoint, naming the target Resource via resource when needed. The client then calls the Resource directly with that token. The token's aud matches the Resource identifier, and its scope carries the permissions Descope granted.
Calling a second Resource
A Resource often needs to call another Resource to serve a request. Your API might call a billing service, or an agent might call another agent. Usually the first Resource makes that second call, acting as a client in its own right.
Resource A validates the token it received, then sends that token to the Descope token endpoint as the subject token in a token exchange (RFC 8693). Descope checks policies and returns a new token whose aud is Resource B, with Resource A's client ID in the actor claim (act). The original client only ever holds the token for Resource A. The diagram's second tab shows the less common case, where a confidential client exchanges its own token and calls Resource B itself.
Select any step to see what happens. In phase 1 the client gets token A for your backend. In phase 2 your backend, registered as its own confidential client, trades token A for token B and calls Resource B itself.
Descope requires client authentication on every exchange. Resource A therefore also needs its own registration as a confidential Inbound App or Agentic Client, with a secret or private key that stays on the server. A public client, such as a single-page app or a CLI, can't exchange tokens.
The same pattern covers agent-to-agent calls. When agent A calls agent B, agent B is the Resource. If agent B then calls a tool or a third agent, agent B exchanges the token it received for a token scoped to that next target.
Pricing
Descope meters Resource access by how the client gets its token, not by how many requests it makes afterward. How Resource and Connection access is counted defines each metric.
Types of Resources
Descope has two types of Resource. The type decides how scopes map to permissions: API Resources map scopes to RBAC roles, and MCP Server Resources map scopes to Connection scopes.
API Resources
An API Resource represents a service you operate as an OAuth resource server, such as a platform API, a partner integration, or a backend. Third-party apps reach it through Inbound Apps, and agents reach it through Agentic Clients.
What You Configure
- Resource identifier: Used as the token
audand in discovery metadata so clients target the correct server. Use a wildcard URI to cover an API that runs on many hosts. - OAuth scopes: Permission strings your API enforces (for example
shipments.read,admin:reports). - Role association: Map each scope to one or more Descope RBAC roles. For user-delegated flows, only users who hold an associated role can consent to that scope. For both user and M2M tokens, granted scopes can include those mapped roles in the token's
rolesclaim. - Cross App Access (optional): For a third-party API or MCP server protected by another authorization server, set the authorization server that accepts the XAA tokens (ID-JAGs) Descope issues for it. See Cross App Access.
See Scopes and roles: API Resources for the full model.
OAuth Clients for APIs
After you create an API Resource, create Inbound Apps or Agentic Clients to let applications and agents request tokens against it. Inbound Apps and Agentic Clients own grant types, consent flows, and session management. The scope catalog and role mapping live on the Resource.
MCP Server Resources
Note
The same MCP Server Resource appears in the Agentic Identity Hub → MCP Servers view.
An MCP Server Resource represents an MCP server you're building. It registers your MCP server URL as the token audience (aud), publishes OAuth discovery metadata, and defines the tool-level scopes clients request at authorization time.
What You Configure
- MCP Server URL: Base URL of your MCP endpoint (typically ending in
/mcp). Included in theaudclaim on issued tokens. Use a wildcard URI to cover a server that runs on many hosts. - MCP Server Scopes: Permissions your server enforces per tool (for example
mcp:calendar.read). - Connection Scope Mapping: Map each MCP scope to Connection scopes so Descope knows which vaulted credentials to issue at tool runtime.
- Defaults for dynamically registered clients: User Consent Flow, token, and session settings for clients that register through DCR or CIMD, set on the Resource or shared through a dynamic registration template.
MCP Server Resources don't use the API Resource role-mapping model. Access control for MCP clients goes through Policies and optional connection scope mappings.
To let agents reach a third-party MCP server with XAA tokens (ID-JAGs), create an API Resource for it instead. Only API Resources have Cross App Access settings.
See Scopes: MCP Server Resources and MCP server settings for operational details.
Wildcard Resource URIs
When one service runs on many hosts or paths, such as a subdomain per tenant or a preview URL per branch, give its Resource a wildcard URI instead of creating a Resource for each host. The * is a wildcard, not a regular expression, and it can go in two places:
- Inside the first label of the host:
https://*.example.com/mcpmatcheshttps://acme.example.com/mcp, andhttps://mcp-*.example.com/mcpmatcheshttps://mcp-pr-42.example.com/mcp. The*stands for one or more characters of that one label, sohttps://*.example.com/mcpdoesn't matchhttps://a.b.example.com/mcporhttps://example.com/mcp. - As the last path segment:
https://example.com/mcp/*matches any path underhttps://example.com/mcp/, such ashttps://example.com/mcp/tenants/acme.
You can use both at once, as in https://*.example.com/mcp/*. A wildcard URI must be an http or https URL without a query or fragment, and the scheme and port must match exactly. A host wildcard can't sit directly under a public suffix, so https://*.com/mcp and https://*.vercel.app/mcp are rejected: anyone can register a domain that matches them.
Clients still send the concrete URL they connect to in the resource parameter, and Descope puts that URL, never the pattern, in the token's aud claim. If a Resource holds the exact URL, that Resource is used. Otherwise the longest wildcard URI that matches wins. For an MCP server, each concrete URL the wildcard covers, whether it varies by host or by path, serves its own protected resource metadata with that URL as resource.
Token Validation
Your API or MCP server receives tokens from every client that Descope authorizes for the Resource: third-party apps registered as Inbound Apps, M2M services, and agents. The server validates each token the same way, whichever client sent it:
- Validate the JWT signature with your project's public keys (session validation).
- Check that
issandexpare valid and thataudholds this Resource's identifier. For a Resource with a wildcard URI,audholds the concrete URL the client requested, so compare it with the canonical URL of the host or tenant you are serving, not with the pattern. Take that URL from trusted configuration, never from client-controlled headers such asHostorX-Forwarded-Host, and authorize the request for the same tenant. - Enforce the required
scope. For API Resources, you can also checkrolesfrom RBAC. - Optionally, check that
azpholds an allowed client ID when only some apps may call the Resource.
Check for the Resource identifier, not the project ID
Tokens from Inbound Apps, Federated Apps, and Descope sessions carry your project ID in aud by default. If your Resource accepts any token with the project ID in aud, it also accepts tokens that Descope issued for other apps and Resources. Check aud for this Resource's identifier instead. To limit which clients can call the Resource, also check that azp holds an allowed client ID. See Checking the audience in your API.
All Resource tokens in a project share the same signing keys (JWKs).
Next Steps
- Managing Resources: create, associate with Inbound Apps and Clients, and delete
- Scopes and roles: API scope ↔ RBAC mapping; MCP scope ↔ Connection mapping
- Attribute scopes: map scopes like
profileandemailto the user claims in tokens and/userinfo - Dynamic registration templates: share defaults for dynamically registered clients across MCP Server Resources
- Policies: control which subjects receive which scopes, across all applications and agentic clients
- Inbound Apps: OAuth clients for API Resources
- MCP Servers: operating MCP Server Resources in the Agentic Identity Hub
- Developing APIs with OAuth: how Resources, Inbound Apps, and token validation fit together
- Session validation: enforce
aud,scope, and related claims
Agent Authorization
How policies govern agent access to Resources and Connections, with recommended patterns for MCP servers, backend APIs, and third-party credential brokering.
Management
Create API and MCP Server Resources in Descope, associate them with Inbound Apps and agentic Clients, and delete Resources when they are no longer needed.