Healthcare MCP Server
Provides tools for querying and analyzing patient records stored in a SQLite database, including schema retrieval, SELECT queries, patient risk summaries, and readmission risk summaries.
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 MCP ServerWhat is the risk profile of patient James Walker?"
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 MCP Server
A custom MCP (Model Context Protocol) server that lets an AI agent (Claude Desktop, or any MCP client) query a small patient-records SQLite database.
Project structure
healthcare-mcp-server/
├── server.py # MCP server - registers all tools, runs Streamable HTTP on port 8000
├── db.py # SQLite connection + CREATE TABLE statements
├── seed_data.py # Populates patients.db with sample data
├── requirements.txt
├── tools/
│ ├── schema.py # get_schema tool
│ ├── query.py # query_database tool (SELECT-only, guarded)
│ ├── risk.py # get_patient_risk_summary tool
│ └── readmission.py # get_readmission_risk_summary tool
└── patients.db # created after running db.py + seed_data.pyRelated MCP server: mcp-sqlite-manager
Tools exposed
Tool | What it does |
| Returns all table/column names so the agent can write correct SQL before it queries anything. |
| Runs an agent-generated SQL |
| Joins visits + labs + medications for one patient and produces a risk score/level with reasons. |
| Looks at visit frequency/spacing and diagnosis to estimate readmission risk. |
Setup
cd healthcare-mcp-server
pip install -r requirements.txt
# 1. Create the tables
python db.py
# 2. Populate sample data (safe to re-run)
python seed_data.py
# 3. Start the MCP server (Streamable HTTP on port 8000)
python server.pyThe server will be reachable at http://localhost:8000/mcp.
Connecting it to Claude Desktop
Open Claude Desktop → Settings → Developer → Edit Config.
Add an entry under
mcpServerspointing at your running server:
{
"mcpServers": {
"my-healthcare-server": {
"url": "http://localhost:8000/mcp"
}
}
}Save, fully quit and reopen Claude Desktop.
Click the + icon → your server should now be listed under connectors. Enable it, and Claude will be able to call the four tools above.
Example prompts to try
"Can you get me any 5 patient details?"
"What is the risk profile of the patient James Walker?"
"How many times has James Walker visited the hospital, and which doctors has he consulted?"
The last question needs a JOIN across visits and can't be answered without
the agent first calling get_schema to understand the table structure -
that's the point of exposing schema as its own tool.
Safety note
query_database only allows SELECT statements and blocks a short list of
destructive keywords (insert, update, delete, drop, alter,
attach). This is a minimal example guardrail, not a production-grade
solution - a real deployment would need parameterized queries, per-table
allow-lists, row limits, timeouts, and audit logging on top of this.
This server cannot be deployed
Maintenance
Related MCP Connectors
- OleanderOAuthdev.oleander
The all-in-one data stack for agents. Upload files, run SQL, evolve tables, and render charts.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
- busabaseOAuthcom.busabase
Database for your AI agent. Turn its output into data, docs, skills, and apps you can actually use.
SEC filings and financial data for AI agents: 59 tools for statements, valuation and supply chains.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables LLM agents to perform complete database operations on SQLite databases, including creating tables, executing queries, and managing data through CRUD operations with schema inspection capabilities.23MIT
- FlicenseNot gradedqualityDmaintenanceEnables SQLite database interactions including querying, updating, and schema management through structured tools.3-
- FlicenseNot gradedqualityDmaintenanceExposes a SQLite database to AI assistants with structured, read-safe access. Includes five tools for schema exploration, querying, and sampling data.-
- FlicenseAqualityCmaintenanceEnables AI agents to safely inspect and query a SQLite database through read-only MCP tools for listing tables, describing schemas, and running paginated SELECT queries.3-