openinterp / mcp

openinterp-mcp

Bring-your-own-agent infrastructure for mechanistic interpretability research. Works with Claude Code, Cursor, Cline, OpenHands, Aider — anything that speaks MCP. We never see your model, your data, or your keys.

Architecture

The model runs in your Colab / vast.ai / runpod session. A FastAPI backend exposes 8 typed endpoints. An ngrok tunnel makes them reachable from your laptop. The MCP server on your laptop is stateless — it just routes tool calls.

USER'S LAPTOP                                USER'S COMPUTE (Colab / vast.ai / runpod)
├── Claude Code / Cursor / Cline             ├── Colab Secrets (HF, OpenAI, Anthropic, ngrok)
├── openinterp-mcp (stateless tool router)   ├── FastAPI with 8 typed endpoints
└── ~/.openinterp/sessions.json              ├── HF model + tokenizer
    (URLs only, no secrets)                  ├── Probe registry
                                             └── ngrok HTTPS tunnel
            ←──── HTTPS (ngrok URL) ────────────────────┘

DOES NOT EXIST: hosted inference, key custody, telemetry, query database.

8 typed primitives

colab_attach

Attach to a running Colab session via its ngrok URL.

colab_status

Health check, loaded model, probes in memory.

list_probes

Probes currently in the backend registry.

capture_acts

Forward pass with hooks. Returns capture_id.

probe_eval

Apply a probe to a stored capture. AUROC if labels.

steer

Inject direction*α. Control-token-normalized Δrel returned.

sae_lookup

Decompose an activation into top-K SAE features.

causality_protocol

Three mandatory checks → verdict in 5 classes.

What's distinctive

  • Methodology built-in. The three paper-6 mandatory checks (random-feature baseline, control-token normalization, structural-rigidity α-sweep) are not optional flags — they run inside causality_protocol by default and emit a 5-class verdict.
  • Claude-Code-as-judge. Every published result can be independently re-executed by a Claude agent loop that uses the same MCP tools to verify. Distinct from passive LLM-as-judge — active verification.
  • Public atlas with DOIs. Researchers opt in to publish results. Each entry gets a HF dataset, a Zenodo DOI, an auto-generated BibTeX, and citation tracking via Semantic Scholar + arXiv.
  • Zero-server design. openinterp.org hosts docs + index, nothing else. All compute happens on user hardware. All persistence is HuggingFace + Zenodo. No openinterp-controlled API.

Install

pip install "openinterp-mcp[server]"

Apache-2.0. PyPI · GitHub · Quick start docs