medical-mcp-agent
Searches and fetches research articles from the NCBI PubMed database and synthesizes medical abstracts.
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., "@medical-mcp-agentGet differential diagnosis for chest pain and shortness of breath."
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.
medical-mcp-agent
Overview ๐ฉบ
medical-mcp-agent is a Python-based AI-powered medical assistant prototype that combines Groq's Llama-3.3-70b model, real-time PubMed literature search, and a Model Context Protocol (MCP) server.
It provides three interfaces:
FastAPI REST API backend for structured diagnostic JSON responses
Streamlit web dashboard for an interactive dark-themed clinical assistant experience
FastMCP server exposing medical tools to LLM clients
This repository is designed for clinical decision support research and prototyping, not for actual medical diagnosis.
Related MCP server: MCP Healthcare Server
Table of Contents ๐
Features โจ
Extracts medical symptoms from natural language patient descriptions using AI
Generates ranked differential diagnoses, home remedies, treatments, and red-flag warnings
Searches and fetches real research articles from the NCBI PubMed database
Summarizes medical research abstracts into concise 3-4 line insights using AI
Beautiful dark-themed Streamlit dashboard with symptom tags, expandable article cards, and emergency warning banners
FastAPI REST endpoint:
POST /diagnosisMCP server with four callable tools for LLM agents
Tech Stack ๐ง
Python 3.12
Groq API with
Llama-3.3-70b-versatileFastAPI + Uvicorn for REST backend
Streamlit for web UI
FastMCP for MCP server framework
NCBI PubMed Entrez API for medical literature search
BeautifulSoup4 + lxml for HTML/XML parsing
uvas the Python package manager
Project Structure ๐๏ธ
medical-mcp-agent/
โโโ src/
โ โโโ core/
โ โ โโโ config.py # Groq client setup
โ โ โโโ symptom_extractor.py # AI symptom extraction
โ โ โโโ diagnosis_symptoms.py # AI diagnosis generation
โ โ โโโ pubmed_articles.py # PubMed search and fetch
โ โ โโโ summarize_pubmed.py # AI abstract summarization
โ โโโ app/
โ โ โโโ api.py # FastAPI backend
โ โ โโโ streamlit.py # Streamlit web dashboard
โ โโโ mcp/
โ โโโ server.py # FastMCP MCP server
โโโ .env # API keys
โโโ pyproject.toml # Project dependencies
โโโ requirements.txtInstallation โ๏ธ
Clone the repository:
git clone https://github.com/your-username/medical-mcp-agent.git
cd medical-mcp-agentCreate a
.envfile in the project root with your Groq API key:
GROQ_API_KEY=your_key_hereInstall dependencies with
uv:
uv syncAlways prefix commands with
PYTHONPATH=.when running from the project root.
Usage ๐
Run FastAPI
Start the REST backend using the repository root:
PYTHONPATH=. python src/app/api.pyThe API exposes:
POST /diagnosis
Run Streamlit
Open the Streamlit dashboard with:
PYTHONPATH=. uv run streamlit run src/app/streamlit.pyRun MCP Server
Launch the MCP server for LLM integrations:
PYTHONPATH=. uv run fastmcp dev inspector src/mcp/server.pyMCP Tools ๐งฉ
The MCP server exposes the following callable tools:
extract_patient_symptomsโ Extracts symptoms from natural language textgenerate_differential_diagnosisโ Generates diagnoses from a list of symptomssearch_pubmed_literatureโ Searches NCBI PubMed and returns article metadatasynthesize_medical_abstractsโ Summarizes medical research abstracts
These tools allow LLM clients to request structured medical assistance through MCP-aware workflows.
Environment Variables ๐
Create a .env file and add the following variable:
GROQ_API_KEY=your_key_hereThe Groq API key is required for all AI-powered operations.
Example API Request ๐งช
Send a patient description to the FastAPI endpoint:
curl -X POST http://127.0.0.1:8000/diagnosis \
-H "Content-Type: application/json" \
-d '{"patient_description": "36-year-old female with fever, cough, and chest pain."}'The response returns structured JSON with symptoms, differential diagnosis, treatments, and alerts.
Notes ๐
The Streamlit dashboard includes symptom tags, article cards, and warning banners for urgent issues.
The PubMed integration searches the NCBI Entrez API and parses results with BeautifulSoup.
The MCP server supports integration with external LLM agents and tool-based workflows.
Disclaimer โ ๏ธ
This repository is a clinical decision support prototype and NOT a replacement for professional medical advice.
Use this project for experimentation, research, and learning only. Always consult a licensed healthcare professional for real medical decisions.
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
- 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/akshay-aiml/medical-mcp-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server