Guide

# AI agents and clinical interfaces

AI applications can call clinical lookup services through an MCP gateway. This guide explains the access path and the controls available for client identity, responses, limits and auditing.

MCP open protocol

0 payloads in the audit log

3 supported credential types

message\_status.py

```
# -*- coding: utf-8 -*-

# Zato
from zato.server.service import Service

# #####################################################################
# #####################################################################

class PatientMessageStatus(Service):
    """ Returns whether HL7 messages for a given
    patient MRN arrived, with the control ID,
    event type and arrival time of each.
    """
    name = 'patient.message-status'

    input  = 'patient_mrn'
    output = 'has_arrived', 'messages'

    def handle(self) -> 'None':

        # The docstring and declared fields above
        # are the complete MCP tool definition.
        ...
```

Direct answer

## How do AI agents access clinical data?

Through an MCP gateway - an authenticated endpoint that exposes selected Python services. A service docstring and its declared fields become the tool definition. Gateway configuration selects which services and clients are allowed, while response controls, rate limits and MCP auditing are enabled separately.

The client can be Claude Code, Cursor, ChatGPT or another MCP implementation configured with the gateway address and an accepted credential. The same services can continue serving their existing interfaces.

The problem

## Why is giving AI access to clinical data hard today?

Healthcare AI projects need controlled access to clinical data. The [HIMSS and Medscape AI adoption report (2024)](https://www.himss.org/news-center/himss-and-medscape-unveil-groundbreaking-report-ai-adoption-health-systems) found 86% of health systems already using AI, with 72% naming data privacy as a significant risk, and HIMSS Market Insights found 86% of healthcare leaders agreeing that interoperability without data preparation provides limited value for analytics or AI.

HL7 v2 messages require parsing before use in model context, FHIR profiles vary by vendor, and external model access requires the corresponding data agreement. Each agent integration also needs identity, response controls, rate limits and auditing.

MCP

## What is MCP in healthcare?

The Model Context Protocol is the open protocol AI agents use to discover and call external tools, and healthcare is adopting it as the access layer for clinical data - [AWS open-sourced a HealthLake MCP server (2025)](https://aws.amazon.com/blogs/industries/building-healthcare-ai-agents-with-open-source-aws-healthlake-mcp-server/), [Innovaccer published HMCP (2025)](https://innovaccer.com/blogs/introducing-hmcp-a-universal-open-standard-for-ai-in-healthcare) layering OAuth2, audit and rate limiting on top of it, and industry press has described MCP as ["FHIR for AI" (2025)](https://www.healthcareitnews.com/news/ais-model-context-protocol-everything-you-wanted-know-were-afraid-ask).

In Zato, MCP is built into the same platform that runs the HL7 v2 and FHIR traffic - the [MCP gateway](https://zato.io/docs/ai/mcp/index.html) is a regular platform object, defined alongside the MLLP channel and the FHIR client. The gateway routes authenticated tool calls to selected Zato services.

Comparison

## What does a gateway add over per-integration agent access?

A gateway centralizes the controls between MCP clients and Zato services.

| Concern | Per-integration agent access | Through an MCP gateway |
| --- | --- | --- |
| Identity | Defined by each integration | Mandatory gateway authentication through an API key, Basic Auth or bearer token |
| PII removal | Defined by each integration | Enabled detectors replace the findings they match in tool responses |
| Rate limits | Defined by each integration | Optional rules attached to security definitions and enforced before gateway handling |
| Audit | Defined by each integration | Optional payload-free MCP events with identities, outcomes and sizes |

Questions

## What can agents answer about clinical interfaces?

Three documented scenarios provide the service, exact tool JSON and client response for each question - [did a message arrive for this patient?](https://zato.io/docs/dev/healthcare/ai/agents.html), [which interfaces had failures overnight?](https://zato.io/docs/dev/healthcare/ai/interface-health.html) and [has a feed gone silent?](https://zato.io/docs/dev/healthcare/ai/feed-silence.html).

[AI in clinical interfaces](https://zato.io/docs/dev/healthcare/ai/index.html) links to the remaining MCP and model-invocation documentation.

Safeguards

## How is patient data protected?

[Gateway authentication](https://zato.io/docs/ai/mcp/security.html) is mandatory, and the resolved security definition becomes the client identity. Optional [response controls](https://zato.io/docs/ai/mcp/response-controls.html) include PII detectors, content safeguards and size caps. [Rate limits](https://zato.io/docs/ai/mcp/rate-limits.html) are configured on security definitions. When enabled, the [MCP audit log](https://zato.io/docs/ai/mcp/audit-log.html) records payload-free events with the caller, outcome and message sizes.

FAQ

## Frequently asked questions

The MCP client receives the tool result after any enabled response controls run. Those controls remove only findings matched by their configured detectors. Whether the result reaches an external model depends on the MCP client and model deployment.

A running Zato, one Python service and one MCP gateway - the tutorial covers every step using fabricated static data before connecting the service to an HL7 audit log.

Agents connect to the gateway, and the gateway calls selected services. Those services can read an interface database, an audit log or a FHIR server through their existing connections.

MCP is an open protocol from the AI ecosystem and is unrelated to the HL7 v2 MCP segment. It provides tool access for AI applications, while MLLP transports HL7 v2 messages.

When MCP auditing is enabled, handled gateway requests record the client, method, outcome and data sizes. MCP audit events use payload-free metadata. Rate-limit enforcement runs before gateway audit handling.

Related

## Keep reading

[Docs AI in clinical interfaces](https://zato.io/docs/dev/healthcare/ai/index.html) [Glossary HL7 vs FHIR vs MLLP - definitions](https://zato.io/integrations/healthcare/hl7-vs-fhir-mllp-glossary/)

## Ready to let agents answer interface questions?

Get started with Zato and put an authenticated MCP gateway in front of selected clinical services.

[Get started ▶](https://zato.io/docs/admin/guide/install/index.html) [Read the docs](https://zato.io/docs/index.html)

Open source In Python
