LABSCO SUMMARY
The MCP surface is generated, so it moves when the API does.
Because FastApiMCP mounts onto the existing FastAPI app, adding a route adds a tool — there is no separate tool list to maintain, and no drift between what the docs say and what an agent can call. That also sets expectations: this is a reference service you host and extend, not a connector to a health system you already run, and the README's own to-do list still has tests, security and logging on it.
What it is
A FastAPI microservice covering a health domain — patients, doctors, appointments, medical records, telemedicine, lab, referrals, pharmacy and insurance — with an MCP server mounted onto the same app through FastApiMCP. The tools an agent sees are the API's own routes.
What you get
- Full CRUD on the core entities —
/doctors,/patients,/medical-records,/appointments - Telemedicine — virtual visits, chat logs and video sessions under
/telemedicine/ - Lab work — orders, results and diagnostic images under
/lab/ - Referrals — requests, statuses and specialist notes under
/referral/ - Pharmacy — medications, prescriptions and orders under
/pharmacy/ - Insurance — plans, claims, payments and invoices under
/insurance/ - Interactive API docs at
/docsand ReDoc at/redoc, so the same surface is browsable by a human
Requirements
This is a service you deploy, not a client-side server. Python 3.13.3+, PostgreSQL and the UV package manager. Published as health-api version 0.1.0. Setup is uv sync, copy .env.example to .env, create the health_db database, uv run alembic upgrade head, then uv run uvicorn app.main:app --host 0.0.0.0 --port 5000. Authentication is JWT: register at POST /auth/register, get a token from POST /auth/login, and every endpoint needs it. MCP clients connect to http://localhost:5000/mcp with an Authorization: Bearer header. Docker Compose brings up the database and the app together.
Setup effort
Build from source — git clone https://github.com/AlwaysSany/health-api.git
USE CASES
Prototyping an assistant over clinical records
Stand up a realistic patient, appointment and record model and let an agent work against it.
Booking and looking up appointments
Create, list and update appointments through the same endpoints the app uses.
Wiring lab orders and results into a workflow
Create an order, then read the result and any diagnostic image back by ID.
Seeing how an existing FastAPI service becomes MCP
Read a working example where the tools are the API routes rather than a hand-written layer.
BEFORE YOU INSTALL
What to know first
Requires
Python 3.13.3+
Where it runs
All 3 documented clients run the server on your machine.
INSTALLATION
Connect your client
This one is built from source rather than installed with a single command.
Server setup
git clone https://github.com/AlwaysSany/health-api.git
cd health-api
uv sync
cp .env.example .envCreate the PostgreSQL database the app expects: CREATE DATABASE health_db;
uv run alembic upgrade head
uv run uvicorn app.main:app --host 0.0.0.0 --port 5000 --reloadWith the app running, register a user with POST /auth/register, then call POST /auth/login to get the access token — that is <YOUR_BEARER_TOKEN> in your client's configuration
MCP Clients
Windsurf
{
"mcpServers": {
"health-api": {
"serverUrl": "http://localhost:5000/mcp",
"headers": {
"Authorization": "Bearer <YOUR_BEARER_TOKEN>"
}
}
}
}<YOUR_BEARER_TOKEN> is the access token from POST /auth/login on your running instance (register first with POST /auth/register).
VS Code
{
"servers": {
"health-api": {
"url": "http://localhost:5000/mcp",
"headers": {
"Authorization": "Bearer <YOUR_BEARER_TOKEN>"
}
}
}
}<YOUR_BEARER_TOKEN> is the access token from POST /auth/login on your running instance (register first with POST /auth/register).
Cursor
{
"mcpServers": {
"health-api": {
"url": "http://localhost:5000/mcp",
"headers": {
"Authorization": "Bearer <YOUR_BEARER_TOKEN>"
}
}
}
}<YOUR_BEARER_TOKEN> is the access token from POST /auth/login on your running instance (register first with POST /auth/register).