Skip to main content
Glama
README.md
# med-lab-tools

Medical research lab tools as a harness-neutral [MCP](https://modelcontextprotocol.io) server (stdio), with a Claude Code plugin. Works in Claude Code, Codex and any MCP client. Research use only. Not for clinical decisions.

Tools: `lab_search`, `lab_runs`, `medgemma`, `txgemma`, `cellgemma`, `openfold3`, `boltz2`, `evo2`. Prompt: `lab_plan` (planning guidance). Skills: `plan-and-verify`, `med-research`.

## What you need

The server does not run models. It calls a med-lab gateway over HTTP, which hosts the models (see [sankhya-ai/med-lab](https://github.com/sankhya-ai/med-lab); its gateway has mock backends for testing). The gateway contract: `POST /v1/models/:id/run`, `GET /v1/runs`, `GET /v1/runs/:id`, bearer-key auth.

- `MEDLAB_API_KEY` (required)
- `MEDLAB_URL` (default `http://localhost:8787`)

Mock results are labeled MOCK and are never findings. No dependencies; Node 20+.

```
git clone https://github.com/sankhya-ai/med-lab-tools && cd med-lab-tools
```

Below, `<path>` is that checkout.

## Claude Code

Plugin (tools plus the two lab skills):

```
export MEDLAB_API_KEY=...        # and MEDLAB_URL if the gateway is not local
claude --plugin-dir <path>
```

Or only the MCP server, for all your projects:

```
claude mcp add med-lab --scope user -e MEDLAB_API_KEY=... -e MEDLAB_URL=http://localhost:8787 -- node <path>/server/med-lab-mcp.mjs
```

## Codex

```
codex mcp add med-lab --env MEDLAB_API_KEY=... --env MEDLAB_URL=http://localhost:8787 -- node <path>/server/med-lab-mcp.mjs
```

Or in `~/.codex/config.toml`:

```toml
[mcp_servers.med-lab]
command = "node"
args = ["<path>/server/med-lab-mcp.mjs"]

[mcp_servers.med-lab.env]
MEDLAB_API_KEY = "..."
MEDLAB_URL = "http://localhost:8787"
```

## Any other MCP client (Cursor, Cline, Zed, Claude Desktop, ...)

```json
{ "mcpServers": { "med-lab": {
  "command": "node",
  "args": ["<path>/server/med-lab-mcp.mjs"],
  "env": { "MEDLAB_API_KEY": "...", "MEDLAB_URL": "http://localhost:8787" }
} } }
```

## Use from code

`import { TOOLS } from "med-lab-tools/tools"` gives plain JSON Schema definitions with an `execute(args)` each, for harnesses that take native tools instead of MCP (the med-lab app does this). `med-lab-tools/plan-guidance.md` is the planning text.

## Tests

`npm install && npm test`. It runs a raw stdio JSON-RPC test and the official MCP SDK client against a built-in mock gateway.

## Skills

`skills/` holds `plan-and-verify` and `med-research`. Claude Code loads them with the plugin. Other harnesses: copy them to the harness's skills folder if it supports `SKILL.md`.