MCP server + Colab backend for mechanistic interpretability research. Bring-your-own-agent. Privacy-first.
Project description
openinterp-mcp
MCP server + Colab backend for mechanistic interpretability research. Bring your own agent. Works with Claude Code, Cursor, Cline, OpenHands, Aider, or any harness that speaks MCP. Privacy-first. We do not host inference. We do not custody your keys. Your Colab session, your model, your data.
What this is
A research toolkit that turns probe-causality and SAE-feature experiments into agent-callable primitives. Researchers run the model on their own compute (Colab Pro recommended), expose an HTTPS endpoint over ngrok, and let an LLM agent drive experiments via 7 typed tools.
The 7 primitives:
| Tool | What it does |
|---|---|
capture_acts |
Run a forward pass with hooks, return activations at specified layers/positions |
probe_eval |
Apply a published probe to captured activations, return AUROC + per-sample scores |
steer |
Inject a direction at layer L with magnitude alpha, capture output + control-token-normalized delta |
sae_lookup |
Decompose an activation into top-K SAE features with auto-interp descriptions |
causality_protocol |
Run the three mandatory checks (random-feature baseline, control-token norm, structural-rigidity alpha-sweep) automatically |
publish |
Submit experiment result to the public Atlas (HF Datasets + Zenodo DOI), opt-in |
judge_reproduce |
Spawn Claude-Code-as-judge to re-execute and verify a published claim |
Architecture (privacy-first)
USER'S MACHINE (laptop) USER'S COMPUTE (Colab/vast.ai/runpod)
├── Claude Code / Cursor / Cline ├── Colab Secrets (HF/OAI/Anthropic keys)
├── openinterp-mcp (stateless) ├── FastAPI + 7 endpoints
└── ~/.openinterp/sessions.json ├── Qwen3.6-27B + probes loaded
(URLs cached, no secrets) └── ngrok / cloudflared tunnel
│
←── HTTPS (ngrok URL) ──────┘
DOES NOT EXIST ANYWHERE:
✗ api.openinterp.org inference endpoint
✗ a server custodying your keys
✗ telemetry / logs traversing our infra
✗ a database of your queries
Quick start (researchers)
1. In a Colab notebook (one cell)
%pip install openinterp-mcp[colab] -q
from google.colab import userdata
import os
for k in ['HF_TOKEN', 'OPENAI_API_KEY', 'ANTHROPIC_API_KEY', 'NGROK_AUTHTOKEN']:
try: os.environ[k] = userdata.get(k)
except: pass
from openinterp_mcp.colab import launch
url = launch(model="Qwen/Qwen2.5-7B-Instruct")
print(f"\n✓ OpenInterp session ready.\n Paste in Claude: /colab-attach {url}\n")
2. In Claude Code / Cursor / Cline
/colab-attach https://abc123.ngrok-free.app
✓ Connected. Qwen2.5-7B loaded. 5 probes available.
/capture-acts "Solve x^2 = 4" --layers L11,L20,L27 --positions end_question
/probe-eval saturation-direction-L20 --acts last_capture
/causality-protocol L20_pre_tool
Install (agent-side)
pip install openinterp-mcp
Add to claude_desktop_config.json (or equivalent for Cursor/Cline):
{
"mcpServers": {
"openinterp": {
"command": "openinterp-mcp",
"args": ["serve"]
}
}
}
Status
v0.0.1 alpha — Phase 1 of an 11-phase build documented at openinterp.org/mcp. Track progress at github.com/OpenInterpretability/openinterp-mcp/issues.
License
Apache-2.0. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openinterp_mcp-0.1.0.tar.gz.
File metadata
- Download URL: openinterp_mcp-0.1.0.tar.gz
- Upload date:
- Size: 45.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56a992143dcb8a2e88fa36c6c824f6e7302fe855947b243e185a101bae1d4530
|
|
| MD5 |
88eeb9ac37303d9094fa4c35a5d07cd8
|
|
| BLAKE2b-256 |
7d2f12290d746f2370352a468bd545aba24c51570cd78a0872006aea9dc6ecb6
|
File details
Details for the file openinterp_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: openinterp_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 56.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2fd8af7b93c84c1487926582fa4cc4e146db9fbbe79a9060d6ceecdf1d472937
|
|
| MD5 |
35563cbe232cbec46ab2bed4439876ae
|
|
| BLAKE2b-256 |
637ee992ebb1af42039c63bed217fb68a9e0448aed992775098f23e104edc22a
|