Skip to main content
Glama
niklasmeixner-langdock

research-workbench

README.md
# Research Workbench MCP

In-chat scientific viewers for Langdock (or any MCP Apps host). Same job as the Rosalind Workbench viewers, without GPT-Rosalind.

- Repo: https://github.com/niklasmeixner-langdock/research-workbench
- Live MCP: https://research-workbench-production-1b94.up.railway.app/mcp
- Health: https://research-workbench-production-1b94.up.railway.app/health
- Viewer preview: https://research-workbench-production-1b94.up.railway.app/preview

Rosalind’s model is gated. The interesting part of that product is not the model. It is that the structure, the alignment, and the slide stay in the same thread as the question. That is an MCP App problem, and we can ship it.

## What Rosalind actually ships

From [the Rosalind Workbench post](https://developers.openai.com/blog/rosalind-workbench):

| Rosalind surface | What it is | What they demo |
|---|---|---|
| Molecular Structure Viewer | 3D protein / ligand scene next to the interpretation and sequence | PDB `5LF3` proteasome + bortezomib; GLP1R + semaglutide movie |
| Biological Sequence & Alignment Viewer | MSA with functional residues marked | avGFP / EGFP / EBFP / ECFP, chromophore 65–67 |
| Slide Viewer | Pan/zoom tissue image with regions to review | Pathology ROI handoff |
| NGS Analysis Workbench | Plan-first sequencing pipeline | FASTQ → QC → bulk RNA-seq or single-cell |

The custom biology model and NVIDIA BioNeMo skills (OpenFold3, Boltz-2, MSA-Search, Parabricks) sit *behind* those viewers. We do not need them to rebuild the viewers. We do need them if we later want folding, docking, or real NGS compute.

## Relevant tools (what we wrap vs what we skip)

**Viewers we can own**

- [Mol\*](https://molstar.org) — same family of viewer Rosalind is showing. RCSB and PDBe already run it in production.
- Custom MSA canvas — no need for a heavy MSA widget; conservation coloring plus residue highlights covers the GFP demo.
- [OpenSeadragon](https://openseadragon.github.io) — the standard WSI / deep-zoom viewer.

**Public data APIs (no keys)**

- [RCSB Data](https://data.rcsb.org) + Search API — metadata, sequences, ligands, assemblies.
- [UniProt REST](https://rest.uniprot.org) — accessions and gene searches.
- [EBI Clustal Omega](https://www.ebi.ac.uk/jdispatcher/msa/clustalo) — real MSA, with a local Needleman–Wunsch fallback.

**Not in v1 (compute, not viewing)**

- BioNeMo / OpenFold / Boltz — structure prediction. Claude Science already wires these; we can add them later as optional tools.
- FastQC / salmon / DESeq2 / scanpy — `plan_ngs_analysis` drafts the Rosalind-style plan. It does not run FASTQ.
- Docking and movie export — Mol* can do both; they need more scene-state work than a first demo.

## MCP tools

Data tools return JSON. UI tools open an MCP App in the chat.

| Tool | Kind | Role |
|---|---|---|
| `search_structures` | data | PDB keyword search |
| `fetch_structure` | data | RCSB metadata + sequences + ligands |
| `render_structure` | UI | Mol\* structure viewer |
| `fetch_sequences` | data | UniProt fetch / search |
| `align_sequences` | data | Clustal or local MSA |
| `render_alignment` | UI | Sequence & alignment viewer |
| `render_slide` | UI | OpenSeadragon slide viewer |
| `plan_ngs_analysis` | data | Reviewable NGS plan, no pipeline run |

Pattern matches the Langdock cookbook `drawio` / `google-maps` apps: data in, HTML resource out, host renders the iframe.

## Setup

```bash
cd research-workbench
pnpm install
pnpm dev
```

Server listens on `8787` (3000 is usually the Langdock app). MCP endpoint is `/mcp`. Health is `/health`. Set `PORT` to override.

Optional: `CLUSTALO_EMAIL` (defaults to `research-workbench@langdock.com`) for EBI Clustal Omega.

```json
{
  "mcpServers": {
    "research-workbench": {
      "type": "streamable-http",
      "url": "http://localhost:8787/mcp"
    }
  }
}
```

In Langdock, add it as a custom MCP server with that URL (or the Railway URL after deploy). The host must support MCP Apps for the viewers to render inline.

## Demo prompts (Rosalind’s own examples)

**Proteasome + bortezomib**

> Open biological assembly 1 of PDB 5LF3. Color the outer alpha rings teal, the inner beta rings coral, and bortezomib gold. Label the alpha-ring entrance, the catalytic chamber, and a beta5-bound inhibitor.

Expected tool path: `fetch_structure` → `render_structure` with `assemblyId: "1"`, chain colors, ligand color, labels.

**GFP variants**

> Align avGFP, EGFP, EBFP, and ECFP. Highlight the chromophore-forming residues and explain how the substitutions change fluorescent color.

Expected tool path: `fetch_sequences` (P42212 and variants, or a UniProt search) → `render_alignment` with a highlight on columns 65–67.

**Slide review**

> Open this tissue image and mark regions a pathologist should review.

Pass a JPEG/PNG `imageUrl`, or a DZI / IIIF `tileSource`. OpenSeadragon’s public demo tiles work: `https://openseadragon.github.io/example-images/highsmith/highsmith.dzi`.

**NGS plan**

> Draft an analysis plan for dexamethasone-treated airway RNA-seq, treatment vs control, human, 6 samples.

Calls `plan_ngs_analysis`. Review the plan before anyone runs compute.

## Deploy

Stateless and keyless. Build `dist/` and run `pnpm start` behind HTTPS (Railway, Fly, etc.). Set `PORT` if the host requires it.