shlokkhemani/rabbithole
An infinite canvas for learning — select text, ask, and answers branch out as documents. MCP server for Claude Code, Codex, and any agent.
Rabbithole – an infinite, AI‑powered canvas for learning
What it is – Rabbithole is a lightweight web‑app that lets you create a branching “canvas” of documents that are answered by an LLM of your choice. You start with a document, ask a question at any point, and the answer spawns a new linked document, letting you explore ideas as a tree of self‑contained HTML pages.
Why it matters – It combines a zero‑setup front‑end with a flexible back‑end (the MCP server) that can talk to Claude Code, Codex, OpenAI‑compatible endpoints, or any custom model you run locally. All data stays on your machine – no accounts, no telemetry, no cloud storage.
Core concepts
| Component | Role |
|---|---|
| Web app | Pure‑client side UI that renders the canvas and forwards prompts to a model endpoint you configure (OpenRouter, local OpenAI‑compatible servers, etc.). |
| MCP server | A small Node.js process that mediates between the web UI and “MCP clients” such as Claude Code or Codex. It runs locally, stores documents under ~/.rabbithole/ (or RABBITHOLE_DIR), and handles tool‑call routing. |
| Canvas | A series of HTML snapshots. Each snapshot contains the original content plus any follow‑up questions and the model’s answers, linked together so you can navigate forward and backward. |
Getting started (quick‑start)
- Web version – Open https://rabbithole.ing, paste a question, a URL, a Markdown file, or a PDF. The UI will send the prompt to the model you’ve configured.
- Bridge to Claude Code / Codex – If you have the Claude Code or Codex CLI installed and signed in, run:
This prints a private pairing link and connects the browser page to the local CLI over the loopback interface.npx @shlokkhemani/rabbithole bridge - MCP mode – Install the MCP client (Node 18+ required) and add Rabbithole as a tool:
Then start an agent session and say “Open this document in Rabbithole.” The agent will keep the tool call pending while you interact with the canvas; the MCP server persists asks so you can disconnect and resume later.# Claude Code claude mcp add rabbithole -- npx -y github:shlokkhemani/rabbithole # Codex codex mcp add rabbithole -- npx -y github:shlokkhemani/rabbithole
Development & contribution
git clone https://github.com/shlokkhemani/rabbithole.git
cd rabbithole
npm install
npm run build # builds the browser bundle
npm test # runs the test suite
The repository ships pre‑built browser bundles, so downstream users installing the package from npm get a ready‑to‑run web app without needing to compile anything.
Documentation highlights
- Product & architecture tour –
docs/01-tour.md - Generated module & command maps – useful for developers extending the tool (
docs/generated/*). - Compatibility contract – defines how the web app talks to model endpoints and MCP clients (
docs/compatibility.md). - Design system – visual and interaction guidelines (
docs/design-system.md).
License
MIT – see the LICENSE file.
Bottom line – Rabbithole is a self‑hosted, model‑agnostic, branching‑document UI that lets you turn any LLM interaction into a navigable knowledge map, with all data staying locally under your control.
Related
- Project
- Project
- Project
- Project
- Project