Skip to main content
Glama
jagrajsingh86

MCP Live Showcase

README.md
# MCP Live Showcase

Two tiny, self-contained **MCP servers** for a live workshop demo, plus a seeded
database. Built on the official MCP Python SDK (FastMCP).

> **Demo data only.** The clinical server uses fake patients and a fake interaction
> table. It is **not** for clinical use.

## What's here
| File | What it is |
|---|---|
| `clinical_tools.py` | An MCP server with `lookup_patient`, `latest_labs`, `check_drug`, a `patients://list` resource, and a `triage` prompt. Mirrors the healthcare case study (EHR / lab / pharmacy as tools). |
| `data_explorer.py` | A "talk to your data" MCP server over `sales.db` — `list_tables`, `describe_table`, `run_query` (SELECT-only). |
| `seed_db.py` | Creates/reseeds `sales.db`. |
| `sales.db` | Pre-seeded SQLite (12 rows of regional sales). |

## Setup
```bash
python -m venv .venv && source .venv/bin/activate   # optional
pip install -r requirements.txt
python seed_db.py        # creates sales.db (already included, re-run to reset)
```

## Test each server in the MCP Inspector (no AI needed)
```bash
mcp dev clinical_tools.py     # opens the Inspector in your browser
mcp dev data_explorer.py
```
Connect, open the **Tools** tab, run a tool, see the JSON. Great for proving the
server works before any agent touches it.

## Register the servers with your host
**Claude Code** (stdio — use absolute paths):
```bash
claude mcp add clinical-tools -- python /ABS/PATH/clinical_tools.py
claude mcp add data-explorer  -- python /ABS/PATH/data_explorer.py
/mcp        # inside Claude Code: confirm both show "connected"
```
**Claude Desktop:**
```bash
mcp install clinical_tools.py --name "Clinical Tools"
mcp install data_explorer.py  --name "Data Explorer"
```

## Demo prompts (the showcase sequence)
1. **Talk to your data** — `Which region had the highest total sales in Q2? Show the totals per region.`
2. **Clinical lookup** — `Look up patient P-001 and show their latest labs, flagging anything abnormal.`
3. **Decision support** — `For patient P-001, is it safe to prescribe aspirin?`  → flags the warfarin interaction.
4. **Reusable prompt** — run the `/triage` prompt with `P-001`.
5. **The finale (multi-server + GitHub):**
   `For patient P-001, check whether aspirin is safe. If there's a conflict, open a GitHub issue in <owner>/<repo> titled "Prescribing alert: P-001" describing it.`
   → the agent uses **clinical-tools** *and* the **GitHub** server in one flow.

## Publish this project to a GitHub repo (hand to Claude Code)
Open this folder in Claude Code and paste:
```
Initialise a git repository in this folder, then create a new PUBLIC GitHub repository
called "mcp-showcase" under my account using the connected GitHub MCP server (fall back
to the gh CLI or git if needed). Commit every file with the message "MCP showcase: two
custom servers + seeded data", push to the main branch, and reply with the repo URL.
```
That's it — "deploy" here means publishing the source to GitHub; the servers themselves
run locally over stdio for the demo.