By NHI Mgmt Group Editorial TeamBased on Opal Security: “OAuth for Opal MCP: give agents access, not a standing key” (August 11, 2026)

TL;DR: Opal Security says its MCP servers now use OAuth 2.1 with PKCE so each person signs in through a browser, receives a short-lived scoped token, and avoids long-lived bearer secrets in configs. That moves MCP access from static credentials to governed grants, which is the correct identity model for agents.


At a glance

What this is: This is an analysis of Opal Security’s move to OAuth-based MCP access, replacing stored bearer tokens with browser-based sign-in, scoped short-lived tokens, and revocable grants.

Why it matters: It matters because identity teams need MCP access to follow the same governance model as other non-human access paths, with scoped authorization, auditability, and revocation instead of shared static secrets.

👉 Read Opal Security's OAuth for MCP analysis on governed agent access


Context

MCP access becomes an identity governance issue the moment a client connection is treated as a standing credential instead of a governed grant. In this model, the question is not whether a tool can connect, but whether the connection can be issued, scoped, reviewed, and revoked like any other access path.

Opal Security’s article argues that browser-based sign-in and short-lived tokens are a better fit for MCP than pasted bearer secrets because they remove the persistence problem from configuration files. That is especially relevant when agents are acting inside access workflows, where the connection itself is part of the control plane.

For IAM and NHI teams, the practical shift is from secret management to grant governance. The control focus moves to authorization code flow, scoped token issuance, revocation, and audit trail integrity rather than token distribution.


Key questions

Q: How should security teams govern MCP OAuth flows in enterprise environments?

A: Treat MCP OAuth as an identity control plane, not a convenience layer. Bind authorization state to the initiating session, display clear consent context, restrict redirect URIs, and review every proxy-style client registration. If the server cannot prove who initiated the request and where the callback should go, it should not issue a usable authorization code.

Q: Why are long-lived tokens a governance problem for MCP clients?

A: Long-lived tokens create secret persistence outside normal identity controls. They are easy to copy, hard to attribute cleanly, and often survive role changes or project handoffs. That turns a personal connection into durable access that outlives the original approval, which is why lifecycle handling matters as much as the initial grant.

Q: What signs show that MCP access is still being handled like a secret instead of a grant?

A: Look for Authorization headers in configs, manually pasted tokens, shared onboarding snippets, and any client that cannot refresh access without human handling. Those patterns show the connection is being managed as a static credential. Mature governance should expose revocation, scoping, and ownership at the grant layer instead.

Q: When should teams keep using API tokens for MCP clients?

A: Use API tokens only when the client is non-interactive and cannot complete a browser-based sign-in flow. For people-driven MCP access, OAuth is the better control because it preserves user attribution, scoped authorization, and revocation. The decision point is actor type, not convenience or implementation familiarity.


How it works in practice

Why bearer tokens fail as MCP connection credentials

A bearer token is a reusable secret that authenticates whoever presents it, so it behaves like a standing key rather than a governed access event. In MCP deployments, that means the client config becomes the durable storage point for access, which increases exposure through copy-paste, reuse, and revocation delay. OAuth 2.1 with PKCE changes the credential shape: the browser handles user sign-in, the token is short-lived, and the client refreshes it without storing a long-lived secret in the config. That is not just a transport change; it is a shift from static credential handling to lifecycle-managed authorization.

Practical implication: Treat any MCP connection that still depends on a pasted bearer token as a secret lifecycle problem, not a client setup detail.

How scoped grants change MCP governance

OAuth does not just authenticate the user. It binds the client to a grant that can be limited by account, server, and permission set, then revoked independently of the application. That matters because MCP servers often sit between a person and privileged workflows such as access requests, provisioning, and audit evidence retrieval. When the agent acts as the signed-in person, the governance model becomes consistent with least privilege and traceable approvals. The access decision is no longer hidden inside a shared token; it is exposed as an explicit grant that can be monitored and withdrawn.

Practical implication: Model MCP access as revocable authorization grants and map each server to the minimum permission scope required.

Why manual token handling breaks lifecycle control

The original token-based pattern places issuance, storage, rotation, and revocation on the user or administrator, which creates uneven hygiene and encourages reuse across people or scripts. Opal Security’s support for OAuth across End User, Admin Provisioning, and Admin Audit servers shows the architectural pressure to separate interactive user grants from non-interactive script access. That distinction matters because non-interactive clients may still need API tokens, while human-operated MCP clients should move to federated sign-in. The control boundary is whether the connection is personal, scoped, and revocable rather than shared and persistent.

Practical implication: Separate interactive MCP access from script access and remove any shared secret pattern from human-operated clients.


NHI Mgmt Group analysis

