AI Agents & MCP Server
Relevant source files
The following files were used as context for generating this wiki page:
Hoop provides a secure layer 7 gateway designed to manage and audit access to production infrastructure for both human engineers and AI agents. The AI Agents & MCP (Model Context Protocol) Server feature allows AI coding assistants—such as Claude Code or Cursor—to interact with databases, Kubernetes clusters, and servers while remaining subject to the same security guardrails, data masking, and human approval workflows as human users.
Sources: README.md:14-25, README.md:154-159
By using the MCP Server, Hoop acts as a bridge that inspects AI-generated payloads, masks PII in JSON responses before they reach the agent, and blocks dangerous operations (e.g., destructive DDL) at the protocol layer. This ensures that autonomous agents operate within a governed environment where every action is logged and risk-scored.
Sources: README.md:120-128, README.md:162-167
Architecture & Integration
The Hoop gateway parses wire protocols (PostgreSQL, MySQL, SSH, etc.) in real-time. When an AI agent connects via the MCP server, it authenticates using OAuth 2.1 or dedicated agent keys, inheriting the permissions and ABAC rules of the human user or service account it represents.
Sources: README.md:88-102, README.md:175-180
The following diagram illustrates the flow of a request from an AI Agent through the Hoop Gateway to the target infrastructure:
Sources: README.md:88-102, README.md:120-128
AI Agent Identities
AI Agent Identities are scoped, auditable credentials created specifically for programmatic access. These identities allow for the deactivation and reactivation of access keys without affecting the primary user account.
Sources: webapp_v2/src/pages/AiAgentsIdentities/index.jsx:45-50
| Feature | Description |
|---|---|
| Masked Keys | Displayed in a truncated format to maintain security in the UI. |
| Revocation | Agents can be "revoked" (deactivated), disabling their keys immediately. |
| Audit Trail | Tracks "Created by", "Created at", and "Last used at" for every agent identity. |
| Scoped Access | Agents inherit permissions from the user or group they are mapped to. |
| Sources: webapp_v2/src/pages/AiAgentsIdentities/index.jsx:87-120, README.md:175-180 |
MCP Server Implementation
The Model Context Protocol (MCP) server provides a standardized way for AI agents to discover and use "tools" (commands/queries) exposed by the Hoop gateway.
Configuration
To use the MCP server, users typically add Hoop's MCP endpoint to their configuration file (e.g., .mcp.json).
Sources: webapp_v2/src/pages/AiAgentsIdentities/Created/index.jsx:62-65
{
"mcpServers": {
"hoop": {
"type": "http",
"url": "https://<your-gateway>/api/mcp",
"headers": {
"Authorization": "Bearer <AGENT_KEY>"
}
}
}
}
Sources: webapp_v2/src/pages/AiAgentsIdentities/Created/index.jsx:13-25
Administrative Controls
Hoop provides administrative CLI commands to manage the MCP server state and authentication requirements:
hoop admin mcp auth enable: Enables mandatory authentication for the MCP server.hoop admin mcp auth configure: Sets the canonical resource URI and groups claim for RFC 8707 audience binding.hoop admin mcp auth status: Checks the current authentication status of the MCP server.
Sources: client/cmd/admin/admin.go:21-34
Security Guardrails & Data Masking
AI agents are subject to the same inline controls as human users. This is critical for preventing "3 AM" destructive operations by autonomous agents.
Sources: README.md:57-65
Proactive Prevention
The gateway parses the command before it reaches the database. If an agent attempts a destructive operation like DROP TABLE orders, the gateway blocks it based on configured guardrail policies.
Sources: README.md:67-75, README.md:112-115
ML-Powered Data Masking
Unlike regex-based masking, Hoop uses ML-powered classification to understand context. When an agent queries a database, the gateway identifies PII, PHI, or PCI data and masks it before it is returned to the agent's LLM context.
Sources: README.md:107-111, README.md:124-126
Sources: README.md:43-55, README.md:120-128
Summary
The AI Agents & MCP Server integration transforms the Hoop gateway into a governance layer for autonomous systems. By standardizing access through the MCP protocol and enforcing existing human-centric security policies (masking, guardrails, and approvals), Hoop enables teams to grant AI agents production access safely. Every agent action is recorded as a session, allowing for full replay and auditability, ensuring that "Agentic usage" is as transparent and controlled as traditional human access.
Sources: README.md:120-128, README.md:154-159, README.md:175-184