MCP server by sivasubramaniyan-06
MediAssist-MCP
MediAssist-MCP is a simple, reliable, hackathon-ready healthcare MCP server built with Python and FastMCP. It exposes synthetic healthcare tools that can plug into MCP clients, the Prompt Opinion Marketplace, and a small Streamlit frontend.
What MCP Is
MCP stands for Model Context Protocol. It is a standard way for AI apps to discover tools, call them with structured arguments, and receive structured JSON back. That makes it a strong fit for hackathon demos where you want interoperability without building a full custom API layer.
Why This Project Works For The Hackathon
- AI factor: it exposes multiple healthcare tools an AI agent can call
- Potential impact: it covers common demo workflows like triage, medicine lookup, and scheduling
- Feasibility: it is local-only, synthetic-only, and easy to run on a MacBook Apple Silicon
What Is Included
- Python + FastMCP server
- Streamlit frontend for visual testing
- Local JSON data source
- Modular clean structure
- Structured JSON responses
- Comments and docstrings
- Error handling and logging
- Optional local Ollama helper
- FHIR-ready notes
- SHARP context placeholders
- Marketplace publishing notes
Folder Layout
MediAssist-MCP/
├── server.py
├── core/
├── data/
├── demo_script.md
├── docs/
├── fhir/
├── frontend/
├── integrations/
├── services/
├── tools/
├── requirements.txt
├── README.md
└── .env.example
Tools Exposed By MCP
symptom_checker(symptom: str)emergency_triage(symptoms: str)bmi_calculator(weight, height)medicine_info(medicine_name: str)nutrition_recommendation(condition: str)appointment_scheduler(name: str, date: str)mental_health_support(mood: str)health_risk_assessment(age: int, smoking: bool, diabetes: bool)
All of them use only synthetic healthcare data and simple local logic.
Install
cd "/Users/siva/Documents/Copy 2/New/MediAssist-MCP"
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
Run Locally
MCP server with stdio transport
MCP_TRANSPORT=stdio python server.py
MCP server with Streamable HTTP transport
MCP_TRANSPORT=streamable-http MCP_HOST=127.0.0.1 MCP_PORT=8000 python server.py
Streamlit frontend
streamlit run frontend/app.py
Test With MCP Inspector
The easiest inspector flow is Streamable HTTP:
- Start the MCP server with:
python server.py
- Start the Inspector:
npx -y @modelcontextprotocol/inspector
- Connect it to:
http://127.0.0.1:8000/mcp
If you prefer stdio, launch the server command directly from the Inspector.
How To Demo For Judges
The best short demo is:
- Open the Streamlit app.
- Run
Symptom checkerwithfever. - Show
Emergency triagewithchest pain and shortness of breath. - Show
Medicine infowithibuprofen. - Show
BMI calculatorusing the default numbers. - Show
Nutrition recommendationfordiabetes. - Show
Appointment schedulerwith a sample name and date. - Finish with
Mental health support.
That sequence shows breadth, local reliability, and practical healthcare usefulness.
Prompt Opinion Integration Notes
MediAssist-MCP is designed to be easy to catalog in a Prompt Opinion Marketplace style flow because:
- the tool names are stable and readable
- every response is structured JSON
- no paid API keys are required
- no real patient data is used
- the server can run over stdio or Streamable HTTP
Suggested integration approach:
- Register the MCP server endpoint in Prompt Opinion.
- Map each tool name to its schema and sample output.
- Use the Streamable HTTP endpoint at
http://127.0.0.1:8000/mcpfor live demos. - Keep the JSON response shapes stable so agents and marketplace cards stay predictable.
Marketplace Publishing Steps
- Confirm the server runs locally with
python server.py. - Confirm the frontend works with
streamlit run frontend/app.py. - Confirm the tools are visible in MCP Inspector.
- Write a short catalog description that explains the synthetic-only healthcare use case.
- Publish the MCP endpoint to your marketplace or registry.
- Add sample tool calls and response examples for judges and reviewers.
Optional Ollama Support
The project includes integrations/ollama_optional.py as a free/local helper.
It is not required for the core demo and is safe to ignore.
If you want to experiment with it, set OLLAMA_ENABLED=true in .env.
Local FastMCP Compatibility Layer
This repository includes a bundled mcp/ package that provides a lightweight FastMCP-compatible
server implementation. That keeps the project runnable on this MacBook's Python 3.9 interpreter
without depending on the external mcp PyPI package, which requires Python 3.10+.
Safety Note
This project is synthetic by design. It is useful for prototyping and hackathon demos, but it is not medical advice and it is not a clinical system.
Terminal Commands
Full local setup
cd "/Users/siva/Documents/Copy 2/New/MediAssist-MCP"
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
Start the MCP server
python server.py
Start the Streamlit frontend
streamlit run frontend/app.py
Start the MCP Inspector workflow
MCP_TRANSPORT=streamable-http MCP_HOST=127.0.0.1 MCP_PORT=8000 python server.py
npx -y @modelcontextprotocol/inspector
Demo Assets
See demo_script.md for a short live demo script, judge-ready talking points, and copy-paste commands.