A Model Context Protocol (MCP) server that provides healthcare tools and prompts for interacting with Practice Fusion using any MCP Client.
- Practice Fusion tools via API
- Uses OAuth2 to authenticate with Practice Fusion
- Anthropic Claude Desktop integration
- Response caching
- Error handling
- Null-safe data formatting
- Comprehensive clinical analysis
get_users
- Get all users in the Practice Fusion practiceget_facilities
- Get all facilities in the Practice Fusion practicesearch_patients
- Search for patients by name, DOB, or other identifiersget_patient_v4
- Get patient details using the v4 APIcreate_patient_v4
- Create a new patient in Practice Fusionupdate_patient_v4
- Update an existing patient in Practice Fusion- And many more Practice Fusion API operations
For local testing, create a .env
file in the root directory with the following variables:
# Practice Fusion API credentials
PF_CLIENT_ID=your_client_id
PF_CLIENT_SECRET=your_client_secret
# API URLs
PF_API_URL=https://api.practicefusion.com
# OAuth settings
PF_TOKEN_PATH=/ehr/oauth2/token
PF_AUTHORIZE_PATH=/ehr/oauth2/auth
PF_CALLBACK_URL={{your redirect uri}}
# Practice Fusion API scopes
PF_SCOPES=calendar:a_confirmation_v1 calendar:a_events_v1 calendar:a_events_v2 ... etc
## Start MCP Server Locally
git clone {practice-fusion-mcp-github path} cd practice-fusion-mcp npm install
npm run build
## Use with Claude Desktop
For Claude Desktop, update your configuration: macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{ "mcpServers": { "filesystem": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "/Users/your-username/Desktop" ] }, "practice-fusion-mcp": { "command": "node", "args": [ "/Users/your-username/{download-path}/practice-fusion-mcp-server/build/index.js" ], "env": { "NODE_ENV": "production" } } } }
Just so you know, you no longer need to include sensitive credentials in the Claude Desktop configuration. All credentials are stored and loaded from the `.env` file on the server.
## Use MCP Inspector
(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
## 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)