Healthcare MCP Integration Examples
Healthcare-specific examples for connecting EHR systems, scheduling, lab results, pharmacy, and clinical decision support via MCP and custom toolkits.
Healthcare MCP Integration Examples
This guide shows how to use MCP servers and custom toolkits to integrate healthcare-specific workflows into your AI assistants. Each example includes tool definitions, conversational context, and implementation notes.
For general toolkit setup, see Toolkits. For the Custom Toolkits ability, see Custom Toolkits.
EHR Integration: Patient Lookup
Connect your EHR (e.g., Epic, eClinicalWorks, Healthie) to let the assistant look up patient information during conversations.
Tool Definition
Toolkit: "EHR Integration"
Tool: get_patient_summary
- Description: Retrieve a patient's clinical summary including active medications, allergies, and recent diagnoses.
- Prompt: "Look up the patient in the EHR and return their current clinical summary. Only return information relevant to the conversation."
- Input Schema:
json
- Output Schema:
json
Example Conversation
Patient: Hi, I'm calling to ask about my medications. I'm not sure if I should still be taking the one for my blood pressure.
Assistant (uses
get_patient_summarytool): I can see from your chart that you're currently prescribed Lisinopril 10mg daily for blood pressure and Metformin 500mg twice daily. Would you like me to connect you with your care team to review whether the Lisinopril dosage is still right for you?Patient: Yes, that would be great. I've also been having some dizziness.
Assistant: I'll note that for your care team. Dizziness can sometimes be related to blood pressure medication, so it's good to have that checked. Let me get a message to Dr. Chen's office for you.
Implementation Notes
- The assistant retrieves only the data needed for the conversation, not the entire patient record.
- PHI returned by the tool stays within the conversation context and is subject to workspace compliance settings.
- Use the
HIPAA_COMPLIANCEfeature flag to enforce additional safeguards when handling EHR data.
Scheduling: Appointment Booking
Let the assistant check provider availability and book appointments during a conversation.
Tool Definitions
Toolkit: "Scheduling"
Tool 1: check_availability
- Description: Check a provider's available appointment slots for a given date range.
- Prompt: "Find available appointment slots for the requested provider and date range. Return the next 5 available slots."
- Input Schema:
json
- Output Schema:
json
Tool 2: book_appointment
- Description: Book a specific appointment slot for the patient.
- Prompt: "Confirm the appointment booking. Always confirm the date, time, and location with the patient before booking."
- Input Schema:
json
Example Conversation
Patient: I need to schedule a follow-up with Dr. Martinez.
Assistant (uses
check_availability): I found a few openings with Dr. Martinez for follow-up visits:
- Monday, March 17 at 9:00 AM - Main Campus
- Monday, March 17 at 2:30 PM - Main Campus
- Wednesday, March 19 at 10:15 AM - Westside Clinic
Which works best for you?
Patient: Wednesday morning works.
Assistant: Just to confirm: Wednesday, March 19 at 10:15 AM with Dr. Martinez at the Westside Clinic. Shall I go ahead and book that?
Patient: Yes, please.
Assistant (uses
book_appointment): You're all set. Your follow-up with Dr. Martinez is confirmed for Wednesday, March 19 at 10:15 AM at the Westside Clinic. You'll receive a reminder the day before.
Implementation Notes
- If you use Healthie or another EHR with calendar sync, the booking tool can call the Healthie API directly. See the Healthie Integration docs.
- Always confirm the appointment details with the patient before calling
book_appointment. - Consider adding conditional activation so scheduling tools are only available during business hours.
Lab Results: Lookup and Trend Analysis
Give the assistant access to lab results so it can answer patient questions about recent tests.
Tool Definition
Toolkit: "Lab Results"
Tool: get_lab_results
- Description: Retrieve a patient's lab results, optionally filtered by test type and date range.
- Prompt: "Look up the patient's lab results. When presenting results, include the reference range and flag any values outside normal limits. If multiple results exist for the same test, describe the trend."
- Input Schema:
json
- Output Schema:
json
Example Conversation
Patient: I got my blood work done last week. Can you tell me how my sugar levels look?
Assistant (uses
get_lab_resultswith testCode "HbA1c"): Your most recent HbA1c from March 5 was 6.8%, which is slightly above the target range of under 6.5% for diabetes management. Looking at your trend over the past year:
- March 2026: 6.8%
- December 2025: 7.1%
- September 2025: 7.4%
The good news is your levels have been steadily improving. Your care team may want to discuss whether any medication adjustments are needed. Would you like me to send a message to your provider about these results?
Patient: Yes, please let them know.
Implementation Notes
- The tool prompt instructs the assistant to present results with reference ranges and trends. This keeps the assistant's behavior consistent without custom code.
- For FHIR-based EHRs, lab results map to the
Observationresource. The eClinicalWorks integration already supportssystem/Observation.readscope. - Never expose raw FHIR JSON to the patient. The assistant should translate clinical data into plain language.
Pharmacy: Drug Interaction Checking
Enable the assistant to check for potential drug interactions when patients ask about new medications.
Tool Definition
Toolkit: "Pharmacy"
Tool: check_drug_interactions
- Description: Check for known interactions between a list of medications. Returns severity level and clinical guidance.
- Prompt: "Check for drug interactions. If a severe interaction is found, advise the patient to contact their provider before starting the new medication. Never recommend stopping a current medication."
- Input Schema:
json
- Output Schema:
json
Example Conversation
Patient: My doctor wants to start me on Warfarin. I'm already taking Metformin and Lisinopril. Is there anything I should watch out for?
Assistant (uses
get_patient_summaryto confirm current medications, thencheck_drug_interactions): I checked for interactions between your current medications and Warfarin. Here's what I found:
- Warfarin + Metformin: Minor interaction. Metformin may slightly affect how Warfarin works. Your provider will likely monitor your INR levels more closely when starting.
- Warfarin + Lisinopril: No significant interaction expected.
No severe interactions were flagged. That said, Warfarin does require regular blood monitoring, so make sure to keep your scheduled INR checks. Would you like me to help schedule your first INR appointment?
Patient: Yes, please.
Implementation Notes
- The tool prompt explicitly prevents the assistant from recommending medication changes. It can only report interactions and advise contacting a provider.
- Drug interaction databases like DrugBank, RxNorm, or commercial APIs (e.g., First Databank) can back this tool.
- Combine this with the
get_patient_summarytool to automatically pull current medications instead of asking the patient.
Clinical Decision Support
Provide the assistant with clinical screening tools or care gap alerts to support care coordination workflows.
Tool Definition
Toolkit: "Clinical Decision Support"
Tool: get_care_gaps
- Description: Check for overdue preventive care, screenings, or follow-ups for a patient based on clinical guidelines.
- Prompt: "Review the patient's care gaps. Present overdue items conversationally and offer to help schedule or coordinate. Do not provide medical advice or diagnoses."
- Input Schema:
json
- Output Schema:
json
Example Conversation
Patient: I'm calling to check on some test results, and I also want to make sure I'm up to date on everything.
Assistant (uses
get_lab_resultsandget_care_gaps): I pulled up your recent results and also checked on your preventive care status. A couple of things to note:
- Annual wellness visit - You're due for your annual physical. Your last one was in February 2025.
- Flu vaccine - You haven't had your flu shot this season yet.
- Diabetic eye exam - Your last eye exam was over 14 months ago. With your diabetes management, it's recommended annually.
Would you like me to help schedule any of these? I can check availability for your primary care provider.
Patient: Let's get the annual physical scheduled, and I can do the flu shot at the same time.
Implementation Notes
- Care gap data can come from your EHR's quality measures module, a HEDIS/CMS reporting system, or a custom rules engine.
- The tool prompt ensures the assistant coordinates care without diagnosing or prescribing.
- Combine with the scheduling toolkit to close care gaps in a single conversation.
Connecting via MCP Server
If your EHR or clinical system exposes an MCP server, you can connect it directly instead of building custom tools:
- Go to Toolkits > MCP Servers
- Enter the MCP server URL (e.g., your FHIR-to-MCP bridge)
- Authenticate via OAuth if required
- The server's tools automatically appear in the toolkit list
This approach works well for:
- FHIR-based EHRs with MCP server adapters
- Scheduling systems that publish MCP-compatible tool definitions
- Third-party clinical data services that support MCP
For MCP server connection details, see the MCP Servers API.
Compliance Considerations
When integrating healthcare tools:
- PHI handling: All data returned by EHR tools is treated as PHI. Workspace compliance settings (HIPAA/SOC 2) apply to tool responses within conversations.
- Audit logging: Tool invocations that access patient data are logged for compliance. See the audit logging requirements documentation.
- Workspace isolation: Each workspace's tool connections are isolated. A toolkit configured in one workspace cannot access another workspace's data.
- Minimum necessary: Design tool outputs to return only the fields needed for the conversation. Avoid returning full patient records.
- No medical advice: Use tool prompts to constrain the assistant's behavior. The assistant should coordinate care and relay information, not diagnose or prescribe.
Related Resources
Template Variables
Personalize messages and notifications with dynamic variables like member names and form data.
Toolkits
Create custom tools and integrate external services for your AI workflows.
Webhooks
Send encrypted data to external systems when events happen in your workspace.
All Guides
Browse all available guides