NitroStack Calculator MCP Server
A minimal MCP server template for learning NitroStack, providing calculator-focused tools, resources, and prompts with TypeScript and Zod validation.
README
Vitalis โ Clinical Intelligence MCP Server
One-line pitch: A production-grade MCP gateway that gives any LLM client safe, authenticated, auditable access to six clinical intelligence capabilities โ triage, drug safety, diagnostics support, medical research, FHIR patient records, and care coordination โ powered entirely by live public health data, with zero PHI.
1. Overview & Differentiation
Generic symptom-checker LLM applications typically bolt a static disclaimer onto free-form text. Vitalis is developer infrastructure:
- Safety is enforced by framework middleware, not prompt engineering:
EmergencyDetectionGuardscans inputs for red flags before execution.ClinicalSafetyInterceptorrewrites overreach language (e.g., "you are diagnosed with"), stamps urgency tiers, and forces clinical disclaimers automatically.
- Six Real, Live Federal & Clinical APIs:
- NLM RxNorm & RxClass
- OpenFDA (Labels, FAERS Adverse Events, Enforcement/Recalls)
- NCBI PubMed (E-utilities with XML abstract parsing)
- ClinicalTrials.gov API v2
- HAPI FHIR R4 (with Synthea synthetic patient sandbox + SMART Health IT failover)
- NLM Clinical Table Search Service (ICD-10-CM)
- Enterprise Gateway Layer: API-key auth with scopes, per-tool sliding window rate limits, structured JSONL audit logs with input hashing, and health checks.
- Interactive Next.js Widgets: 6 custom UI widgets (including the flagship patient summary card) linked via
@Widgetdecorators.
2. Capability & Module Architecture
Vitalis exposes 25 clinical tools across 6 modules, plus core resources and prompts:
๐ฅ Module 1: Triage (triage)
triage_assess_symptoms: Full triage assessment yielding urgency tier (emergency,urgent,routine,self_care), red-flag matches, candidate conditions, and guidance.triage_check_red_flags: Fast emergency-only screening for critical red-flag terms.triage_get_care_options: Maps urgency tier to concrete clinical care pathways.
๐ Module 2: Drug Safety (drugs)
drug_search: Resolves free-text drug names to RxCUI identifiers, synonyms, and drug classes.drug_get_label_info: Official FDA drug label sections (boxed warnings, contraindications, interactions, etc.).drug_check_interactions: Pairwise drug interaction cross-scanning over official FDA drug labels with evidence excerpts.drug_get_adverse_events: Top reported adverse reactions from FDA FAERS.drug_get_recalls: FDA enforcement and recall actions.
๐ฌ Module 3: Diagnostics Support (diagnostics)
dx_lookup_condition: Condition name lookup to ICD-10-CM codes.dx_interpret_lab_value: Rule-based interpretation of lab values against ~25 analyte reference ranges.dx_explain_lab_test: Patient-friendly explanations of lab tests (grade 6 reading level).dx_symptom_to_codes: Symptom text to candidate ICD-10-CM documentation codes.
๐ Module 4: Medical Research (research)
research_search_pubmed: PubMed literature search with publication type filters.research_get_article: Citation details, DOI, MeSH terms, and parsed XML abstract for a PMID.research_search_trials: ClinicalTrials.gov search with status and phase filters.research_get_trial_details: Detailed trial protocol and eligibility criteria for an NCT ID.research_summarize_evidence: Evidence digest batch for LLM summarization.
๐ Module 5: FHIR Patient Records (fhir)
fhir_search_patients: Search synthetic FHIR R4 patients.fhir_get_patient: Patient demographics and MRN.fhir_get_conditions: Active problem list.fhir_get_medications: Active medication requests.fhir_get_observations: Vital signs and lab history.fhir_get_encounters: Visit timeline.fhir_get_patient_summary: Aggregated clinical summary bundle (feeds thepatient-summarywidget).
๐ค Module 6: Care Coordination (care)
care_generate_handoff: Standardized SBAR or narrative clinical handoff summary.care_reconcile_medications: 3-column medication reconciliation diff identifying added, removed, and duplicate-risk drugs.care_draft_referral: Specialist referral consultation request note.care_find_guidelines: PubMed clinical practice guidelines.care_appointment_prep: Patient visit preparation checklists.
3. System Architecture & Gateway Layer
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MCP CLIENTS (NitroStudio / Claude Desktop / curl) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ STDIO (dev) ยท HTTP+SSE (prod)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ GATEWAY LAYER โ
โ EmergencyDetectionGuard -> ApiKeyGuard -> ScopeGuard โ
โ -> @RateLimit -> TrimPipe -> TOOL HANDLER โ
โ -> ClinicalSafetyInterceptor -> AuditLogInterceptor -> TimingInterceptor โ
โ -> ClinicalExceptionFilter โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ FEATURE MODULES โ
โ triage ยท drugs ยท diagnostics ยท research ยท fhir ยท care ยท core โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ HTTPS
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ LIVE UPSTREAM APIS โ
โ RxNorm ยท openFDA ยท PubMed ยท ClinicalTrials.gov ยท HAPI FHIR ยท ClinTables โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
4. UI Widgets
Vitalis includes 6 Next.js frontend widgets registered in src/widgets/widget-manifest.json:
patient-summary(W5 โญ flagship): Aggregated patient EHR dashboard.triage-result(W1): Urgency tier badges and red-flag chips.drug-safety-report(W2): Severity-banded interaction grid and FDA evidence excerpts.trial-list(W4): Clinical trial cards with status chips.lab-result-card(W3): Quantitative reference-range card.med-reconciliation(W6): 3-column medication diff view.
5. Getting Started & Setup
Prerequisites
- Node.js >= 18.0.0
- npm / npx
Installation & Environment
git clone https://github.com/anshu/my-mcp-server.git
cd my-mcp-server
npm install
Configure .env environment variables (see .env.example):
API_KEY_CLINICIAN=vk_live_clinician_demo_key_01
API_KEY_READONLY=vk_live_readonly_demo_key_02
API_KEY_ADMIN=vk_live_admin_demo_key_03
VITALIS_ALLOW_ANONYMOUS_DEMO=true
Running Locally
# Development mode
npm run dev
# Build production bundle
npm run build
# Start production server
npm start
Testing
# Run unit & integration test suite
npm test
6. Responsible-Use & Clinical Disclaimer
IMPORTANT DISCLAIMER: Vitalis is developer infrastructure designed for clinical decision support research and hackathon demonstration purposes only. It is not a licensed medical device and is not intended for primary medical diagnosis, treatment, or acute care triage without human physician oversight. All FHIR patient records provided by the server are 100% synthetic (Synthea generator) and contain zero protected health information (PHI). Always consult a qualified healthcare professional in medical emergencies.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.