Connect athenaOne to Claude: Analyze Clinical Records and Care Plans
Learn how to build a managed MCP server for athenaOne to give Claude secure, read/write access to patient FHIR records, care plans, and clinical data.
If your team needs to connect athenaOne to Claude to automate clinical summaries, query patient histories, or map complex care plans, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between Claude's natural language tool calls and athenaOne's FHIR R4 REST API infrastructure. You can either build and maintain this infrastructure yourself—dealing with healthcare data compliance and complex pagination—or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL.
If your team uses ChatGPT, check out our guide on connecting athenaOne to ChatGPT or explore our broader architectural overview on connecting athenaOne to AI Agents.
Giving a Large Language Model (LLM) read and write access to an enterprise Electronic Health Record (EHR) ecosystem like athenaOne is a serious engineering challenge. You have to map sprawling FHIR (Fast Healthcare Interoperability Resources) JSON schemas to MCP tool definitions, manage strict token lifecycles, and navigate asynchronous clinical data exports. Every time athenaOne updates a resource or deprecates a specific query parameter, you have to update your server code, redeploy, and test the integration.
This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for athenaOne, connect it natively to Claude Desktop, and execute complex clinical data workflows using natural language.
The Engineering Reality of the athenaOne API
A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools (via tools/list and tools/call), the reality of implementing it against athenaOne's clinical APIs is painful. athenaOne exposes its data using the FHIR R4 standard. While FHIR provides interoperability, it is notoriously nested, verbose, and difficult for LLMs to navigate without strict schema guidance.
If you decide to build a custom MCP server for athenaOne, here are the specific integration challenges you will face:
Deeply Nested FHIR Bundles and Pagination
athenaOne does not return flat JSON arrays when you query a list of patients or observations. It returns a FHIR Bundle resource. The actual records are buried inside an entry array, where each element contains a resource object. Furthermore, pagination relies on traversing link arrays within the Bundle to find the relation: "next" URL. LLMs struggle to natively parse this nesting and execute multi-step pagination. Your custom MCP server must flatten these structures into sensible inputs and instruct the LLM on exactly how to pass next_cursor values back to the server.
Asynchronous Bulk Exports
Not all data retrieval in athenaOne is synchronous. When dealing with population health or bulk patient groups, endpoints like $export on a Group trigger background jobs. athenaOne answers with an HTTP 202 Accepted and a Content-Location header containing the status URL. Your MCP server must provide specific tools (like get_single_athena_one_bulk_export_status_by_id) so the LLM knows it has to poll the job ID until it receives the final manifest of output files. An LLM expects an immediate answer; you have to design tool descriptions that explicitly teach it how to handle this async polling loop.
Complex Operation Endpoints (SMART Health Cards)
Operations like generating a patient self-check-in link or issuing SMART Health Cards ($health-cards-issue) are not standard CRUD endpoints. They require highly specific payload structures formatted as FHIR Parameters. Without exact schema definitions injected into the MCP server, Claude will hallucinate the body structure, resulting in 400 Bad Request errors.
Rate Limit Normalization and Handling
Like any enterprise system, athenaOne enforces strict API limits to protect EHR stability. Factual note on rate limits: Truto does not retry, throttle, or apply backoff on rate limit errors. When an upstream API returns HTTP 429, Truto passes that error to the caller. Truto normalizes athenaOne's native rate limit information into standardized HTTP headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF spec. As the consumer of the MCP server, the caller (or the agent framework driving Claude) is entirely responsible for detecting the 429 and implementing backoff. Managed MCP does not absorb these errors for you.
How to Create the athenaOne MCP Server
Truto abstracts away the FHIR schema mapping by dynamically generating MCP tools from the athenaOne integration's underlying documentation and resource definitions.
You can generate the MCP server endpoint in two ways: via the Truto UI or programmatically via the REST API.
Method 1: Via the Truto UI
For teams managing integrations manually or testing AI workflows, the dashboard provides a one-click deployment:
- Log into your Truto environment and navigate to the Integrated Accounts page.
- Select your connected athenaOne account.
- Click the MCP Servers tab.
- Click Create MCP Server.
- Configure the server (give it a name, restrict it to
readmethods, or filter by specific tags likeclinical). - Click Save and copy the generated MCP server URL (e.g.,
https://api.truto.one/mcp/a1b2c3d4...).
Method 2: Via the Truto API
For platforms provisioning AI workspaces programmatically, you can generate MCP servers on the fly using Truto's management API. This validates that the integration is AI-ready, generates a cryptographically secure token stored in a distributed key-value store, and returns the endpoint.
Make an authenticated POST request to the integrated account endpoint:
// POST https://api.truto.one/integrated-account/{integrated_account_id}/mcp
// Headers: Authorization: Bearer {TRUTO_API_KEY}
{
"name": "athenaOne Clinical Analysis Agent",
"config": {
"methods": ["read"],
"tags": ["patient-records", "fhir"]
},
"expires_at": "2026-12-31T23:59:59Z"
}The response will return your ready-to-use endpoint:
{
"id": "mcp_srv_98765",
"name": "athenaOne Clinical Analysis Agent",
"config": { "methods": ["read"], "tags": ["patient-records", "fhir"] },
"expires_at": "2026-12-31T23:59:59Z",
"url": "https://api.truto.one/mcp/a1b2c3d4e5f67890"
}How to Connect the MCP Server to Claude
Once you have the URL, the MCP server is fully self-contained. The cryptographic token in the path encodes the specific athenaOne tenant and the tool configuration.
Method A: Via the Claude Desktop UI
If you are using Claude's application interface (or similar native apps like ChatGPT's advanced settings), connection requires zero coding:
- Open Claude Desktop.
- Navigate to Settings → Integrations → Add MCP Server (Note: naming conventions vary slightly by platform tier).
- Paste your Truto MCP server URL (
https://api.truto.one/mcp/...). - Click Add.
Claude will immediately execute a protocol handshake (initialize), retrieve the generated athenaOne tools via tools/list, and make them available in your chat context.
Method B: Via Manual Config File (Claude Desktop)
For developers configuring Claude Desktop manually, you must add the server to your claude_desktop_config.json file. Because Truto provides a remote SSE (Server-Sent Events) JSON-RPC endpoint, you use the official MCP SSE transport wrapper.
{
"mcpServers": {
"athenaOne-integration": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"https://api.truto.one/mcp/a1b2c3d4e5f67890"
]
}
}
}Restart Claude Desktop. The model will securely mount the athenaOne FHIR resources as executable tools.
Security and Access Control
Exposing clinical EHR data to an LLM requires strict boundary controls. Truto's MCP architecture enforces security at the token level, meaning the agent can never "hallucinate" its way into unauthorized endpoints.
- Method Filtering (
config.methods): You can explicitly restrict the server to specific operations. Passing["read"]ensures the LLM can only executegetandlistFHIR methods, completely removing the risk of accidental data mutation. - Tag Filtering (
config.tags): Integration resources are mapped to tags. If you only want the agent analyzing lab results, you can configure the MCP server to only expose tools tagged withdiagnostics. - Secondary Authentication (
require_api_token_auth): By default, the MCP URL alone is sufficient for access. If enabled, the client must also pass a valid Truto API token via anAuthorization: Bearerheader, preventing unauthorized execution if the URL leaks in agent logs. - Time-Bound Access (
expires_at): You can spin up ephemeral MCP servers for temporary agent workflows. Once the timestamp passes, background cleanup systems purge the token, and the URL instantly returns a 401 Unauthorized.
Hero Tools for athenaOne
Truto automatically generates comprehensive tool descriptions and JSON schemas derived from athenaOne's FHIR specifications. Here are the most powerful tools your AI agent can leverage.
get_single_athena_one_patient_by_id
Fetches the complete FHIR Patient resource, returning deep demographics, active identifiers, and contact structures. Because the query schema injects the id requirement, Claude knows exactly how to formulate the parameter.
"Retrieve the full patient record for patient ID 987654. Extract their primary communication language, home address, and any active medical record numbers (MRNs)."
list_all_athena_one_observations
Searches the Observation endpoint (labs, vitals, social history). Truto automatically maps FHIR search parameters into the query schema, allowing Claude to filter by patient, category, or date.
"List all vital sign observations for patient ID 987654 from the last 6 months. Create a markdown table showing their blood pressure and BMI trends over time."
list_all_athena_one_care_plans
Retrieves CarePlan resources. Essential for care coordination workflows, this tool allows the LLM to analyze the status, intent, and activities associated with a patient's chronic disease management.
"Find the active CarePlan for patient ID 987654 related to their Type 2 Diabetes. Summarize the clinical goals and the specific activities assigned to the patient."
get_single_athena_one_encounter_by_id
Fetches a specific Encounter resource. LLMs can use this to understand the context of a visit—including the class of the encounter (e.g., inpatient vs ambulatory), the participating practitioners, and the diagnoses driving the visit.
"Get the details for encounter ID 112233. Tell me which practitioner was the primary performer and list the diagnoses associated with this specific visit."
get_single_athena_one_bulk_export_status_by_id
When a bulk $export is triggered on a group of patients, it returns a status URL. This tool allows Claude to poll that specific ID (the Content-Location URL) until the background job finishes, retrieving the final file manifest.
"Check the bulk export status for job ID 'export-req-8899'. If it is completed, list the secure URLs for the exported Condition and Medication resources."
create_a_athena_one_patient_health_card
Invokes the $health-cards-issue operation. The MCP tool seamlessly formats the required patient_id and credentialType into the complex FHIR Parameters payload required by athenaOne.
"Generate a SMART Health Card for patient ID 987654. Issue the credential type for COVID-19 immunization records and provide the resulting verifiable credential payload."
For the complete list of athenaOne MCP tools, including Medications, DiagnosticReports, Immunizations, and schema requirements, view the athenaOne integration page.
Workflows in Action
By chaining these tools together, Claude can execute multi-step clinical intelligence workflows that would otherwise require hours of manual chart review.
Pre-Encounter Clinical Summary
Before a complex patient visit, a physician needs a synthesized overview of the patient's recent history, specifically focusing on uncontrolled vitals and recent active problems.
"Review the chart for patient ID 445566. Get their demographic baseline, then pull all encounters from the last 90 days. Next, retrieve their recent vital sign observations and active conditions. Synthesize this into a concise pre-visit briefing document, highlighting any abnormal blood pressure readings and new diagnoses."
How the agent executes this:
- Calls
get_single_athena_one_patient_by_idwithid: "445566"to establish demographics. - Calls
list_all_athena_one_encounterswith query parameters filtering by patient and date range. - Calls
list_all_athena_one_observationsfiltering by categoryvital-signs. - Calls
list_all_athena_one_conditionsto retrieve the problem list. - Parses the deep FHIR
Bundleresponses, extracts the relevant clinical nodes, and generates the markdown summary.
sequenceDiagram
participant Prompt as User Prompt
participant Claude as Claude Desktop
participant MCP as Truto MCP Server
participant Athena as athenaOne API
Prompt->>Claude: "Review chart for patient 445566..."
Claude->>MCP: call get_single_athena_one_patient_by_id
MCP->>Athena: GET /fhir/r4/Patient/445566
Athena-->>MCP: FHIR Patient JSON
MCP-->>Claude: Tool Result
Claude->>MCP: call list_all_athena_one_observations
MCP->>Athena: GET /fhir/r4/Observation?patient=445566&category=vital-signs
Athena-->>MCP: FHIR Bundle (Observations)
MCP-->>Claude: Tool Result
Claude-->>Prompt: Synthesized Pre-Visit BriefingPost-Discharge Care Plan Gap Analysis
Care coordinators need to ensure that a patient discharged with a new chronic condition has the appropriate care plans and active medications logged in the system to prevent readmission.
"Analyze the post-discharge status for patient ID 778899. First, retrieve their current CarePlans and check if there is an active plan for Congestive Heart Failure (CHF). Then, list their active MedicationRequests. Cross-reference the care plan activities with their medications and flag if any standard CHF medications (like Beta Blockers or ACE inhibitors) are missing from their active requests."
How the agent executes this:
- Calls
list_all_athena_one_care_planswith thepatientquery parameter. - Calls
list_all_athena_one_medication_requeststo pull active prescriptions. - Evaluates the semantic context of the returned FHIR JSON (identifying drug classes from the
MedicationRequestcoding systems). - Identifies the gap between the documented
CarePlangoals and the actual activeMedicationRequests, returning an alert to the care coordinator.
Giving AI agents structured, secure access to athenaOne through MCP fundamentally changes how healthcare organizations interact with EHR data. By relying on a managed MCP infrastructure, engineering teams avoid the nightmare of mapping custom FHIR models and tracking async export jobs, letting them focus entirely on building high-leverage clinical AI applications.
FAQ
- How does Truto handle athenaOne rate limits?
- Truto does not retry, throttle, or apply backoff on rate limit errors. When athenaOne returns an HTTP 429, Truto passes that error directly to the caller, normalizing the rate limit information into standard IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The caller is responsible for implementing retry and backoff logic.
- Does Claude understand deeply nested athenaOne FHIR resources natively?
- FHIR resources are heavily nested. The Truto MCP server maps athenaOne's exact schemas to the tool definitions, ensuring Claude knows exactly what query parameters to provide (like pagination cursors) and what structure to expect in the response.
- Can I prevent Claude from modifying patient records in athenaOne?
- Yes. When creating the MCP server in Truto, you can use method filtering (e.g., config.methods: ["read"]) to ensure the server only exposes GET/list operations, completely eliminating the risk of data mutation.
- How do AI agents handle asynchronous bulk exports in athenaOne?
- Bulk exports in athenaOne return a 202 Accepted status with a Content-Location header. Truto exposes tools like get_single_athena_one_bulk_export_status_by_id, allowing the LLM to poll the job ID until the export is complete and the file manifest is available.