vClinic MCP Server
OfficialAllows searching medical literature via the PubMed API to retrieve clinical guidelines and research articles.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
vClinic MCP Server
A Model Context Protocol (MCP) server that exposes a virtual clinic's clinical data and knowledge base as tools for AI agents. Agents can manage patients, visits, diagnoses, treatments, lab orders, radiology orders, and search both external medical literature and an internal RAG knowledge base.
Features
Category | Tools |
Patients |
|
Visits |
|
Diagnoses |
|
Treatments |
|
Lab |
|
Radiology |
|
Knowledge search |
|
Staff |
|
All tool calls are audit-logged to data/audit.log (HIPAA § 164.312(b)).
Related MCP server: CharmHealth MCP Server
Project Structure
vClinic-mcp-server/
├── server.py # MCP server entry point
├── audit_logger.py # HIPAA audit log decorator
├── sample_client.py # Test client using langchain-mcp-adapters
├── requirements.txt
├── backend/
│ ├── db.py # SQLite connection & init
│ └── schema.sql # Synthea-aligned schema + operational tables
├── tools/
│ ├── patient_tools.py
│ ├── visit_tools.py
│ ├── diagnosis_tools.py
│ ├── treatment_tools.py
│ ├── lab_tools.py
│ ├── radiology_tools.py
│ ├── medical_search_tools.py
│ └── ...
├── rag_tools/
│ └── rag_tools.py # Pinecone RAG — indexes knowledge_base/
├── knowledge_base/
│ ├── drug_formulary.md
│ ├── clinical_protocols.md
│ └── clinic_sops.md
└── data/
├── vclinic.db # SQLite database (created on first run)
└── audit.log # Append-only CSV audit trailRequirements
Python 3.11+
Pinecone local dev server running on
http://localhost:5080OpenAI API key (for
text-embedding-3-smallembeddings and agent LLM calls)
Setup
# 1. Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate
# 2. Install dependencies
pip install -r requirements.txt
# 3. Set your OpenAI API key
export OPENAI_API_KEY=sk-...Running the Server
# Normal start — creates the DB on first run, loads the Pinecone index
python -m server
# Wipe and recreate the database (drops all patient data)
python -m server --reinitOn startup the server will:
Create
data/vclinic.dband seed default staff (first run only, or with--reinit).Build or load the Pinecone knowledge-base index (
vclinic-knowledge).
Running the Sample Client
The sample client connects to the server over stdio and lists all registered tools:
python sample_client.py
# Start the server with a fresh database
VCLINIC_REINIT=1 python sample_client.pyKnowledge Base (RAG)
Internal clinic documents in knowledge_base/ are indexed into Pinecone at server startup:
File | Content |
| Approved medications, dosing, formulary tiers, contraindications |
| CAP, AGE, HTN, T2DM, fever treatment protocols |
| Registration, vitals, lab/radiology ordering, discharge SOPs |
The search_clinic_knowledge tool performs semantic search over these documents. If the Pinecone index already exists and contains vectors it is reused; otherwise it is built from scratch (requires an active OpenAI API key).
To force a re-index, delete the Pinecone index and restart the server.
Audit Logging
Every tool call is appended to data/audit.log as a CSV row containing:
Field | Description |
| UUID per call |
| UTC ISO-8601 |
| Tool function name |
| JSON-encoded arguments |
|
|
| Error message (if any) |
VS Code / Claude Desktop Configuration
{
"mcpServers": {
"vclinic": {
"command": "python",
"args": ["-m", "server"],
"cwd": "/path/to/vClinic-mcp-server",
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}⚠️ License & Disclaimer
This project is a Proof of Concept (POC) and is intended solely for demonstration and educational purposes.
No Liability: The code owner accepts no responsibility for any damages, data loss, or issues caused by running this software.
As-Is: This software is provided as-is, without warranty of any kind, express or implied, including but not limited to warranties of merchantability, fitness for a particular purpose, or non-infringement.
Not for Clinical Use: This system must not be used to inform, support, or replace real clinical decisions, diagnoses, or patient care of any kind. All data used is fully synthetic and has no connection to real patients or medical records.
License: Distributed under the MIT License.
This server cannot be deployed
Maintenance
Related MCP Connectors
Telehealth support for Claude, Codex and Cursor: investigate cases and connect your tools.
Physician-reviewed medical opinions and prescriptions for AI agents.
Connect AI clients to biomedical data and tools.
Shared business knowledge, tools and skills for AI agents, with citations and approval controls.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables LLM agents to query de-identified FHIR-shaped hospital data through audited, read-only tools for patients, encounters, conditions, observations, medications, and interaction checks, while any medication write stays a draft that a clinician must confirm out-of-band.MIT
- AlicenseNot gradedqualityBmaintenanceEnables LLMs and MCP clients to interact with patient records, encounters, and practice information through an EHR API. It provides 16 tools for clinical, administrative, and communication workflows including appointments, medications, labs, tasks, messaging, and fax.MIT
- AlicenseNot gradedqualityBmaintenanceEnables LLMs and MCP clients to interact with patient records, encounters, and practice information through tools for clinical, scheduling, messaging, and administrative workflows.MIT
- FlicenseNot gradedqualityAmaintenanceEnables LLM-based agents and MCP-compatible clients to query and manipulate clinical data on a FHIR-compliant backend through CRUD resource tools, document ingestion, semantic search, and terminology lookup.-