practice-fusion-mcp
Enables read-only FHIR access to Practice Fusion EHR to search patients, appointments, conditions, medications, and lab results.
README
practice-fusion-mcp
An open-source, FHIR-first, read-only Model Context Protocol server for Practice Fusion. Connect Claude (Desktop / Code), Cursor, or any MCP client to a Practice Fusion EHR to search patients and review appointments, conditions, medications, and labs — running on Practice Fusion's free Open FHIR account.
Read-only by design. Audit-logged. No write access, no scheduling, no patient creation.
Architecture
flowchart LR
C["MCP client<br/>Claude Desktop / Code · Cursor"] -- stdio --> S
subgraph S["practice-fusion-mcp"]
direction TB
T["MCP tools<br/>search_patients · get_patient<br/>appointments · conditions<br/>medications · lab_results"]
A["Audit logger<br/>stderr + optional file<br/>PHI-redacted"]
F["FHIR client<br/>Bundle unwrap · shapers<br/>sanitized errors"]
TP["SMART backend-services<br/>TokenProvider<br/>signed JWT assertion · token cache"]
T -. audited .-> A
T --> F
F --> TP
end
TP -- "OAuth2 client-credentials" --> AUTH["PF token endpoint"]
F -- "read-only FHIR R4" --> PF["Practice Fusion<br/>Open FHIR API"]
AUTH -- access token --> F
Every tool call flows through the audit logger; the FHIR client only ever holds a short-lived token minted from a signed JWT assertion (SMART backend-services), and long free-text parameters are redacted before anything is logged.
Tools
All tools are namespaced with a practicefusion_ prefix (so they don't collide when loaded alongside other MCP servers), carry a readOnlyHint annotation, and return a typed outputSchema / structuredContent. List tools accept an optional limit (default 50, max 200) and report count and has_more.
| Tool | What it does |
|---|---|
practicefusion_search_patients |
Find patients by name / birthdate / gender / identifier |
practicefusion_get_patient |
One patient's demographics by id |
practicefusion_get_appointments |
Appointments by patient / status / date |
practicefusion_get_conditions |
A patient's problems / diagnoses |
practicefusion_get_medications |
A patient's medication requests |
practicefusion_get_lab_results |
A patient's laboratory observations |
Setup
- Register a free Practice Fusion Open FHIR developer account and create a System / backend-services app. Note your FHIR base URL, token URL, client id, and register your app's public key.
- Provide the environment variables below. In production, use your MCP client's
envblock (shown in step 3). For local development, copy.env.exampleto.env—pnpm devloads it automatically. - Add to your MCP client config, e.g. Claude Desktop:
{
"mcpServers": {
"practice-fusion": {
"command": "npx",
"args": ["-y", "practice-fusion-mcp"],
"env": {
"PF_FHIR_BASE_URL": "https://fhir.practicefusion.com/r4",
"PF_TOKEN_URL": "https://auth.practicefusion.com/token",
"PF_CLIENT_ID": "your-client-id",
"PF_PRIVATE_KEY": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----"
}
}
}
}
Environment variables
| Var | Required | Default | Notes |
|---|---|---|---|
PF_FHIR_BASE_URL |
yes | — | FHIR R4 base URL |
PF_TOKEN_URL |
yes | — | OAuth2 token endpoint |
PF_CLIENT_ID |
yes | — | Backend-services client id |
PF_PRIVATE_KEY |
yes | — | PKCS8 PEM private key (matches the registered public key) |
PF_SCOPES |
no | system/*.read |
Requested scopes |
PF_TOKEN_ALG |
no | RS384 |
JWT signing alg |
PF_AUDIT_LOG |
no | — | Optional file path for audit records (always also written to stderr) |
Security & HIPAA
This server handles Protected Health Information. You, the deployer, are the covered entity or business associate: you are responsible for your own Business Associate Agreement (BAA) with Veradigm/Practice Fusion and for running this in a HIPAA-appropriate environment. Every tool call is audit-logged (stderr, plus optional file) with long free-text parameters redacted. Tokens and keys are never logged. This project ships code, not a hosted data service. Not legal advice.
How it differs from the alternative
The other Practice Fusion MCP is built on Practice Fusion's proprietary Unity APIs (paid Integrator tier) and is write-heavy. This one is FHIR-based (runs on the free Open account), read-only (smaller risk surface), and audit-logged.
Development
pnpm install
pnpm test # unit tests (mocked FHIR)
pnpm build # bundle to dist/
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.