Why RBAC matters for an MCP gateway
What does fine‑grained role‑based access control look like for an MCP gateway? In many organizations the gateway is treated like any other network endpoint: a shared service account or static token is created, the same credential is handed to every developer, and the gateway simply forwards traffic to the underlying model‑code‑processing (MCP) server. That approach gives everyone full read and write rights, makes it impossible to answer who executed a particular request, and leaves sensitive data exposed in logs and responses.
Even when teams adopt an identity provider and issue per‑user tokens, the request still travels directly to the MCP server. The gateway does not inspect the payload, does not enforce any role policies, and does not keep a record of the command that was run. The result is a blind spot: you know a user authenticated, but you have no evidence of what they did once the connection was established.
Setting the stage for RBAC
The goal is to introduce role‑based access control without changing the MCP server itself. The precondition is that identity is already federated via OIDC or SAML, so each user can be uniquely identified and assigned to groups. However, the request still reaches the MCP server unmediated, with no audit trail, no inline data masking, and no way to block disallowed operations. Identity alone is necessary but not sufficient to enforce the principle of least privilege.
hoop.dev as the data‑path enforcement point
hoop.dev sits in the Layer 7 data path between the caller and the MCP gateway. It verifies the OIDC token, extracts group membership, and then applies a configurable RBAC policy before any request is forwarded. Because the enforcement happens at the gateway, hoop.dev can:
- allow or deny a command based on the caller’s role,
- record the full request and response for replay and audit,
- mask sensitive fields in the MCP response according to policy, and
- require a human approval step for high‑risk operations.
All of these outcomes are possible only because hoop.dev is the only component that sees the traffic before it reaches the MCP server. The identity provider supplies the token (the setup), but hoop.dev is the gateway that enforces RBAC and produces the audit evidence.
Designing an RBAC policy for MCP
Start by mapping business functions to roles: for example, model‑developer, model‑operator, and audit‑viewer. Each role is granted a set of allowed MCP commands – such as run, deploy, or list‑models. The policy also defines which response fields may be redacted for each role, protecting secrets that the MCP server might return.
When a user initiates a request, hoop.dev checks the caller’s role against the policy. If the command is permitted, hoop.dev forwards it; if not, the request is blocked and an event is logged. For commands that are allowed only with explicit consent, hoop.dev can pause the request, route it to an approver, and continue once approval is granted.
