Implementation Guide | Healthcare

    Preventing Snowflake MCP Agents from Returning HIPAA Safe Harbor Identifiers from De-identified Research Tables

    Use two layers. Snowflake-native controls (least-privilege roles, masking policies, row access policies, secure views) limit what the agent's role can read. Runtime policy on MCP tool calls and responses then decides, per interaction, whether to allow, redact, block or escalate, and records the decision. Neither layer establishes that data meets Safe Harbor. That determination stays with the covered entity.

    Runtime enforcement on MCP tool calls and responses

    1. 1

      Request inspection

      Evaluate tool name, arguments and generated SQL against policy: columns requested, filters on dates or geography, and joins across tables.

    2. 2

      Request outcome

      Allow the call, block it (for example, selecting a free-text column or joining tables outside an approved set), or escalate it for human approval.

    3. 3

      Response inspection

      Scan returned rows and text for identifier patterns, and check result shape, such as very small result groups that narrow to an individual.

    4. 4

      Response outcome

      Allow, redact matched values before they reach the agent, or block the whole response when redaction cannot be trusted.

    5. 5

      Escalation path

      Route ambiguous or high-risk calls to a named reviewer, and hold the call until a decision is recorded.

    6. 6

      Evidence record

      Write the decision, action, identity and time for every call and response.

    What the Safe Harbor standard asks of the data

    Under 45 CFR 164.514(b)(2), the Safe Harbor method requires removal of the listed identifiers of the individual and of the individual's relatives, employers and household members. The covered entity must also have no actual knowledge that the remaining information could identify a person, alone or in combination. HHS guidance adds that a data set stripped of the enumerated identifiers must not contain unique identifying features.

    Three consequences follow for agent design. The standard is about the data, not the tool, so no runtime control can make a data set Safe Harbor de-identified. The 'alone or in combination' language means combined or joined results matter, not only single columns. And limited data sets are a different category with different conditions, including flow-down of restrictions to agents and subcontractors. Before connecting an agent, inventory which tables are Safe Harbor de-identified and which are limited data sets, because the policy you apply differs.

    Mapping the 18 identifier categories to leak points

    Build the mapping from the current text of 164.514(b)(2), as of November 2026, and keep the retrieval date with the mapping. For each category, record where an MCP-connected agent could receive or reconstruct it. In practice the leak points fall into four groups.

    The first is residual free-text fields. Clinical notes, comments and descriptions can carry names, contact details, device or vehicle serial numbers and other listed identifiers that were missed upstream. The second is quasi-identifiers: dates and geographic subdivisions smaller than a state appear as ordinary columns, and an agent can filter or group on them to narrow a population. The third is unique codes, including device and vehicle identifiers and serial numbers, and biometric identifiers, which are structured values that a query can select directly. The fourth is agent-generated joins, where two tables that are each acceptable produce a combined result that points to one person.

    Pattern-based detection handles the structured formats reasonably and the free-text and combination cases poorly. Dates, small geographic units and unique codes do not always match a fixed pattern, and 'could identify in combination' is not a pattern at all. Treat each group as a separate test case and do not assume a single detector covers them.

    What Snowflake-native controls handle, and where they stop

    Start at the data layer. Give the agent's role the narrowest grants possible, expose research data through secure views that omit columns the agent never needs, apply masking policies to sensitive columns, and use row access policies to limit which records are visible. These controls are deterministic, enforced by the warehouse, and should be in place regardless of anything built above them.

    Their limit is the vantage point. They evaluate access for a role at query time. They do not inspect what the agent asked for in its tool-call arguments, the intent behind a generated query, or the content of what comes back and is handed to a model. A masking policy cannot tell that a free-text column returned an unmasked name, and a role grant cannot tell that a sequence of narrow queries is narrowing toward one person. If an agent's role is allowed to read a column, the warehouse will return it.

    The practical conclusion is that data-layer controls define the ceiling of what can be exposed, and runtime enforcement governs what the agent actually requests and returns within that ceiling. Confirm the exact behavior of each Snowflake and MCP server feature you rely on against current vendor documentation.

    Choosing an outcome for each leak path

    Define the outcome per identifier category and per leak path, and document why each rule exists so a reviewer can follow the reasoning. A reasonable starting posture is below, to be tuned against your own tables and test results.

    • Structured unique codes and device, vehicle or biometric identifiers: Block requests that select them directly. Redact matching values in responses as a second check.
    • Free-text fields: Block by default. If a use case requires them, redact on response and escalate, accepting that detection will miss some content.
    • Dates and geographic subdivisions: Apply request-side rules on granularity and filters, since format matching alone will not catch narrowing.
    • Agent-generated joins: Allow only approved join paths, and evaluate the combined result, not each table alone.
    • Unexpected tool arguments or instructions embedded in returned content: Treat returned text as untrusted input and block or escalate calls that diverge from the approved task.
    • Test and tune: Run each leak path as a separate test set and record the detection misses you observe, so the failure modes are known and documented.

    Evidence for audit controls under 164.312(b)

    Audit controls are only useful if a reviewer can reconstruct what the agent was allowed to do and what it did. For each tool call and response, record the policy that applied, the decision (allow, redact, block, escalate), the redaction action taken, the identity of the agent and the user or service behind it, and a timestamp. Where a human approved a call, record the approver and outcome as well.

    Specify the exact record fields with your compliance team against the regulatory text before building, and confirm they accept the format for 164.312(b). Keep the retention period and data residency of this evidence under your own control, since it describes access to research data.

    Two scope limits apply. This evidence shows enforcement at the tool-call layer. It does not prove dataset provenance or trace a whole agentic workflow end to end, and it does not demonstrate that the underlying data meets Safe Harbor.

    Where Trussed fits, and the tradeoffs

    Trussed is one option for the runtime layer. It enforces policy in the execution path across models, agents, tools and MCP servers, with allow, redact, block, rate limit and escalate-for-human-approval outcomes applied to individual interactions and tool calls. Enforcement produces audit-ready evidence mapped to HIPAA, and it can be deployed self-managed in the customer cloud with configurable retention and data residency. Trussed runs in production with healthcare and pharma organizations. It does not make a data set de-identified and does not by itself establish HIPAA compliance.

    Whichever enforcement layer you choose, expect tradeoffs. Aggressive redaction reduces research utility and can corrupt legitimate values. Response scanning adds latency to each call. Escalation adds reviewer workload and needs clear ownership. Ask any vendor for the documented detection failure modes on free text, dates and unique codes, and what evidence is recorded per call, then test those claims on your own data.

    Defense in depth for MCP-to-Snowflake access

    Data layer

    Roles, masking, row access policies and secure views limit what the role can read.

    Tool-call request

    Policy inspects the agent's arguments and generated query before execution.

    Tool-call response

    Policy inspects returned rows and text before the agent or user sees them.

    Decision

    Allow, redact, block, or escalate for human approval.

    Evidence

    Each decision is recorded with identity, action and timestamp.

    See how enforcement on MCP tool calls produces evidence

    Walk through allow, redact and block decisions on agent requests and responses, and the audit-ready evidence each one generates.

    See How Evidence Is Produced
    Next step

    How does your AI governance program compare?

    See where your program has gaps in less than 2 minutes.