By NHI Mgmt Group Editorial TeamBased on Obot: “Access Control, Security, & Proxying in Obot” (February 5, 2026)

TL;DR: Securing an MCP gateway centers on centralized authentication, role-based access control, proxy enforcement, encrypted credential handling, and full audit logging, according to Obot. The deeper lesson is that MCP governance fails when access, secrets, and telemetry are treated as separate problems instead of one identity control plane.


At a glance

What this is: This is a security-focused Obot guide on MCP gateway deployment that says access control, credential handling and auditing must be treated as one control plane.

Why it matters: It matters because IAM teams need consistent governance for MCP access paths, especially where AI agents, users and third-party tools all touch the same enterprise systems.


Context

MCP gateways sit between clients and servers, so they become the decision point for authentication, authorization, credential handling and auditability. In practice, that means the gateway is not just a routing layer. It is an identity enforcement layer for how MCP traffic reaches enterprise systems.

The security problem is not a single control failure. It is the combination of exposed connection URLs, scattered API keys and tokens, and incomplete visibility into what users or agents actually did. For teams governing NHI, human IAM or emerging agentic access, the question is whether the gateway can enforce policy before requests reach the server.

Obot frames this as a layered model because access, secrets and telemetry only work when they are managed together. That is the right lens for any MCP deployment that must satisfy operational security and audit expectations at the same time.


Key questions

Q: Where does MCP security fail when access is open by default?

A: It fails when any user with a connection path can discover and reach servers without explicit entitlement mapping. In MCP environments, discovery is itself an access decision, so broad defaults create unnecessary exposure. Teams should design for least visibility first, then allow only the servers required for a role or group.

Q: Why do MCP gateways need both RBAC and audit logging?

A: RBAC decides what an authenticated user can do, while audit logging proves what happened after that decision. Without RBAC, too much access is available; without logs, you cannot reconstruct use, misuse or investigation context. Together they create enforcement plus evidence, which is essential when MCP reaches enterprise systems.

Q: What are the signs that MCP credential handling is too exposed?

A: The warning signs are API keys, tokens and session details stored in config files, on laptops or in shared environment variables, especially when key management is not separated from data storage. Those patterns create a broad, hard-to-review exposure surface and make offboarding, incident response and compliance evidence much harder.

Q: Should organisations centralise MCP access through a proxy layer?

A: Yes, when multiple clients or third-party servers are in scope. A proxy gives security teams one place to enforce policy, isolate user sessions and capture activity for review. It is most valuable when the same MCP environment must support access control, secret handling and auditability without fragmenting those duties across servers.


Technical breakdown

Why MCP gateways become identity enforcement points

An MCP gateway is the control plane that sits in front of MCP servers and decides which client requests can proceed. When it authenticates users through an identity provider, maps group membership to roles, and limits server visibility through registries, it turns a flexible protocol into a governed access path. The technical issue is not the transport itself, but that MCP servers often expose enterprise systems with varied sensitivity. Without a gateway, every downstream server must solve identity, authorization and auditing independently, which fragments enforcement and weakens oversight.

Practical implication: Treat the gateway as a policy enforcement layer, not a convenience proxy, and define which access decisions must happen before any server connection is allowed.

How RBAC and registries narrow MCP exposure

Role-based access control handles what an authenticated user can do, while MCP registries control which servers are even visible to that user. That distinction matters because authentication only proves who someone is; it does not limit which tools, data sources or operational paths they can reach. Fine-grained registries reduce accidental exposure by mapping server entries to specific users or groups, and separating an Auditor role adds read-only visibility for sensitive bodies without broadening operational access. The practical design choice is to constrain discovery as tightly as execution.

Practical implication: Separate visibility from capability so users cannot discover or reach MCP servers beyond their business role.

Why proxying and audit logging have to stay coupled

The proxy layer is doing three jobs at once: enforcing policy, isolating user sessions and capturing requests, tool calls and responses for audit. That coupling matters because audit logs are only useful if the gateway has already validated the request path and preserved a trustworthy record of what crossed it. Credential management adds another layer by encrypting sensitive data at rest and separating key management through external KMS integration. In other words, the control objective is not just storage protection, but preserving chain-of-custody for MCP interactions and the secrets behind them.

Practical implication: Use the same gateway flow to enforce access, protect credentials and record activity so investigations are not blind to either input or outcome.


  • Smithery.ai MCP hosting breach 2025: A Smithery.ai build flaw gave GitGuardian a live fly.io token controlling 3,000+ hosted MCP servers and the API keys their clients sent.
  • LiteLLM MCP auth bypass 2026: An exploited LiteLLM MCP auth bypass and default sk-1234 master keys let attackers steal AI gateway master and provider API keys.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

MCP governance fails when identity is treated as a front-door problem instead of a runtime control plane. A gateway that authenticates users but does not govern server visibility, request forwarding and audit capture still leaves material exposure. The article correctly places all three functions together because MCP traffic touches enterprise systems, not just chat interfaces. The practitioner takeaway is that MCP access policy has to travel with the request path.

Credential sprawl is the operational weak point that turns MCP into an NHI problem. API keys, tokens and session details scattered across laptops, config files and environment variables are not separate hygiene issues. They become a single exposure surface once MCP clients and servers are connected through a shared gateway. The right governance response is to treat those secrets as part of the same access model, not as an afterthought to authentication.

Audit logging is no longer a compliance add-on when MCP can reach live enterprise systems. If tool calls and responses are not captured with enough fidelity, security teams lose the ability to reconstruct who accessed what, through which server and with which parameters. That makes debugging, incident review and policy attestation converge on the same control. The implication is straightforward: no auditable MCP architecture should rely on fragmented logs or partial metadata.

