Many teams believe that letting an automated tool talk directly to a PostgreSQL database is harmless because the tool uses a static service account and the connection appears in the database logs. The reality is that static credentials give every instance of the tool unrestricted, unchecked power, and the logs contain raw data that may violate FFIEC masking rules.
When an MCP server accesses Postgres without a control layer, three problems surface at once. First, the service account is often over‑privileged, allowing the server to read or write data it should not touch. Second, the database records the raw query and result, exposing personally identifiable information (PII) that FFIEC requires to be masked in audit artifacts. Third, there is no point where a human can approve a risky operation before it runs, nor a reliable replay of the session for examiners.
Why the missing control plane leaves you failing to meet FFIEC requirements
FFIEC expects financial institutions to demonstrate that every data access is authorized, that sensitive fields are protected in logs, and that a tamper‑evident record exists for each session. Without a gateway, the only evidence comes from the database’s native log, which does not mask columns, does not capture user intent, and can be altered by anyone with admin rights. The audit trail therefore fails two core FFIEC criteria: data confidentiality in audit records and verifiable access control.
Even if you add an identity provider to issue tokens for the MCP server, the token validation happens before the connection reaches Postgres. The token itself does not enforce column‑level masking, does not record the exact commands issued, and cannot intercept a dangerous statement before it reaches the engine. Those enforcement steps must happen on the data path, not merely at authentication.
How hoop.dev places enforcement on the data path
hoop.dev acts as a Layer 7 gateway that sits between the MCP server and the PostgreSQL endpoint. The gateway receives the authenticated request, inspects the wire‑protocol payload, and applies FFIEC‑required controls before the traffic reaches the database.
- Session recording: hoop.dev records every request and response, preserving a replayable audit trail that cannot be altered by the MCP server.
- Inline masking: hoop.dev masks configured sensitive columns in query results, ensuring that logs and recordings never expose raw PII.
- Just‑in‑time approval: hoop.dev can pause a high‑risk command and require a designated approver to confirm the action before it is forwarded.
- Command blocking: hoop.dev can reject statements that match a policy (for example, DROP TABLE or UPDATE on a protected table) before they execute.
All of these outcomes exist because hoop.dev sits in the data path. The setup phase – provisioning OIDC or SAML tokens, defining least‑privilege roles for the MCP service account, and deploying the gateway agent near the database – decides who may start a request, but it does not enforce the FFIEC controls. Only the gateway can enforce masking, approval, and immutable recording.
Mapping the architecture to FFIEC evidence requirements
FFIEC auditors look for three evidence artifacts:
- Proof of authorized access – a record that links a user or service identity to the specific operation.
- Protected audit logs – logs that hide PII while still showing the operation performed.
- Immutable session replay – a tamper‑evident capture of the entire interaction.
hoop.dev generates each artifact automatically. When an MCP server initiates a query, hoop.dev reads the OIDC token, attaches the identity to the session record, masks any configured columns in the response, and stores the full transcript in a secure backend. The resulting artifacts satisfy the auditor’s checklist without additional manual steps.
Getting started with hoop.dev for MCP servers
Begin by deploying the gateway using the official getting‑started guide. Configure the MCP server as a connection, point it at the PostgreSQL host, and define the masking rules for PII columns. The gateway will issue its own service credential to the database, keeping the original service account secret from the MCP code.
For deeper guidance on policy definition, session replay, and approval workflows, see the learn section. The repository contains the full open‑source implementation and example configurations.
FAQ
Do I need to modify my MCP server code to use hoop.dev?No. The server connects to the same PostgreSQL endpoint, but the host name points to the hoop.dev gateway. All enforcement happens transparently.Can I still use native PostgreSQL authentication?Yes, but hoop.dev recommends using its own credential store so that the MCP server never sees the database password.How long are session recordings retained?Retention is configurable in the backend store. The policy should align with your organization’s data‑retention requirements.
Ready to see the code? View the source on GitHub and start building an audit trail that meets FFIEC requirements for your MCP servers today.