LabscoMCP early access ↗
AlwaysSanyMCP SERVER

Health Microservice API

A FastAPI health-records service that publishes its own endpoints as MCP tools.

by AlwaysSany ↗Biomedical: Genomics & Clinical DataCommunity

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 /docs and 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