All posts

A Guide to Human-in-the-Loop Approval in MCP

When every MCP request that could affect production data is vetted by a human before execution, teams enjoy confidence that accidental or malicious changes are caught early, compliance evidence is collected automatically, and the blast radius of a mistake is dramatically reduced. This level of confidence hinges on a reliable human-in-the-loop approval workflow that sits transparently between the calling agent and the target service. The workflow should be invisible to the developer, enforceable

Free White Paper

Human-in-the-Loop Approvals + Approval Chains & Escalation: The Complete Guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free. No spam. Unsubscribe anytime.

When every MCP request that could affect production data is vetted by a human before execution, teams enjoy confidence that accidental or malicious changes are caught early, compliance evidence is collected automatically, and the blast radius of a mistake is dramatically reduced.

This level of confidence hinges on a reliable human-in-the-loop approval workflow that sits transparently between the calling agent and the target service. The workflow should be invisible to the developer, enforceable at the protocol level, and capable of recording the full interaction for later review.

Why human-in-the-loop approval matters for MCP

Many organizations expose MCP (Model‑Control‑Plane) endpoints directly to AI agents or automated scripts. In that model, an agent can issue commands, retrieve data, or modify configurations without any checkpoint. The convenience is real, but the risk is equally real: a mis‑prompted model may issue a destructive SQL statement, a rogue script could exfiltrate sensitive fields, and auditors are left with no trace of what actually happened.

Even when identity providers such as Okta or Azure AD are used to authenticate the agent, the authentication step only proves who is making the request. It does not guarantee that the request itself is safe, nor does it create a tamper‑evident log of the transaction. The missing piece is a gateway that can enforce human‑in‑the‑loop approval on the data path.

Current practice without a gateway

Typical deployments configure the MCP server with static credentials and let agents connect directly over HTTP or gRPC. Engineers grant standing access to service accounts, and the agents inherit those permissions for the lifetime of the container. The result is a “set‑and‑forget” model: once the credential is stored, any code that can reach the network can issue privileged calls without additional checks.

This approach satisfies the setup requirement, identity is verified, least‑privilege roles are assigned, and OIDC tokens are presented, but it leaves the data path completely open. There is no place to insert an approval step, no way to mask fields before they leave the service, and no session recording that survives a container restart.

hoop.dev as the enforcement layer

Enter hoop.dev, an open‑source Layer 7 gateway that sits between the MCP client and the target service. hoop.dev acts as the only point where traffic can be inspected, altered, or blocked. Because it is the data path, every enforcement outcome, such as prompting a human reviewer, masking sensitive columns, or rejecting dangerous commands, originates from hoop.dev.

Continue reading? Get the full guide.

Human-in-the-Loop Approvals + Approval Chains & Escalation: Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.

When an MCP request arrives, hoop.dev authenticates the caller via OIDC, extracts group membership, and checks the request against a policy that can require a human to approve the operation. If approval is needed, the request is paused, a notification is sent to the designated reviewer, and the operation proceeds only after an explicit “allow”. While waiting, the request is logged, preserving the intent and the exact payload for audit purposes.

Once approved, hoop.dev forwards the request to the downstream service. It can also apply inline data masking on the response, ensuring that sensitive fields never leave the perimeter in clear text. Every session, request, approval, response, and any masking actions are recorded in an audit log that can be replayed for compliance reviews.

Practical steps to enable human-in-the-loop approval

  • Deploy the hoop.dev gateway using the getting‑started guide. The deployment includes a network‑resident agent that runs close to your MCP server.
  • Register your MCP endpoint as a connection in hoop.dev, supplying the host, port, and service credentials. The gateway stores the credential; the client never sees it.
  • Define an approval policy that targets the MCP methods you consider high‑risk, e.g., any mutation of production tables or changes to model configuration. The policy tells hoop.dev to invoke a human‑in‑the‑loop approval workflow for those calls.
  • Configure a notification channel (email, Slack, or a ticketing system) where reviewers receive approval prompts. hoop.dev handles the routing; you only need to set up the endpoint.
  • Update your MCP client configuration to point at the hoop.dev proxy address instead of the direct service URL. The client continues to use its standard library calls, unaware that a gateway sits in the middle.

All of the above is described in detail in the learn section, where you can explore policy syntax, approval UI options, and session‑replay tools.

Benefits of the hoop.dev approach

By placing human-in-the-loop approval at the gateway, you gain:

  • Fine‑grained control: Only the operations you flag require a human, keeping day‑to‑day automation fast.
  • Auditability: Every request, approval decision, and response is stored in an audit log, ready for SOC 2 or internal reviews.
  • Data protection: Inline masking removes sensitive fields before they leave the network, reducing exposure risk.
  • Zero credential exposure: The gateway holds the service credential; agents and users never see it.

FAQ

Q: Does hoop.dev replace my existing identity provider?
A: No. hoop.dev consumes OIDC tokens from your IdP to identify the caller. It adds enforcement on the data path without altering your identity infrastructure.

Q: Can I use hoop.dev with existing MCP clients?
A: Yes. Clients continue to use their standard libraries; you only change the endpoint address to point at the gateway.

Q: How does the approval notification work?
A: hoop.dev integrates with common webhook targets. When a request matches an approval rule, it posts a payload to the configured endpoint, and the reviewer’s response is sent back to the gateway to unblock the request.

Ready to add human‑in‑the‑loop approval to your MCP workloads? Explore the source code and contribute on GitHub: github.com/hoophq/hoop.

Open source

Save the open-source gateway for agent data access

Hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.

Star and save the repo →More posts