Skip to main content
Glama
StackBiomed Biomedical MCP Server

StackBiomed Biomedical MCP Server

README.md
# StackBiomed — Read-Only Biomedical MCP Server, Open Supplement Dataset (CC BY 4.0) & BioBench v1.0

[![License: MIT + CC BY 4.0](https://img.shields.io/badge/License-MIT%20(Code)%20%7C%20CC%20BY%204.0%20(Data)-2F6649.svg)](./LICENSE)
[![NIH DSLD v9.4.0](https://img.shields.io/badge/NIH%20DSLD-N%3D121%2C959%20On--Market-1E3D2F.svg)](https://stackbiomed.com/data/)
[![BioBench v1.0](https://img.shields.io/badge/BioBench%20v1.0-42%20Ground--Truth%20Cases-3D7A58.svg)](https://stackbiomed.com/benchmark/)

**Zero-cloud, zero-PHI computational pharmacology infrastructure for grounding biomedical LLMs, clinical RAG pipelines, and AI coding/research agents (Claude Desktop, Cursor, Windsurf, LangGraph).**

Built and maintained by **[StackBiomed](https://stackbiomed.com/)** — a free, browser-local supplement stack auditor & pharmacokinetic evidence engine anchored directly to:
- **NIH Dietary Supplement Label Database (DSLD v9.4.0)**: Full-corpus census of `N = 121,959` active On-Market product labels (`87,643` focused `<8-ingredient` formulas + `34,306` multivitamins)
- **NIH Office of Dietary Supplements (ODS) / National Academies DRI**: `16` statutory adult Tolerable Upper Intake Levels (UL) with explicit intake-scope separation (`supplement_only` vs. `total_food_and_supplement`, Age 51+ Calcium `2,000 mg`, and form exemptions for Beta-Carotene & L-5-MTHF)
- **NCBI PubMed E-utilities**: `164` individual pharmacokinetic claims verified across `93` real PubMed titles/abstracts (`0` retracted records)

---

## Why This Exists

General-purpose LLMs frequently hallucinate supplement safety math:
1. **Confusing compound salt weight with elemental mineral mass** (e.g., treating `2,000 mg` Magnesium L-Threonate as `2,000 mg` elemental Mg instead of `144 mg`).
2. **Misapplying NIH UL intake scopes & exemptions** (counting food magnesium toward the `350 mg` supplemental-only UL, or applying the `3,000 mcg RAE` preformed retinol UL to provitamin A beta-carotene).
3. **Confusing chronic stoichiometry with acute 2-hour clock spacing** (suggesting a 2-hour gap fixes multi-day zinc-induced enterocyte metallothionein copper trapping).
4. **Fabricating PubMed PMIDs** or omitting prescription drug-nutrient depletions (Metformin–B12, PPIs–Mg/B12/Fe, Statins–CoQ10, Levothyroxine chelation, Warfarin–Vitamin K2, ACEi/ARB–Potassium).

This repository ships:
- A **zero-dependency Node.js Read-Only MCP Server** (`mcp/stackbiomed-mcp-server.mjs`) that executes stack math 100% locally.
- The **CC BY 4.0 machine-readable datasets** (`datasets/`).
- **StackBiomed-BioBench v1.0** (`42` adversarial & standard ground-truth evaluation cases).

---

## Quick Start: Connect the Read-Only MCP Server

Requires **Node.js 18+** (zero `npm install` dependencies required).

```bash
git clone https://github.com/379173546hotmail-hub/stackbiomed-mcp-biobench.git
cd stackbiomed-mcp-biobench
npm test
```

### Claude Desktop / Cursor Configuration

Add the following to `claude_desktop_config.json` or `.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "stackbiomed-readonly": {
      "command": "node",
      "args": ["/absolute/path/to/stackbiomed-mcp-biobench/mcp/stackbiomed-mcp-server.mjs"]
    }
  }
}
```

### Exposed MCP Tools (6)

| Tool Name | Execution | Description |
| --- | --- | --- |
| `lookup_nih_ul_and_pathway` | 100% Local | Adult NIH RDA, statutory UL, `supplement_only` vs `total_food_and_supplement` scope, chemical form bioavailability tiers, DSLD quantiles, and verified PMID |
| `check_nutrient_interaction` | 100% Local | Deterministic antagonism, competition, or synergy between any two tracked compounds with evidence tier & PMIDs |
| `audit_supplement_stack_local` | 100% Local (Zero PHI) | Cumulative elemental summation, intake-scope UL checks, Age 51+ Calcium toggle, decoupled Safety vs. Optimization scores, and chronic Zn:Cu screening |
| `lookup_drug_nutrient_pathway` | 100% Local | 8 PubMed-verified Drug-Nutrient Depletion, CYP3A4/P-gp & Nutrigenomics monographs (`CUBN/AMN`, `TRPM6`, `HMGCR`, `MTHFR C677T`, `VKORC1`, `RAAS`) |
| `get_biobench_cases` | 100% Local | Query any of the 42 ground-truth evaluation cases in StackBiomed-BioBench v1.0 |
| `search_nih_dsld_labels` | Read-Only Proxy | Live On-Market lookup against NIH DSLD v9 via `https://stackbiomed.com/api/dsld-search` |

---

## Datasets Included (`v2026.11.9` · CC BY 4.0)

| File | Contents | Live Endpoint |
| --- | --- | --- |
| `datasets/stackaudit-open-dataset-v3.json` | 37 ingredients, 16 statutory NIH ULs, chemical form tiers, interaction rules, `N=121,959` DSLD quantiles | [JSON](https://stackbiomed.com/datasets/stackaudit-open-dataset-v3.json) |
| `datasets/stackaudit-open-dataset-v3.csv` | Flat tabular summary for spreadsheet / pandas ingestion | [CSV](https://stackbiomed.com/datasets/stackaudit-open-dataset-v3.csv) |
| `datasets/stackaudit-pharmacology-v1.json` | 8 Drug-Nutrient Depletion, CYP3A4/P-gp & MTHFR C677T monographs with verified PubMed metadata | [JSON](https://stackbiomed.com/datasets/stackaudit-pharmacology-v1.json) |
| `datasets/stackaudit-llm-grounding-benchmark-v1.json` | **StackBiomed-BioBench v1.0** — 42 verifiable clinical pharmacology LLM grounding cases | [JSON](https://stackbiomed.com/datasets/stackaudit-llm-grounding-benchmark-v1.json) |
| `datasets/stackaudit-mcp-tools.json` | Machine-readable MCP tool manifest | [JSON](https://stackbiomed.com/datasets/stackaudit-mcp-tools.json) |
| `datasets/openapi.json` | OpenAPI 3.1.0 read-only specification | [OpenAPI 3.1](https://stackbiomed.com/openapi.json) |

### Python Quickstart

```bash
python examples/rag_quickstart.py
```

---

## Live Interactive Web Tools & Verification Standards

- **Multi-Bottle Stack Auditor Workbench**: [https://stackbiomed.com/](https://stackbiomed.com/)
- **Open Dataset Directory (CC BY 4.0)**: [https://stackbiomed.com/data/](https://stackbiomed.com/data/)
- **BioBench v1.0 Evaluation Suite**: [https://stackbiomed.com/benchmark/](https://stackbiomed.com/benchmark/)
- **Developers, MCP & OpenAPI 3.1 Docs**: [https://stackbiomed.com/developers/](https://stackbiomed.com/developers/)
- **4-Tier Primary-Source Verification Policy**: [https://stackbiomed.com/about/reviewers/](https://stackbiomed.com/about/reviewers/)
- **LLM Flat Compendiums**: [`/llms.txt`](https://stackbiomed.com/llms.txt) · [`/llms-full.txt`](https://stackbiomed.com/llms-full.txt)

---

## Clinical Scope & License

- **Informational Reference Only**: StackBiomed and this repository are deterministic dosage and primary-source literature reference tools—not medical advice, clinical diagnosis, or personalized prescribing guidance. Always consult a licensed physician or clinical pharmacist before modifying supplements or prescription medications.
- **License**: Source code (`mcp/`, `examples/`) is released under the **MIT License**. Reference datasets (`datasets/`) are released under **Creative Commons Attribution 4.0 International (CC BY 4.0)** with link attribution to `https://stackbiomed.com/data/`.