Connect
AI assistants (MCP)
Let an AI assistant like Claude, Cursor or VS Code Copilot work with your clinic: “Who is next in Dr. Mehta's queue?”, “Book Ravi Kumar tomorrow at 11”. No coding needed.
What is MCP?#
MCP (Model Context Protocol) is a standard plug that lets AI assistants use outside tools. HealthFix has an MCP server built in, so once you connect it, the assistant can search patients, check the queue, book appointments and read histories, only as far as your key allows.
https://your-healthfix-site/api/mcpSet it up#
Create a key for the assistant
In Settings → API & integrations, click New key, name it after the assistant (e.g. “Claude on my laptop”) and tick what it should be able to do. Start read-only (
patients:read,appointments:read); add write scopes later if you want it to book. Copy the key.Open your assistant's MCP settings file
- Cursor: Settings → MCP → Add new MCP server. This opens
~/.cursor/mcp.json. - Claude Desktop: Settings → Developer → Edit Config. This opens
claude_desktop_config.json. It also needs Node.js installed. - VS Code: create
.vscode/mcp.jsonin your folder (or run “MCP: Add Server” from the command palette).
- Cursor: Settings → MCP → Add new MCP server. This opens
Paste the configuration
Copy the block for your assistant, paste it into the file and replace
YOUR_API_KEYwith your key. If the file already has other servers, addhealthfixnext to them.json{ "mcpServers": { "healthfix": { "url": "https://your-healthfix-site/api/mcp", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } } }Restart and try it
Save the file and restart the assistant. You should see healthfix with a list of tools. Then ask something like:
- “Using HealthFix, who is waiting in today's queue?”
- “Find the patient with phone ending 7313 and show their last visit.”
- “What did we collect today, by payment method?”
The assistant asks you before it changes anything, like booking or cancelling. Read what it plans to do, then approve.
Available tools#
The assistant only sees the tools its key's scopes allow.
| Tool | What it does | Needs scope |
|---|---|---|
whoami | Who the key belongs to, the clinic, time zone and currency | any |
search_patients | Find patients by name, phone or patient ID | patients:read |
get_patient | A patient's profile and summary | patients:read |
register_patient | Register a new patient | patients:write |
update_patient | Change some of a patient's details | patients:write |
list_doctors | Doctors and their IDs | appointments:read |
list_appointments | Appointments for a day or range | appointments:read |
opd_queue | Today's queue with tokens and waiting times | appointments:read |
patient_appointments | A patient's past and upcoming visits | appointments:read |
book_appointment | Book an appointment | appointments:write |
reschedule_appointment | Move an appointment | appointments:write |
set_appointment_status | Check in, start, complete, cancel, no-show | appointments:write |
add_walk_in | Add a walk-in and get a token | appointments:write |
patient_medical_history | History, recent visits, vitals, labs and care plans in one go | records:read |
get_consultation | One visit in full, with prescription | records:read |
list_invoices | Invoices with filters | billing:read |
get_invoice | One invoice with payments and balance | billing:read |
billing_summary | Collections by payment method and dues | billing:read |
search_inventory | Pharmacy stock by name or status | inventory:read |
stock_alerts | Out of stock, low, expiring and expired items | inventory:read |
clinic_dashboard | The day's numbers | reports:read |
Privacy#
- Whatever the tools return is sent to the AI company that runs the assistant. Only connect assistants your clinic trusts with patient data, under a business agreement if you can.
- Give the key the smallest scopes that work. Leave out
records:readunless the assistant really needs medical history. - Every tool call is in your audit log with the key's name. Revoke the key to disconnect the assistant instantly.
For developers#
The server speaks MCP over Streamable HTTP (JSON responses, stateless), protocol versions 2025-06-18, 2025-03-26 and 2024-11-05. Send JSON-RPC with POST and the key as a Bearer token:
curl -X POST "https://your-healthfix-site/api/mcp" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"opd_queue","arguments":{}}}'