Skip to main content
Glama
README.md
# methods-mcp

Bioconductor method adapters for the [md-lab](https://github.com/webwebb56/md-lab) substrate. Each adapter wraps one method (limma, fgsea, DESeq2, …) as an MCP tool backed by a small FastAPI-in-Docker container that runs R via rpy2.

Replaces the originally planned `playbase-mcp`. OmicsPlayground is CC BY-NC-ND (commercial-unsafe); we wrap Bioconductor directly. See [md-lab/NOTES.md](https://github.com/webwebb56/md-lab/blob/main/NOTES.md) §3.

## Status

**v0.1.0 skeleton.** Only `limma` is scaffolded, and its container doesn't exist yet — tool calls return `status: "container_unavailable"` until the container ships. This repo exists to prove the adapter pattern end-to-end.

## Architecture

```
Cowork / Codex / Jupyter
    ↓ MCP tool call: limma(intensity_parquet=..., contrast=..., ...)
methods-mcp (FastMCP, this repo)
    ↓ HTTP POST /run
method-limma container (FastAPI + rpy2, separate repo)
    ↓ rpy2
R: limma::eBayes(limma::lmFit(...))
    ↑ result parquet
methods-mcp
    ↑ {results_parquet, summary, methods_sentence, provenance}
Caller
```

Each adapter has four files: `manifest.yaml`, `adapter.py`, `Dockerfile`, `README.md`. See [src/methods_mcp/adapters/limma/](src/methods_mcp/adapters/limma/) for the reference shape.

## Core ship list (W2–W3)

| Method | Status | Container |
|---|---|---|
| limma | skeleton | not built |
| fgsea | — | — |
| fisher_ora | — | — |
| DESeq2 | — | — |
| WGCNA | — | — |
| glmnet + RF | — | — |
| survival (coxph) | — | — |
| sva + ComBat | — | — |

Single-cell (Seurat, monocle3, Azimuth) is also in v0.1 scope per [interview answers §Q4](https://github.com/webwebb56/md-lab/blob/main/md-lab-interview-answers.md).

## Install

```bash
pip install -e ".[dev]"
pytest
# run server
python mcp_server.py            # stdio transport
python mcp_server_http.py       # HTTP transport, port 7102
```

## Community registry

Once the pattern holds, any contributor can ship an adapter package: `manifest.yaml + adapter.py + Dockerfile + README.md`. `md-lab methods install <name>` fetches from the central YAML index in `webwebb56/md-methods-registry`. Homebrew-style install-by-fetch, not npm-style auto-resolution.

Maintenance

ActivityInactive
ResponsivenessNo issues