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.

Your MCP server address
https://your-healthfix-site/api/mcp

Set it up#

  1. 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.

  2. 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.json in your folder (or run “MCP: Add Server” from the command palette).
  3. Paste the configuration

    Copy the block for your assistant, paste it into the file and replace YOUR_API_KEY with your key. If the file already has other servers, add healthfix next to them.

    json
    {
      "mcpServers": {
        "healthfix": {
          "url": "https://your-healthfix-site/api/mcp",
          "headers": {
            "Authorization": "Bearer YOUR_API_KEY"
          }
        }
      }
    }
  4. 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.

ToolWhat it doesNeeds scope
whoamiWho the key belongs to, the clinic, time zone and currencyany
search_patientsFind patients by name, phone or patient IDpatients:read
get_patientA patient's profile and summarypatients:read
register_patientRegister a new patientpatients:write
update_patientChange some of a patient's detailspatients:write
list_doctorsDoctors and their IDsappointments:read
list_appointmentsAppointments for a day or rangeappointments:read
opd_queueToday's queue with tokens and waiting timesappointments:read
patient_appointmentsA patient's past and upcoming visitsappointments:read
book_appointmentBook an appointmentappointments:write
reschedule_appointmentMove an appointmentappointments:write
set_appointment_statusCheck in, start, complete, cancel, no-showappointments:write
add_walk_inAdd a walk-in and get a tokenappointments:write
patient_medical_historyHistory, recent visits, vitals, labs and care plans in one gorecords:read
get_consultationOne visit in full, with prescriptionrecords:read
list_invoicesInvoices with filtersbilling:read
get_invoiceOne invoice with payments and balancebilling:read
billing_summaryCollections by payment method and duesbilling:read
search_inventoryPharmacy stock by name or statusinventory:read
stock_alertsOut of stock, low, expiring and expired itemsinventory:read
clinic_dashboardThe day's numbersreports: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:read unless 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:

bash
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":{}}}'