Healthcare Appointment Scheduling MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Healthcare Appointment Scheduling MCP ServerFind available slots for Dr. Smith on 2026-09-10"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Healthcare Appointment Scheduling MCP Server
Local mock Model Context Protocol (MCP) server for healthcare appointment scheduling. Designed for development and testing with Retell AI.
All data is stored in local JSON files. There are no real EHR, calendar, or database integrations.
Features
Official
@modelcontextprotocol/sdkwith Streamable HTTP transportZod-validated tool inputs
Persistent local JSON storage (
data/)Health endpoint for uptime checks
Structured JSON tool responses for voice agents
Request/response logging for debugging Retell tool calls
Related MCP server: Health Claims MCP Server
Requirements
Node.js 20+
npm 9+
Installation
cd mcp
cp .env.example .env
npm installRun locally
Development (auto-reload):
npm run devProduction build:
npm run build
npm startServer URLs (default):
Endpoint | URL |
Health |
|
MCP |
|
Health response:
{
"status": "ok",
"service": "healthcare-mcp-server"
}Environment variables
Copy .env.example to .env:
PORT=3000
HOST=0.0.0.0PORT— HTTP portHOST— bind address (0.0.0.0required when exposing via ngrok / Cloudflare Tunnel)
Expose with ngrok
Retell AI needs a public HTTPS URL.
Start the MCP server locally (
npm run dev).In another terminal:
ngrok http 3000Copy the HTTPS forwarding URL, for example:
https://abc123.ngrok-free.appMCP endpoint for Retell:
https://abc123.ngrok-free.app/mcpCloudflare Tunnel (alternative)
cloudflared tunnel --url http://localhost:3000Use the generated HTTPS URL + /mcp.
Connect to Retell AI
Open your Retell AI agent / MCP settings.
Add a custom MCP server URL pointing to:
https://<your-public-host>/mcpSave and refresh tools so Retell can call
tools/list.Confirm the agent can see all eight tools listed below.
Place a test call and watch local server logs for
[MCP] TOOL CALL/TOOL RESPONSE.
This server uses Streamable HTTP with session IDs (Mcp-Session-Id) and JSON responses (enableJsonResponse: true), which works with standard MCP HTTP clients.
Available MCP tools
Tool | Purpose |
| Find patients by first/last name, DOB, phone, or email |
| Create a patient (with duplicate checks) |
| List active providers (optional specialty/name filter) |
| List active appointment types / durations |
| List open slots for provider + type + date |
| List a patient's future scheduled appointments by |
| Book an appointment (prevents double booking) |
| Reschedule / update an appointment |
| Soft-cancel (status= |
| Request a prescription refill for a patient |
Example inputs and outputs
search_patients
Input:
{
"first_name": "John",
"last_name": "Doe"
}Output:
{
"success": true,
"count": 1,
"patients": [
{
"id": "patient_001",
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"date_of_birth": "1990-01-15",
"phone_number": "5551234567",
"email": "john.doe@example.com"
}
]
}create_patient
Input:
{
"first_name": "Alex",
"last_name": "Rivera",
"date_of_birth": "1993-04-02",
"phone_number": "5559998888",
"email": "alex.rivera@example.com"
}get_available_slots
Input:
{
"provider_id": "provider_001",
"appointment_type_id": "appt_type_002",
"date": "2026-09-10"
}Notes:
Provider hours: Monday–Friday 09:00–17:00
Duration comes from the appointment type
Existing scheduled appointments are excluded
get_appointments
Input:
{
"patient_id": "patient_001"
}Output:
{
"success": true,
"patient_id": "patient_001",
"count": 1,
"appointments": [
{
"id": "appointment_001",
"patient_id": "patient_001",
"provider_id": "provider_001",
"appointment_type_id": "appt_type_002",
"date": "2026-09-10",
"start_time": "10:00",
"end_time": "10:15",
"status": "scheduled",
"notes": "Follow-up for blood pressure check"
}
]
}Past and cancelled appointments are excluded.
create_appointment
Input:
{
"patient_id": "patient_001",
"provider_id": "provider_001",
"appointment_type_id": "appt_type_002",
"date": "2026-09-10",
"start_time": "09:00",
"notes": "Blood pressure follow-up"
}Error response shape
{
"success": false,
"error": {
"code": "SLOT_NOT_AVAILABLE",
"message": "The requested appointment slot is not available..."
}
}Common codes: PATIENT_NOT_FOUND, PATIENT_ALREADY_EXISTS, PROVIDER_NOT_FOUND, APPOINTMENT_TYPE_NOT_FOUND, APPOINTMENT_NOT_FOUND, SLOT_NOT_AVAILABLE, INVALID_DATE, INVALID_INPUT.
JSON data files
Located under data/:
File | Contents |
| Patient demographics |
| Providers (active/inactive) |
| Visit types and durations |
| Scheduled / cancelled appointments |
| Prescription refill requests |
Behavior:
Tools read and write these files dynamically
Missing files are created as
[]Writes use a temp file + rename to reduce corruption risk
Changes survive server restarts
Seed data includes 12 patients, 7 providers (6 active), 7 appointment types (6 active), and several sample appointments.
Project structure
src/
index.ts # HTTP server + Streamable HTTP transport
server.ts # MCP server + tool registration
tools/ # MCP tool definitions
services/ # Business logic
utils/ # JSON storage, IDs, dates, responses
types/ # Shared TypeScript types
data/ # Persistent mock JSON dataInspecting logs (Retell debugging)
When Retell calls a tool, the server prints:
[MCP] Incoming POST /mcp ...
[MCP] TOOL CALL search_patients {...}
[MCP] TOOL RESPONSE search_patients {...}Tips:
Keep
npm run devin a visible terminal while testing Retell.Confirm
/healthis reachable through the tunnel before configuring Retell.If tools are missing, verify the MCP URL ends with
/mcp.If sessions fail, ensure the client preserves
Mcp-Session-Idafterinitialize.
Manual smoke test (curl)
Initialize:
curl -s http://localhost:3000/healthList tools (after starting a session with an MCP client) is easiest with the SDK client. A quick end-to-end check (server must already be running):
npm run test:smokeTroubleshooting
Issue | Fix |
Port already in use | Change |
Retell cannot reach server | Confirm ngrok is running and URL uses |
Empty tool list | Restart server, re-add MCP URL in Retell, check initialize logs |
Double booking allowed? | Should not happen — check |
Weekend slots empty | Expected — only Mon–Fri 09:00–17:00 |
Duplicate patient created | Duplicate phone or name+DOB returns |
Data reset | Re-copy seed JSON from git or restore |
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
AI-callable tools for API mocking, testing, monitoring, security, and automation.
Hosted MCP endpoint with realistic fake data for prototyping agents. 12 tools, no setup.
Read appointments, types, calendars and availability; create, cancel or reschedule bookings.
Give your AI agent a phone. Place outbound calls to US businesses to ask, book, or confirm.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables access to mock Epic patient data through 15 MCP tools with two-tier access (list summaries, then fetch details) and LLM-powered natural language search across allergies, medications, conditions, clinical notes, labs, vitals, and procedures.-
- AlicenseNot gradedqualityDmaintenanceProvides a mock interface for managing health insurance operations, including claims processing, benefit inquiries, provider searches, and prior authorization requests. It enables developers to test healthcare workflows using synthetic data through the Model Context Protocol.Apache 2.0
- FlicenseCqualityCmaintenanceEnables AI assistants to search for flights, book them, check booking status, and cancel bookings using mock flight data with no API keys required.4-
- FlicenseNot gradedqualityCmaintenanceSimulates a third-party appointment booking agent, enabling your AI platform to check availability and book appointments via MCP interoperability.-