Navigation
Agent Care: Secure FHIR Integration & Scalable EMR Interoperability - MCP Implementation

Agent Care: Secure FHIR Integration & Scalable EMR Interoperability

Agent Care's MCP Server bridges EMR systems like Cerner and Epic via FHIR, enabling seamless, secure data exchange to solve interoperability challenges at scale.

Research And Data
4.4(75 reviews)
112 saves
52 comments

This tool saved users approximately 10592 hours last month!

About Agent Care

What is Agent Care: Secure FHIR Integration & Scalable EMR Interoperability?

Agent Care is a middleware solution designed to securely integrate AI-driven healthcare applications with FHIR-compliant Electronic Medical Record (EMR) systems. By leveraging the Model Context Protocol (MCP) framework, it enables bidirectional data exchange between clinical systems like Cerner and Epic, and advanced language models. The platform ensures HIPAA-compliant data handling through OAuth2 authentication and strict access controls, while maintaining scalability for large-scale healthcare deployments.

How to use Agent Care: Secure FHIR Integration & Scalable EMR Interoperability?

  1. Configure environment variables with EMR-specific OAuth credentials and API endpoints
  2. Deploy the MCP server using Node.js environment with proper authorization workflows
  3. Integrate with AI platforms via MCP adapters (Claude Desktop/Goose) for secure context-aware queries
  4. Implement audit logging and token validation to maintain compliance with healthcare regulations

Agent Care Features

Key Features of Agent Care: Secure FHIR Integration & Scalable EMR Interoperability?

  • FHIR R4 API compliance with batch/data services support
  • Dual EMR support: Cerner Healthfacts and Epic Carequality interfaces
  • Granular access control via OAuth scopes and role-based permissions
  • Automated token refresh and session management
  • Production-ready error handling for EMR-specific response variations

Use cases of Agent Care: Secure FHIR Integration & Scalable EMR Interoperability?

Agent Care FAQ

FAQ from Agent Care: Secure FHIR Integration & Scalable EMR Interoperability?

  • Q: Does this support FHIR STU3 versions? A: Current implementation focuses on R4 standards, but adapters can be configured for legacy systems
  • Q: How is patient data secured during transmission? A: Uses TLS 1.2+ encryption with mutual certificate authentication where available
  • Q: Can it handle high-volume EHR queries? A: Built-in rate limiting and connection pooling ensure scalability up to 1000+ concurrent requests
  • Q: What models are officially supported? A: Optimized for Anthropic Claude series, but MCP standard allows integration with any compliant LLM

Content

Agent Care: An MCP Server for EMRs like Cerner and Epic

A Model Context Protocol (MCP) server that provides healthcare tools and prompts for interacting with FHIR data and medical resources on EMRs like Cerner and Epic using Claude Desktop and Goose Desktop.

smithery badge

Demo

Demo

Features

  • EMR integrartion using SMART on FHIR APIs
  • Uses OAuth2 to authenticate with EMRs
  • Anthropic Claude Desktop integration
  • Medical research integration (PubMed, Clinical Trials, FDA)
  • Response caching
  • Error handling
  • Null-safe data formatting
  • Comprehensive clinical analysis

Screenshots

Cerner Epic Converse Soap Notes Timeline

Tools

FHIR Tools

  • find_patient - Search for a patient by name, DOB, or other identifiers
  • get_patient_observations - Retrieve patient observations/vital signs
  • get_patient_conditions - Get patient's active conditions
  • get_patient_medications - Get patient's current medications
  • get_patient_encounters - Get patient's clinical encounters
  • get_patient_allergies - Get patient's allergies and intolerances
  • get_patient_procedures - Get patient's procedures
  • get_patient_careteam - Get patient's care team members
  • get_patient_careplans - Get patient's active care plans
  • get_vital_signs - Get patient's vital signs
  • get_lab_results - Get patient's laboratory results
  • get_medications_history - Get patient's medication history
  • clinical_query - Execute custom FHIR queries

Medical Research Tools

  • search-pubmed - Search PubMed articles related to medical conditions
  • search-trials - Find relevant clinical trials
  • drug-interactions - Check drug-drug interactions

Usage

Each tool requires specific parameters:

Required Parameters

  • Most tools require patientId
  • Some tools have additional parameters:
    • lab_trend_analysis: requires labType
    • search-pubmed: requires query and optional maxResults
    • search-trials: requires condition and optional location
    • drug-interactions: requires drugs array

Development Configuration

For local testing Create a .env file in the root directory or use these environment variables in claude desktop launch configuration.

Cerner

