vClinic MCP Server
OfficialAllows searching medical literature via the PubMed API to retrieve clinical guidelines and research articles.
Click on "Install 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., "@vClinic MCP ServerSearch clinic knowledge for hypertension protocol"
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.
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: Epic Patient API 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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/v-clinic/mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server