Skip to main content
Glama
hpaamu

Healthcare Document Intelligence MCP Server

by hpaamu

Healthcare Document Intelligence RAG + MCP

Production-ready starter project for healthcare document intelligence using retrieval-augmented generation, medical document pipelines, PHI-aware preprocessing, a FastAPI service, and an MCP server for agent extensibility.

Highlights

  • Healthcare-focused ingestion for clinical notes, discharge summaries, lab reports, and policy documents

  • PHI redaction layer before indexing and prompt construction

  • Hybrid retrieval with deterministic local embeddings by default and optional OpenAI embeddings

  • Citation-grounded answers with document, section, and page metadata

  • FastAPI REST API with OpenAPI docs at /docs

  • MCP server exposing document search, patient timeline extraction, summarization, and evidence QA tools

  • Docker, Compose, tests, linting, and GitHub Actions CI

  • Offline sample dataset so reviewers can run the project without vendor keys

Related MCP server: FhirMCP

Architecture

documents
  -> parser
  -> PHI redactor
  -> medical chunker
  -> embedding model
  -> vector index
  -> retriever
  -> grounded response
        |-> FastAPI
        |-> MCP tools

Quick Start

cd healthcare-document-intelligence-rag-mcp
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
cp .env.example .env
make seed
make test
make api

Open:

http://127.0.0.1:8000/docs

Ask a grounded question:

curl -X POST http://127.0.0.1:8000/query \
  -H "Content-Type: application/json" \
  -d '{"question":"What follow-up is recommended after discharge?","top_k":4}'

MCP Server

Run the MCP server locally:

make mcp

The server exposes:

  • search_documents

  • answer_question

  • summarize_document

  • extract_patient_timeline

  • redact_phi

Example Claude Desktop style configuration:

{
  "mcpServers": {
    "healthcare-document-intelligence": {
      "command": "python",
      "args": ["-m", "meddoc_intel.mcp.server"],
      "cwd": "/absolute/path/to/healthcare-document-intelligence-rag-mcp"
    }
  }
}

API

Core endpoints:

  • GET /health

  • POST /documents

  • POST /query

  • POST /summaries

  • POST /redact

  • GET /documents

See docs/API.md for examples.

Evaluation

Seed the sample index and run the retrieval smoke evaluation:

make seed
python scripts/evaluate_retrieval.py

The evaluation uses expected-document recall for simple, reviewable regression checks. See docs/ML_PIPELINE.md.

Configuration

The default setup uses deterministic local embeddings, which are ideal for demos, CI, and reproducible tests.

Optional OpenAI support:

EMBEDDING_PROVIDER=openai
OPENAI_API_KEY=sk-...
OPENAI_EMBEDDING_MODEL=text-embedding-3-small

This project is a developer portfolio and prototyping system. It is not medical advice, not a diagnostic device, and not a substitute for professional clinical judgment.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables LLM-based agents to interact with FHIR healthcare data through natural language prompts, providing full CRUD operations on FHIR resources, document processing, and semantic search capabilities.
    13
    98
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables LLMs to securely interact with FHIR healthcare servers and HL7 terminology services. Provides comprehensive healthcare data operations with built-in PHI protection, audit logging, and SMART on FHIR authentication.
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables privacy-first medical document analysis with multi-perspective AI review. Ingest documents, run consilium reviews, generate doctor letters, and search patient memory—all through natural language.
    Apache 2.0

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/hpaamu/healthcare-document-intelligence-rag-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server