Granular registries are the practical answer to the identity blast radius problem. A default 'everyone' group makes the control plane look simple while widening the actual exposure set. Mapping MCP servers to specific users and groups keeps discovery aligned with business need and prevents broad reach from becoming the norm. Practitioners should treat registry design as a governance decision, not a UI setting.

Identity, secrets and telemetry form one governance system, not three separate projects. The article’s strongest insight is that access control alone cannot secure MCP if credential storage and audit evidence are handled elsewhere. Once those controls are unified, policy becomes enforceable, reviewable and supportable. The field should increasingly evaluate MCP security as an integrated identity architecture problem, not a protocol tuning exercise.

From our research library:

  • 24,008 unique secrets were exposed in MCP configuration files in 2025 alone, the protocol's first year of widespread adoption, according to the State of Secrets Sprawl 2026.
  • Only 44% of developers are reported to follow security best practices for secrets management, exposing a significant developer behaviour gap, according to the State of Secrets in AppSec.
  • Read next: MCP Security Guide

What this signals

Identity, secrets and telemetry converge at the MCP gateway. Once a gateway sits between clients and servers, it stops being a transport concern and becomes the place where access is granted, secrets are handled and activity is proved. Security teams should assess MCP deployments as a control plane problem, not as a collection of isolated server settings.

Audit evidence is part of the security design, not a post-incident convenience. If tool calls, request bodies and responses are not captured in a way that supports investigation and compliance, the gateway cannot prove what actually happened. That shifts MCP security from a configuration task to an evidence-retention requirement.


For practitioners

  • Define gateway-enforced access policy Map each MCP server to explicit user and group entitlements before allowing discovery or connection, and remove any broad default visibility paths that exceed business need.
  • Separate visibility from execution rights Use RBAC so authenticated users only see the servers and functions they are meant to use, while reserving sensitive request and response access for an explicitly assigned Auditor role.
  • Route all MCP traffic through one proxy path Force client-to-server interactions through a single proxy layer so policy checks, user isolation and request filtering are consistently applied before any tool call reaches a server.
  • Encrypt secrets and isolate key management Store passwords, API keys, OAuth tokens and session details with encryption at rest, and keep cryptographic keys in an external KMS rather than alongside application data.
  • Export audit logs into your monitoring stack Preserve full tool-call, request and response metadata for compliance review, then feed exports into SIEM workflows so investigations can correlate MCP activity with wider security events.

Key takeaways

  • MCP gateway security is really about controlling identity, exposure and evidence in one place rather than treating them as separate implementation tasks.
  • The main risk comes from default visibility, scattered secrets and incomplete logs, which together make MCP access hard to govern at scale.
  • Practitioners should design the gateway as an enforcement layer that limits discovery, protects credentials and preserves auditable interaction records.

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 and MITRE ATT&CK address the attack and risk surface, while NIST SP 800-53 Rev 5, NIST CSF 2.0 and CSA Cloud Controls Matrix set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-04 — Insecure AuthenticationThe article centres on authenticating users before MCP access is granted.
NHI-05 — Overprivileged NHIRegistry design and role mapping are about constraining excess access to MCP servers.
NHI-02 — Secret LeakageThe article highlights API keys, tokens and session details as exposed secrets that need protection.
Recommendation — Apply NHI-04 to require authenticated, policy-checked access before any MCP server connection is allowed. Reduce overprivilege by mapping MCP server visibility and actions to explicit roles and groups. Treat exposed API keys and tokens as NHI secret leakage and encrypt them with separated key management.
NIST SP 800-53 Rev 5AC-6 — Least PrivilegeLeast privilege governs role scoping and the separation of auditor access from operational access.
Recommendation — Enforce least privilege so MCP users only see and use the servers and functions required for their role.
NIST CSF 2.0PR.AA-05 — Access Permissions, Entitlements and AuthorizationsThe post is fundamentally about entitlement mapping and access enforcement for MCP traffic.
Recommendation — Define entitlements for MCP users and servers before connection is permitted, and review them regularly.
CSA Cloud Controls MatrixIAM — Identity and Access ManagementThe gateway is described as a cloud access control plane for users and servers.
Recommendation — Use IAM governance to centralise authentication, authorisation and access review for MCP deployments.
MITRE ATT&CKTA0006;TA0008 — Credential Access; Lateral MovementUncontrolled MCP access and exposed secrets create paths for credential abuse and movement to enterprise systems.
Recommendation — Map MCP exposure to credential access and lateral movement tactics, then monitor gateway logs for suspicious server reach.

Key terms

  • MCP Gateway: The control layer that relays assistant intent to tools and data sources through the Model Context Protocol. In practice, it becomes a policy boundary, not just a transport layer. If it trusts model output too early, it can turn unverified reasoning into real-world execution or disclosure.
  • Role-Based Access Control: A model that grants permissions by assigning identities to predefined roles. It works well when jobs are stable and access patterns are predictable, but it becomes brittle when exceptions pile up. In practice, role design must stay small enough to audit and broad enough to avoid endless custom variants.
  • Audit Logging: Audit logging records identity and access events in a way that supports review, investigation, and compliance evidence. In enterprise SaaS, logs need to be durable, interpretable, and available to security teams. Webhooks are useful for app events, but they are not automatically enterprise-grade audit evidence.
  • Credential Separation: Credential separation keeps sensitive tokens, session data and cryptographic keys from living in the same place as the application or its logs. That reduces blast radius when a gateway, server or developer environment is exposed.

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 responsible for identity security strategy or NHI governance in your organisation, it is worth exploring.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 20, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org