Practice Fusion MCP Server
A comprehensive Model Context Protocol (MCP) server that provides healthcare tools, resources, and prompts for interacting with Practice Fusion EHR using any MCP client. Supports both STDIO (traditional) and HTTP (remote-capable) transports.
๐ Quick Start
Prerequisites
Node.js 18+ and npm
Practice Fusion API credentials (optional at startup - see Getting Practice Fusion Credentials)
Installation & Build
Basic Usage (STDIO Mode)
HTTP Mode (Remote Access)
๐ฅ Features
Complete Practice Fusion Integration
19 Practice Fusion Tools: Patient search, scheduling, demographics, insurance management
MCP Resources System: Structured data access (facilities, patient profiles, schedules)
MCP Prompts System: 9 workflow templates for common healthcare tasks
OAuth2 Authentication: Secure Practice Fusion API access with automatic token refresh
Dual Transport Support
STDIO Transport: Traditional MCP transport for local clients (Claude Desktop)
HTTP Transport: Remote-capable HTTP transport with SSE streaming (NEW!)
Enterprise Features
Session Management: Secure session handling with configurable timeout
Security Middleware: CORS, Origin validation, Rate limiting
Health Monitoring: Health check and status endpoints
Comprehensive Logging: Structured logging with debug modes
๐ ๏ธ Available Tools (19 Total)
Patient Management
search_patients- Search patients by name, DOB, demographics, or identifiersget_patient_v4- Get complete patient details with profile, contact, demographicscreate_patient_v4- Register new patients with validationupdate_patient_v4- Update patient information (demographics, contact, insurance)get_patient_insurance_plans- Retrieve patient insurance coverage detailscreate_patient_insurance_plan- Add new insurance plans for patients
Scheduling & Calendar
query_events- Query appointments and calendar events with filteringget_event- Get detailed appointment information by event IDcreate_event- Schedule new appointments with validationupdate_event- Modify existing appointments (time, status, details)get_event_types- List available appointment types and categoriesget_event_confirmation- Retrieve appointment confirmation detailsupdate_event_confirmation- Update appointment confirmation status
Practice Administration
get_users- List all practice users and providers with profilesget_facilities- Get practice facilities with locations and contact informationfind_payers- Search insurance payers and coverage plans
Document Management
get_document_types- List available document types for practiceget_document- Retrieve specific documents by IDcreate_document- Upload and create new documents
๐ MCP Resources (Structured Data Access)
Practice Resources
practice://facilities- All practice facilities with locations and detailspractice://users- Complete users and providers directorypractice://event-types- Available appointment types and categories
Patient Resources (Dynamic)
patient://profile/{patientGuid}- Patient demographics and contact informationpatient://insurance/{patientGuid}- Patient insurance plans and coverage
Calendar Resources (Dynamic)
calendar://schedule/{facilityGuid}/{date}- Daily facility schedule (YYYY-MM-DD)calendar://availability/{ehrUserGuid}/{startDate}/{endDate}- Provider availability
Payer Resources
payers://directory- Insurance payers directory with available plans
๐ MCP Prompts (Workflow Templates)
Scheduling Workflows
schedule-appointment- Interactive appointment scheduling with validationreschedule-appointment- Appointment rescheduling with conflict checkingcheck-availability- Provider availability analysis and optimization
Patient Management Workflows
patient-intake- New patient registration workflow with insurance setupupdate-patient-info- Guided patient information updatesinsurance-verification- Step-by-step insurance verification and setup
Administrative Workflows
daily-schedule-review- Comprehensive daily schedule analysispatient-search-optimization- Search strategy guidance and best practicesappointment-status-update- Appointment status management workflow
โ๏ธ Configuration
Getting Practice Fusion Credentials
To use this MCP server, you need Practice Fusion API credentials:
Contact Practice Fusion Developer Support
Email:
developer-support@practicefusion.comRequest API access for your practice/organization
Request Required Information
Client ID and Client Secret
API URL (typically
https://api.practicefusion.comfor production)Required OAuth scopes for your use case
Scopes You'll Need
calendar:a_confirmation_v1 calendar:a_events_v1 calendar:a_events_v2 calendar:a_notes_v1 calendar:a_status_v1 calendar:d_events_v1 calendar:r_events_v1 calendar:r_events_v2 calendar:r_eventtypes_v1 patient:a_contact_v4 patient:a_demographics_v1 patient:a_insurance_plan_v1 patient:r_profile_v4 patient:r_contact_v4 patient:r_search_v2 practice:r_facilities_v2 user:r_login_v2 user:r_profile_v2 payer:r_insurance_v1 document:r_document_v2
Environment Configuration
Create a .env file in the project root:
Security Notes
Never commit credentials to version control
.env file is gitignored for security
Use environment variables in production deployments
Restrict HTTP_HOST to localhost (127.0.0.1) unless external access needed
๐ฅ๏ธ Transport Modes
STDIO Transport (Default)
For local MCP clients like Claude Desktop:
HTTP Transport (Remote Access)
For web applications and remote integrations:
Quick HTTP Test
HTTP Transport Testing
Build Command
Test HTTP Transport Functionality
Manual HTTP Testing
๐ Integration Examples
Claude Desktop (STDIO Mode)
Add to Claude Desktop configuration:
Important: Credentials are read from .env file, not Claude Desktop config for security.
HTTP Client Integration (JavaScript)
Server-Sent Events (SSE) Example
๐งช Development & Testing
Development Commands
MCP Inspector (Development Tool)
Testing Scripts
Environment Variables for Testing
๐ง Troubleshooting
Common Issues
Build Errors
Port Conflicts
HTTP Transport Issues
Practice Fusion Authentication
Session Issues (HTTP Mode)
Debug Mode
๐ Production Deployment
Environment Setup
Docker Example
Security Recommendations
Use HTTPS in production with proper SSL certificates
Configure firewall to restrict access
Set up monitoring for health endpoints
Use reverse proxy (nginx, Apache) for advanced features
Implement log aggregation for monitoring
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ค Contributing
Fork the repository
Create feature branch (
git checkout -b feature/amazing-feature)Commit changes (
git commit -m 'Add amazing feature')Push to branch (
git push origin feature/amazing-feature)Open Pull Request
Development Guidelines
Follow TypeScript best practices
Add tests for new features
Update documentation
Test both STDIO and HTTP transports
Ensure no credentials in code
๐ Support
For support and questions:
Check this README and CLAUDE.md documentation
Review error logs for specific issues
Test with health endpoints to isolate problems
Verify Practice Fusion credentials and permissions
Check MCP client compatibility
๐ Additional Documentation
CLAUDE.md - Comprehensive technical documentation
HTTP Transport Details - In-depth HTTP implementation guide
Security Considerations - Security best practices
Integration Examples - More detailed integration examples
โ ๏ธ Security Notice: This server handles healthcare data. Ensure compliance with HIPAA and other healthcare regulations in your deployment. Never commit credentials to version control.