healthcare-mcp-demo
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., "@healthcare-mcp-demoUpdate patient P-101 status to Discharged"
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 Model Context Protocol (MCP) Demo
A lightweight healthcare demo application showcasing the latest stateless Model Context Protocol (MCP) standard using FastMCP, Pydantic AI, and Google Gemini.
This repository demonstrates how to build a secure, server-side MCP infrastructure that exposes clinical read endpoints, state mutation tools, and workflow prompts, then orchestrates them via an AI Host layer.
Key Concepts & Architecture
MCP Resources (Read Operations): Exposes passive context via custom URIs (e.g.,
healthcare://patients/{patient_id}/record). Used by the AI model to fetch factual data without side effects.MCP Tools (Write/Mutation Operations): Exposes executable actions (e.g.,
update_patient_status). Converts Python type hints and docstrings into JSON Schemas for AI function calling.MCP Prompts (Workflow Templates): Centralizes clinical prompt logic on the server (e.g.,
generate_discharge_summary_prompt), providing standardized instructions across all client environments.Transports (HTTP/SSE): Runs as a stateless remote server over Server-Sent Events (SSE) on HTTP port
8000.Authentication: Uses Bearer Token authorization to secure remote SSE server connections.
AI Host Integration: Uses
pydantic-aiandgoogle-gla:gemini-2.5-flashto automatically inspect tools, make clinical decisions, and execute mutations via natural language queries.
Related MCP server: sharp-on-fhir-mcp
Project Structure
healthcare-mcp-demo/
├── server.py # FastMCP Server (Resources, Tools, Prompts, SSE transport)
├── client.py # Deterministic host test script (Direct MCP protocol verification)
├── pydantic_llm_client.py # AI Host script (Pydantic AI + Gemini + MCPToolset + Auth)
├── pyproject.toml # Project dependencies managed by uv
├── uv.lock # Lockfile for precise dependency resolution
└── README.md # Documentation
----
Prerequisites
Python: 3.10 or higher
Package Manager: uv installed on your system
API Key: Google Gemini API key (GEMINI_API_KEY)
Installation & Setup
Clone or navigate to the repository:
PowerShell
cd healthcare-mcp-demo
Install Dependencies:
uv will automatically set up the virtual environment and install all necessary packages:
PowerShell
uv sync
Configure Environment Variables:
Set your Gemini API key in your terminal session:
PowerShell
# Windows PowerShell
$env:GEMINI_API_KEY="your-actual-gemini-api-key"
# Linux / macOS
export GEMINI_API_KEY="your-actual-gemini-api-key"
Running the Application
Running the demo requires two terminal windows:
Step 1: Start the Remote MCP Server (Terminal 1)
Run the server script using uv:
PowerShell
uv run .\server.py
The server will start listening on http://0.0.0.0:8000/sse.
Step 2: Run the AI Host Client (Terminal 2)
In a second terminal, execute the Pydantic AI client script:
PowerShell
uv run .\pydantic_llm_client.py
Expected Output Workflow
The client establishes an authenticated SSE connection using a Bearer Token (secure-healthcare-secret-token-123).
Pydantic AI sends the user query alongside the discovered MCP tools to Gemini.
Gemini determines that update_patient_status needs to be called.
The MCP Tool executes on server.py, updating the record for patient P-101.
Gemini synthesizes the execution feedback and returns a natural language response:
Plaintext
User Request: 'Please update patient P-101's status to 'Discharged' and set condition to 'Acute Bronchitis - Fully Recovered'.'
Executing request via Gemini + FastMCP...
=== GEMINI RESPONSE ===
The patient record for P-101 has been successfully updated.
* Status: Discharged
* Condition: Acute Bronchitis - Fully RecoveredThis 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.
Related MCP Servers
- Flicense-qualityDmaintenanceA multi-purpose MCP server for AI-powered healthcare assistance that processes clinical data through configurable LLM providers. Maintains webhook endpoints for patient data processing with PostgreSQL logging and OpenAPI documentation.Last updated
- Alicense-qualityCmaintenanceA clean-room SHARP-on-MCP compliant FHIR R4 MCP server that enables AI agents to interact with any FHIR R4 endpoint using SHARP context headers, without server-side OAuth. It provides clinical tools, lab results, imaging, and interactive MCP-UI dashboards.Last updatedMIT
- Alicense-qualityDmaintenanceAn MCP server that brings AI-powered search and conversation to your FHIR clinical documents.Last updated1MIT
- AlicenseBqualityBmaintenanceA local-first, model-agnostic MCP server that stores personal health data in a SQLite file and provides analysis-ready views for any AI client to log, retrieve, and reason over health records.Last updated79MIT
Related MCP Connectors
Hosted MCP server exposing US hospital procedure cost data to AI assistants
MCP server for verifying EUDI/Talao wallet data via OIDC4VP (pull) for AI agents.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/satish-kuncha/healthcare-mcp-demo'
If you have feedback or need assistance with the MCP directory API, please join our Discord server