Implementation Guide | Healthcare

    Detecting an AI Agent Accessing VIP or Employee-Patient Records Through an MCP Server

    Treat each MCP tool call as the control point. For every call, capture the agent identity, the delegated human user, the tool and arguments, the sensitivity flags on the records involved, and the response contents. Evaluate those against policy before data is returned, and decide to allow, redact, block, or escalate for human approval. Retain the request, the decision and the response evidence so you can support HIPAA audit controls review and incident investigation.

    Where detection and enforcement sit in the execution path

    1. 1

      Agent and client

      Where the delegated user and task context originate. Carry them with each call.

    2. 2

      Tool-call interception

      Evaluate the request: tool, arguments, identity, purpose.

    3. 3

      MCP server and data store

      Apply least privilege to tool scope and data access.

    4. 4

      Response inspection

      Check returned fields for restricted-record flags and content before release.

    5. 5

      Evidence store

      Record request, decision and response outcome durably.

    Why existing snooping controls miss agent access

    Healthcare organizations protect VIP patients and patients who are also employees with break-the-glass prompts, flagged-record alerts and snooping reviews. These controls assume a human user working in an EHR application session. The user is authenticated, the screen is the point of access, and the audit trail names a person.

    A data MCP server changes that path. It exposes tools, such as record lookup or search, that an AI agent can call directly. The agent may be acting for a clinician, a billing analyst or an automated workflow. If the server records only a service account, or the EHR sees only the server's credentials, the audit trail shows that something retrieved a record but not which agent did it, for whom, or why. A restricted record can be returned without ever passing through the interface where the break-the-glass control lives.

    The gap is therefore one of attribution and placement. Detection built around human sessions cannot see the agent, and controls placed in the EHR interface are not in the path the agent uses.

    Define what counts as anomalous or unauthorized

    Write the definition down before building detection, because rules are only as clear as the policy behind them. For restricted records, a practical definition has four parts.

    First, any agent retrieval of a flagged VIP or employee-patient record where the delegated user has no documented treatment, payment or operations relationship to that patient. Second, any retrieval where the agent cannot be tied to a specific delegated user at all. Third, retrieval whose breadth or volume exceeds what the stated task needs, such as a name search that returns many flagged records. Fourth, any restricted record content appearing in a tool response that the delegated user's role would not receive through the EHR.

    Note that 45 CFR 164.312(a)(1) requires access only for persons or software programs that have been granted access rights. The text names software programs, so an agent or MCP server component is reasonably within access-control scope. The regulation does not use the term break-the-glass, and the only adjacent provision is the required emergency access procedure. VIP and employee-patient handling rules are your organization's policy, not regulatory text, so define them explicitly and apply them to agents.

    Signals to capture for every tool call

    Detection quality depends on what is captured at the call. The goal is to answer who, on whose authority, what, how much, and what came back.

    Tool call metadata covers the tool name, arguments, timestamp, and the agent and session that issued it. Delegated user identity ties the call to the human whose rights it carries, and a call that cannot be tied to one should be treated as suspect by default. Record sensitivity flags, such as VIP and employee-patient markers, must be evaluated at the tool-call level, not only in the EHR interface. Purpose and role context allows policy to compare the stated task with the user's relationship to the patient.

    Query patterns and retrieval volume expose snooping behavior: broad name searches, repeated lookups of flagged patients, or sequential record enumeration. These require correlating calls by agent and delegated user, and rate limits give a hard bound on volume. Response contents matter because a benign-looking query can return restricted records, so inspect the returned fields against the flags and the user's role.

    • Agent identity, session and tool-call metadata
    • Delegated human user and role
    • Record sensitivity flags (VIP, employee-patient)
    • Stated purpose or task context
    • Query breadth and retrieval volume
    • Response contents and returned fields

    Designing the allow, redact, block and escalate decision

    Map each policy condition to one of four outcomes so that behavior is predictable and reviewable. The mapping is a design choice, and it parallels the data and tool restrictions and human approvals named in the January 2026 request for information.

    Allow applies when the delegated user has a documented relationship, the record is within task scope and volume is normal. Redact applies when the task is legitimate but the response includes fields the role should not see, so the restricted fields are removed before return. Block applies when the call has no attributable delegated user, targets a flagged record outside the user's role, or exceeds volume limits. Escalate applies where a legitimate need is plausible but unverified, for example a clinician requesting a flagged VIP record. The call is held for human approval, mirroring the break-the-glass step that human users already follow.

    Two tradeoffs deserve attention. Over-blocking can disrupt care workflows, so start restricted-record rules in escalate mode and tighten from observed data. Also, proposed information-blocking rules from ONC and ASTP in December 2025 would treat autonomous AI systems as accessors of electronic health information, so review blocking rules against the exceptions in that rule, including the Security Exception. That proposal is separate from HIPAA Security Rule requirements.

    Trussed enforces policy in the execution path at the level of individual tool calls, including calls to MCP servers, with outcomes of allow, redact, block, rate limit and escalate for human approval. It does not claim tracing across a whole agentic workflow, so design correlation of multi-call patterns deliberately.

    Evidence to retain for HIPAA audit controls and incident review

    The HIPAA Security Rule technical safeguards at 45 CFR 164.312 include standards for access control, audit controls at 164.312(b), integrity, person or entity authentication, and transmission security. Unique user identification is a required specification of access control, and 164.312(d) requires procedures to verify that a person or entity seeking access is the one claimed. When an agent acts on a delegated user's authority, how these apply is a design and interpretation question, so document your reasoning.

    HHS's January 2025 proposal to strengthen the Security Rule notes that audit controls and regular review of audit logs and access reports can help detect unusual access patterns, and proposes four implementation specifications for audit controls. It is a proposal as of November 2026, so current 164.312 text remains the operative requirement.

    For each restricted-record tool call, retain the agent identity, the delegated user, the tool and arguments, the sensitivity flags evaluated, the policy decision and reason, any approver and approval time, and a record of what the response contained after redaction. Also retain the agent configuration in effect, as CMS does for its own generative AI use, although that is internal CMS practice and not a HIPAA retention rule. Set retention and evidence-store access under your own policy and counsel's advice.

    Trussed produces audit-ready evidence from enforcement, mapped to HIPAA including 164.312(b), and supports self-managed deployment in the customer cloud with configurable retention and data residency. It runs in production with healthcare and pharma organizations.

    Restricted-record access in the MCP tool-call path

    Identify

    Attribute the call to an agent and to the human user whose authority it carries.

    Evaluate

    Check record sensitivity, purpose, query breadth and volume against policy.

    Decide

    Allow, redact, block, or escalate for human approval before data returns.

    Evidence

    Keep the request, decision and response record for audit and review.

    Put restricted-record policy in the tool-call path

    See how policy enforced at runtime on MCP tool calls produces audit-ready evidence for VIP and employee-patient record access.

    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.