OAuth for MCP is a grant-governance problem, not just an authentication upgrade. The important change is that access is now issued through a browser-mediated grant with a clear owner, scope, and revocation path. That aligns MCP with lifecycle governance instead of treating it like a static integration secret. For practitioners, the implication is that MCP access should be reviewed as an authorization event, not a configuration artifact.

Standing bearer tokens create identity debt in agent workflows. A pasted token is personal only until it is copied, shared, or forgotten, at which point it becomes an unowned access path. That is exactly the kind of persistence NHI governance is meant to eliminate. The field should treat token-in-config patterns as a governance failure, not a convenience trade-off.

Scoped OAuth grants make auditability meaningful for agent actions. When the agent acts as the signed-in person, the resulting activity can inherit the same approvals and logs as the human account behind it. That improves accountability because the access path is explicit rather than implied by a hidden secret. The practitioner takeaway is that traceability should attach to the grant, not to the client binary.

MCP access is now part of the NHI lifecycle boundary. If a client can request, refresh, and revoke access on behalf of a person, then the access pattern belongs inside identity governance, not outside it in developer configuration. That boundary matters for policy, because governance teams need to decide which MCP connections are interactive grants, which are scripts, and which are simply unacceptable long-lived secrets.

Static secret handling is the wrong baseline for agent-era access. The article shows why the default assumption should be short-lived, revocable, and scoped access, with bearer tokens reserved for narrow non-interactive cases. That shifts the category away from credential storage and toward governed delegation. Practitioners should reclassify MCP access accordingly.

From our research library:

What this signals

Ephemeral credential governance is now the right design goal for MCP. Browser-mediated sign-in, short-lived tokens, and explicit revocation close the gap between tool access and identity governance. Teams that still allow pasted bearer secrets should treat the configuration layer as part of the attack surface, not a neutral transport detail.

Standing credential patterns do not survive agent-era workflows well. Once access is shared across people, scripts, and agents, a token no longer represents a single accountable actor. The practical response is to separate interactive grants from automation and to make revocation visible at the server boundary.


For practitioners

  • Replace pasted MCP tokens with OAuth grants Move human-operated MCP clients to browser sign-in with short-lived scoped tokens and remove shared bearer secrets from configuration files.
  • Separate interactive and script-based MCP access Use OAuth for users and reserve API tokens only for non-interactive clients where federation is not practical, so the access model matches the actor type.
  • Review MCP grants as access decisions Track who approved each grant, what server it applies to, and how it is revoked so the connection is governed like any other identity event.
  • Audit for long-lived secrets in MCP configs Search client configs, deployment variables, and shared onboarding docs for bearer headers or copied tokens that should no longer exist.

Key takeaways

  • MCP access should be governed as a scoped authorization grant, not as a static secret embedded in client configuration.
  • Bearer tokens create persistence and ownership problems that become more serious when agents and humans share the same access path.
  • Short-lived OAuth grants improve auditability, revocation, and accountability, especially when MCP is used inside access workflows.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 provides the primary governance reference for this term.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-02 — Secret LeakageThe article centres on avoiding bearer secrets in MCP configs.
Recommendation — Remove pasted MCP tokens from configs and move human clients to revocable OAuth grants.

Key terms

  • OAuth Grant: An OAuth grant is the delegated permission an application receives to act on a user's behalf without storing the user's password. In NHI governance, it should be treated as a standing identity relationship with scope, ownership, and revocation requirements, not as a one-time setup detail.
  • Bearer Token: A bearer token is a credential that grants access to whoever possesses it, without requiring strong proof that the holder is the intended client. In NHI environments, that makes theft and replay the main risk, especially when tokens are long-lived, broadly scoped, or stored in local files.
  • Short-Lived Scoped Token: A short-lived scoped token is an access credential that expires quickly and only authorizes specific actions or resources. For MCP, it is the practical boundary that replaces standing access with task-limited permission, reducing blast radius when a client or agent is compromised.
  • PKCE: Proof Key for Code Exchange is a binding mechanism that links the authorization request to the later token exchange. It helps stop authorization code interception and injection by requiring proof that the same client that started the flow is the one completing it.

What's in the full announcement

Opal Security's full post covers the operational detail this post intentionally leaves for the source:

  • Browser sign-in flow specifics for MCP clients using OAuth 2.1 with PKCE
  • Per-server support details for End User, Admin Provisioning, and Admin Audit connections
  • Manual setup steps for clients that still need API tokens for non-interactive use
  • How users review and revoke their own OAuth grants inside the product

👉 Opal Security's full post covers the MCP sign-in flow, grant handling, and client setup details.

Deepen your knowledge

NHI governance, agentic AI identity, and machine identity lifecycle are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an IAM programme, it is worth exploring.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 14, 2026.
Updated on October 7, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org