Blog
Role-Based MCP Access Provisioning From the IdP
Role-based MCP access provisioning puts an enterprise’s existing identity system in charge of its agents’ tool access. The division of responsibility is straightforward. The identity provider, or IdP, is the authoritative source for who may reach which tools, while an MCP gateway enforces those permissions on every call. MCP itself provides no role model or governance to make that access possible to audit.
Why MCP has no native access control and why that is an enterprise problem
MCP’s optional authentication and lack of a role-based access control model leave a substantial gap for enterprise use. The protocol leaves the mapping of activity to a verifiable enterprise identity to the calling environment. The July 28, 2026 revision made the protocol core stateless, requiring each request to carry its own identity and version metadata and be authorized independently.
The stakes extend well beyond signing in. Agents form a parallel access channel to enterprise systems, where credentials permit actions including read, write, send, delete, and deploy. Shadow MCP exposes systems to these risks when developers connect coding assistants to staging databases or production APIs through local servers with hardcoded tokens. Those connections can lack an inventory, a revocation path, and an audit trail. The protocol’s silence on role-based access control is therefore a governance gap above the servers.
Why building access controls inside each MCP server does not scale
Putting OAuth validation, scope checks, and audit logic inside every MCP server distributes the same difficult work across the fleet. Each implementation becomes another place for policy to diverge. Many servers wrapping internal data lack robust OAuth support and fall back to bearer tokens pasted into configuration files. Even servers that have authentication each handle it on their own, without a shared policy model or an audit log that is consistent across servers.
A traditional API gateway addresses a different problem. Its usual model assumes deterministic application-to-application calls on static routes with fixed credentials, while an MCP agent selects tools dynamically and chains calls across systems. A seemingly innocuous prompt can therefore lead to significant downstream actions. MCP enforcement must establish whether this agent may execute this tool, with these arguments, on behalf of this user, at this moment.
What an MCP gateway does and where it sits in the stack
An MCP gateway sits between AI clients and MCP servers, authenticating callers and enforcing authorization at the tool-call level. It federates servers behind one governed endpoint and produces a consistent audit trail. For traffic routed through it, the gateway can connect the person behind a call with the invoked tool, its arguments, and its result. Traditional network and data loss prevention controls do not see that complete tool-call context.
The gateway must also distinguish curation from authorization. A platform team may decide which tools appear in a team’s catalog, but that does not establish which calls security policy permits. A hidden tool is not a locked tool. If a caller invokes it directly, the gateway still needs to refuse the request when permission is absent. Catalog presentation and runtime enforcement are separate responsibilities, even when one product provides both.
Why the IdP is the only durable source of truth for who can reach which tools
The IdP is authoritative because it already records identity, team membership, and employment status within a governed system. A gateway-local directory would do the same job without doing it any better. Assigning a server to a group in Okta or Entra lets group members receive access in their clients. Removing a member ends their gateway access at the next sync, without an administrator editing a second set of records.
The operational benefit is ordinary, which is the point. Sales can receive Salesforce and Gong, while engineering receives GitHub, Linear, and Sentry. New hires get their tools without filing a separate ticket. By contrast, manually mirroring directory groups into gateway-local teams, keys, or consumer records creates drift between employment reality and tool permission.
Offboarding provides the clearest proof-of-concept test for this model. Once the gateway has received the directory removal, it should deny the former employee’s next call without an administrator having to do anything else. Token revocation has a related boundary. The resource side should not issue refresh tokens, so disabling a user or changing IdP policy stops new access at the next token request.
How the IdP-to-gateway token flow works through EMA, ID-JAG, and OAuth token exchange
The Enterprise-Managed Authorization extension, or EMA, has been stable since June 18, 2026. It lets organizations centrally provision MCP server access through their IdP without per-application OAuth consent screens. An administrator authorizes a connector once, and employees in scope inherit access. Enterprise-managed MCP connectors reached general availability as of August 24, 2026, including Asana, Atlassian, Datadog, Linear, Notion, Slack, and Supabase.
The token flow has two distinct exchanges. First, OAuth Token Exchange, RFC 8693, lets the client trade its identity assertion at the IdP for an Identity Assertion JWT Authorization Grant, or ID-JAG. The client then presents that grant to the MCP server’s authorization server using the JWT Profile for OAuth 2.0 Authorization Grants, RFC 7523. That exchange returns an access token. EMA governs only issuance, leaving subsequent MCP usage outside the IdP’s visibility.
The gateway therefore still needs to control which tools callers can use. Workload identity also has unfinished specification work, with DPoP, SEP-1932, and Workload Identity Federation, SEP-1933, still open pull requests in the main modelcontextprotocol specification repository. The related pull requests for experimental-extension work are still open separately. Agent-to-agent identity therefore still has no stable specification, so enterprise-managed user access leaves part of the agent identity model unfinished.
Translating IdP group membership into per-tool authorization at the gateway
Directory membership becomes useful only when it resolves into a decision about a specific call. Groups map to roles, each role gets grants for each server, and those grants are narrowed to tools or annotations such as read-only. Argument-level conditions can restrict them further. A finance role, for example, can permit queries against an ERP while withholding writes. Merely approving the ERP server cannot express that distinction.
A deny rule that outranks another group’s grant lets administrators remove a person’s access without rebuilding the group model. These checks run on every call, so directory changes take effect after synchronization, independently of the next login. Registered agents and service accounts should receive grants too, but within narrower limits, with human-delegated sessions distinguished from autonomous workloads.
Client admission is a separate, related control. Client ID Metadata Documents, or CIMD, give each client a URL on its vendor’s domain that policy can name. They supersede the open server-side registration permitted by Dynamic Client Registration, or DCR. DCR remains a deprecated fallback for backward compatibility, so the admission mechanism is itself part of the access model.
Security threats that per-call IdP enforcement defends against — and what it does not
With IdP-driven access, static tokens in local configuration files are no longer needed if credentials are short-lived, scoped at the gateway, and kept from agents. Narrow grants also constrain what a compromised or misdirected agent can do. Neither control makes untrusted content safe to follow. Indirect prompt injection embeds instructions in documents, web pages, or emails that tools return to an agent. The GitHub MCP Data Heist demonstrated malicious public-repository issues steering agents toward exfiltrating private-repository data.
In parasitic tool chains, individually benign calls combine into a disclosure path, such as a weather API result containing a malicious payload that a file-write tool writes to disk. Per-call authorization cannot stop the sequence merely by approving each permitted operation. CVE-2025-32711, EchoLeak, demonstrated M365 data exfiltration with zero user interaction, while CVE-2025-6514 and CVE-2025-49596 document critical remote code execution vectors.
Gateway inspection addresses a different part of this exposure. Pinning tool descriptions by hash and scanning results for injected instructions can protect the boundary before the model reads them. Local stdio servers and direct API calls that bypass the gateway are outside its control, so they need endpoint telemetry and network controls. Authorization and inspection are complementary controls.
Discovering and governing shadow MCP servers before they become the access path
A server cannot obey IdP policy it never encounters. Discovery must therefore identify ungoverned paths and bring them into the official registry, rather than treating the gateway’s inventory as the whole estate. Gateway logs can reveal traffic to unregistered servers, while endpoint telemetry captures client configuration files and processes that IDEs launch for local servers. Network and DNS logs expose connections to unknown remote endpoints. OAuth logs add evidence of new grants to AI clients or MCP servers.
When OTEL_LOG_TOOL_DETAILS=1 is set, Claude Code puts the names of MCP servers and tools in OpenTelemetry tool events. These signals support an ongoing operational discipline. Bringing useful tools into the registry puts them under IdP policy and gateway enforcement, while banning them all can push people to use them in secret.
Audit trails and observability — what the gateway must log and where it goes
An access reviewer needs more than a record of successful calls. The audit trail must show which tools a person could call, what happened when they changed teams or left, and which grants, blocks, and denied attempts the system recorded. Entitlement and activity answer different questions. A successful-call log cannot establish who could reach a server on a given date or demonstrate that a former employee’s attempted access was refused promptly.
MCP does not define a standard for audit logging. OpenTelemetry offers an emerging foundation through MCP semantic conventions added at Development status in January 2026, in v1.39.0. Their standard attributes let tool-invocation spans integrate with existing observability systems without custom parsers. As of August 2026, the relevant GenAI conventions for MCP client/server spans and four MCP metrics remained in Development, without a stable release.
That status makes implementation change an explicit consideration. The 2026 MCP roadmap also identifies structured observability as a pre-RFC priority, acknowledging a gap that remains open. The enterprise must be able to export audit logs to the security information and event management tooling it already uses. A vendor dashboard is not a substitute for that integration.
What to look for in a gateway when the IdP is the authoritative source
Teams evaluating gateways should test whether directory authority governs access beyond the sign-in shown in an SSO demonstration. Directory groups and attributes synced over SCIM should decide access directly, without manual duplication into gateway records. Tool grants should narrow to named tools, annotations, and argument conditions, with explicit denials overriding conflicting grants. Client admission should expose whether the gateway uses CIMD or open DCR.
Revocation deserves separate tests for directory offboarding, an emergency stop for one person, and revocation of a client or session. Those are distinct operational cases. Audit records should identify the directory user and client, capture who granted what to whom and when, and record denied access as well as successful calls. Discovery capabilities should also be assessed against servers that never route through the gateway.
Deployment fit comes after those access requirements are clear. Tyk documents offline installation, and IBM ContextForge uses the Apache-2.0 licence for self-operated deployments. Amazon Bedrock AgentCore Gateway provides a managed option on AWS, while Kong AI Gateway offers a self-hosted plugin path and a hosted Konnect control plane. These deployment choices do not themselves establish how faithfully directory policy becomes runtime authorization.
SSO with a small server allowlist can be a reasonable proof-of-concept starting point. It establishes who may sign in while leaving broader access-review requirements unresolved. EMA, the stateless protocol core, and the shift from DCR to CIMD landed within months of each other, adding pressure to internally built governance.