OAUTH_CLIENT_ID="XXXXX",
OAUTH_CLIENT_SECRET="XXXXXXX",
OAUTH_TOKEN_HOST="https://authorization.cerner.com", 
OAUTH_AUTHORIZE_PATH="/tenants/ec2458f2-1e24-41c8-b71b-0e701af7583d/protocols/oauth2/profiles/smart-v1/personas/provider/authorize",
OAUTH_AUTHORIZATION_METHOD='header',
OAUTH_TOKEN_PATH="/tenants/ec2458f2-1e24-41c8-b71b-0e701af7583d/hosts/api.cernermillennium.com/protocols/oauth2/profiles/smart-v1/token",
OAUTH_AUDIENCE="https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d",
OAUTH_CALLBACK_URL="http://localhost:3456/oauth/callback",
OAUTH_SCOPES="user/Patient.read user/Condition.read user/Observation.read user/MedicationRequest.read user/AllergyIntolerance.read user/Procedure.read user/CarePlan.read user/CareTeam.read user/Encounter.read user/Immunization.read",
OAUTH_CALLBACK_PORT="3456"
FHIR_BASE_URL:any = "https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d" 
PUBMED_API_KEY=your_pubmed_api_key
CLINICAL_TRIALS_API_KEY=your_trials_api_key
FDA_API_KEY=your_fda_api_key

Epic

OAUTH_CLIENT_ID="XXXXXXX",
OAUTH_CLIENT_SECRET="",
OAUTH_TOKEN_HOST="https://fhir.epic.com",
OAUTH_AUTHORIZE_PATH="/interconnect-fhir-oauth/oauth2/authorize",
OAUTH_AUTHORIZATION_METHOD='body',
OAUTH_TOKEN_PATH="/interconnect-fhir-oauth/oauth2/token",
OAUTH_AUDIENCE="https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4",
OAUTH_CALLBACK_URL="http://localhost:3456/oauth/callback",
OAUTH_SCOPES="user/Patient.read user/Observation.read user/MedicationRequest.read user/Condition.read user/AllergyIntolerance.read user/Procedure.read user/CarePlan.read user/CareTeam.read user/Encounter.read user/Immunization.read",
OAUTH_CALLBACK_PORT=3456
FHIR_BASE_URL:any = "https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4" //EPIC  
PUBMED_API_KEY=your_pubmed_api_key
CLINICAL_TRIALS_API_KEY=your_trials_api_key
FDA_API_KEY=your_fda_api_key

Start MCP Server Locally

git clone {agentcare-mcp-github path}
cd agentcare-mcp
npm install
npm run build

Use claude desktop

for claude desktop: 
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
(use the env variables as shown above)

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/your-username/Desktop"
      ]
    },
    "agent-care": {
      "command": "node",
      "args": [
        "/Users/your-username/{agentcare-download-path}/agent-care-mcp/build/index.js"
      ],
      "env": {
        "OAUTH_CLIENT_ID": XXXXXX,
        "OAUTH_CLIENT_SECRET":XXXXXXX,
        "OAUTH_TOKEN_HOST":,
        "OAUTH_TOKEN_PATH":,
        "OAUTH_AUTHORIZE_PATH",
        "OAUTH_AUTHORIZATION_METHOD": ,
        "OAUTH_AUDIENCE":,
        "OAUTH_CALLBACK_URL":,
        "OAUTH_SCOPES":,
        "OAUTH_CALLBACK_PORT":,
        "FHIR_BASE_URL":,
        "PUBMED_API_KEY":,
        "CLINICAL_TRIALS_API_KEY":,
        "FDA_API_KEY":
      }
    }
  }
}

Use MCP Inspectopr

(MCP Server using inspector. Make sure to update the .env file with the correct values.)

npm install -g @modelcontextprotocol/inspector
mcp-inspector  build/index.js
http://localhost:5173

Test User Logins

(commonly used for sandbox/dev)

  • Cerner: portal | portal
  • Epic: FHIRTWO | EpicFhir11!

Troubleshooting:

If Claude desktop is running it uses port 3456 for Auth. You need to terminate that process using the following command:

kill -9 $(lsof -t -i:3456)

Use Goose

Goose is an open Source AI Agent frameowrk from Block(Stripe) that works with MCP servers. Goose Desktop is like Claude Desktop that can work with MCP servers. But Goose can be configured to use models other than Anthropic as well. More info: https://block.xyz/inside/block-open-source-introduces-codename-goose

See below how Goose Desktop works with Agent Care: (goose extension will be configured with command: /Users/your-username/{agentcare-download-path}/agent-care-mcp/build/index.js)

Cerner Epic Converse Soap Notes

Related MCP Servers & Clients