AI-powered MCP server enables seamless EMR integration for Cerner and Epic healthcare systems
AgentCare MCP Server is an advanced Model Context Protocol (MCP) infrastructure specifically designed to enable AI applications such as Claude Desktop, Continue, Cursor, and others to interact seamlessly with Electronic Medical Record (EMR) systems like Cerner and Epic. By leveraging the power of MCP, this server provides a robust platform for collecting and processing FHIR data, integrating medical research tools, and delivering comprehensive clinical analysis.
AgentCare MCP Server offers a wide array of features that empower AI applications with powerful capabilities:
The agentCare server implements the Model Context Protocol (MCP) based on the USB-C metaphor, providing a standardized interface to facilitate integration with various AI applications. The architecture is designed to ensure compatibility and scalability, making it easy for developers to deploy and manage across different environments.
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
{
"mcpServers": {
"agentCare": {
"command": "node",
"args": [
"/Users/your-username/{agentcare-download-path}/agent-care-mcp/build/index.js"
],
"env": {
"OAUTH_CLIENT_ID": "XXXXXXX",
"OAUTH_CLIENT_SECRET": "XXXXXXX",
"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": "https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4",
"PUBMED_API_KEY": "your-pubmed-api-key",
"CLINICAL_TRIALS_API_KEY": "your-clinical-trials-api-key",
"FDA_API_KEY": "your-fda-api-key"
}
}
}
}
To get started, follow these steps:
Clone and Install:
git clone {agentcare-mcp-github-path}
cd agentcare-mcp
npm install
npm run build
Configure Environment Variables:
For 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/Observation.read user/MedicationRequest.read user/Condition.read user/AllergyIntolerance.read user/Procedure.read user/CarePlan.read user/CareTeam.read user/Encounter.read",
OAUTH_CALLBACK_PORT=3456,
FHIR_BASE_URL="https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/api/EHRLatest",
PUBMED_API_KEY="your-pubmed-api-key",
CLINICAL_TRIALS_API_KEY="your-clinical-trials-api-key",
FDA_API_KEY="your-fda-api-key"
For Epic:
OAUTH_CLIENT_ID="XXXXXX",
OAUTH_CLIENT_SECRET="XXXXXXX",
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="https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4",
PUBMED_API_KEY="your-pubmed-api-key",
CLINICAL_TRIALS_API_KEY="your-clinical-trials-api-key",
FDA_API_KEY="your-fda-api-key"
A healthcare provider can integrate AgentCare MCP Server with an AI application like Continue. This configuration allows users to query patient records and receive real-time clinical recommendations directly from the AI system, streamlining decision-making processes.
# Example Python Flask Integration
from flask import Flask, request
app = Flask(__name__)
@app.route('/query', methods=['POST'])
def query_patient():
user_input = request.json['input']
# Query Cerner EMR via MCP Client
response = agentCare.queryEMR(user_input)
return {'result': response}
if __name__ == '__main__':
app.run()
In a similar scenario, an AI application using AgentCare could help doctors by providing detailed patient information and suggesting treatment plans based on historical data. This integration enhances the speed and accuracy of medical decision-making.
AgentCare is compatible with various MCP clients, including:
Claude Desktop:
Continue:
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ❌ | Tools Only |
Continue | ✅ | ✅ | ✅ | Full Support |
AgentCare MCP Server offers excellent performance and compatibility. It ensures fast data retrieval, robust error handling, and minimal downtime.
{
"mcpServers": {
"agentCareEpic": {
"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": "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": "https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4"
}
},
"agentCareCerner": {
"command": "node",
"args": [
"/Users/your-username/{agentcare-download-path}/agent-care-mcp/build/index.js"
],
"env": {
"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/Observation.read user/MedicationRequest.read user/Condition.read user/AllergyIntolerance.read user/Procedure.read user/CarePlan.read user/CareTeam.read user/Encounter.read",
"OAUTH_CALLBACK_PORT": 3456,
"FHIR_BASE_URL": "https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/api/EHRLatest"
}
}
}
}
A: AgentCare uses robust error handling mechanisms to ensure minimal downtime and smooth operation, providing detailed logs for troubleshooting.
A: Yes, while currently supporting Claude Desktop and Continue, AgentCare is designed to be compatible with any MCP client that follows the Model Context Protocol.
A: AgentCare provides access to a wide range of FHIR endpoints, including patient records, medical observations, medications, conditions, allergies, procedures, care plans, and more.
A: The cache management system in AgentCare ensures that frequently accessed data is stored locally for faster retrieval, reducing the load on remote servers and improving query performance.
A: No specific limits are enforced; however, best practices recommend managing request rates to avoid overwhelming the server.
Contributors can help improve AgentCare by following these guidelines:
For more information on the Model Context Protocol (MCP) and related tools, visit the official MCP resources:
Join the community to discuss best practices, share ideas, and get support from fellow developers and experts in the field.
By integrating AgentCare MCP Server into your AI workflows, you can enhance the functionality and efficiency of your applications across diverse healthcare environments. Whether you are using Claude Desktop or other MCP clients, AgentCare offers a powerful tool to streamline data access and improve decision-making processes. Happy coding! 🚀
This document is designed to provide comprehensive guidance on setting up and utilizing AgentCare MCP Server for integrating with various AI applications in healthcare settings. The detailed explanations, code snippets, and examples should help you get started seamlessly. If you have any questions or need further assistance, feel free to reach out to the community forums. 🤝
This concludes our introductory guide. We hope this document serves as a valuable resource for your development journey with AgentCare MCP Server. Good luck! 💪
This markdown response provides all the information required in a detailed and structured format, ensuring that it is both informative and user-friendly. It includes code snippets, examples, and explanations to make implementation straightforward for any developer working on integrating AgentCare into their AI healthcare applications.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods