rabbithole
Rabbithole provides an infinite canvas for learning by allowing users to open documents, select text, ask questions, and receive answers that open as child documents, all running locally via an MCP server.
README
Rabbithole
An infinite canvas for learning. Open a document, select any text, ask a question โ and the answer opens as a fully-rendered child document. Recurse as deep as you like. Every hole is saved and revisitable.
Rabbithole is an MCP server. Your terminal agent (Claude Code, Codex, or any MCP client) does the answering; Rabbithole gives it a canvas in your browser. Everything runs locally โ no account, no API keys, nothing leaves your machine.
๐ rabbithole.ing
Quick start
Requires Node 18+ and a browser. Pick your agent:
Claude Code
claude mcp add rabbithole -- npx -y github:shlokkhemani/rabbithole
Codex
codex mcp add rabbithole -- npx -y github:shlokkhemani/rabbithole
Any other MCP client โ add this to its MCP config:
{
"mcpServers": {
"rabbithole": {
"command": "npx",
"args": ["-y", "github:shlokkhemani/rabbithole"]
}
}
}
Then start a new agent session and say:
open this document in rabbithole
A browser tab opens. Select any text on the page, ask a question (or tap a lens โ Explain ยท ELI5 ยท Example ยท Go Deeper), and the answer streams in as a new document. Keep going.
<details> <summary><strong>Prefer running from a local clone?</strong> (faster startup, easier hacking)</summary>
git clone https://github.com/shlokkhemani/rabbithole.git
cd rabbithole && npm install
claude mcp add rabbithole -- node "$(pwd)/bin/mcp-server.js"
</details>
๐ค If you are an AI agent setting this up
Follow these steps exactly:
- Check Node:
node --versionmust be โฅ 18. - Register the server with the one-liner above that matches the agent
you are running inside (
claude mcp add โฆfor Claude Code,codex mcp add โฆfor Codex, or write the JSON block into the client's MCP config file). Thenpx -y github:shlokkhemani/rabbitholeform needs no clone and no install step โ npx fetches this repo and runsbin/mcp-server.jsover stdio. - Verify: after the client reconnects, three tools should be available โ
open_rabbithole,answer_branch,list_rabbitholes. (In Claude Code,claude mcp listshould showrabbitholeas connected. The server itself also responds to a standard MCPinitializewith server namerabbithole.) - Tell your human what to do next: they should start a session and say
"open <some document> in rabbithole" โ you then call
open_rabbitholewith{ title, content }(or{ title, file_path }), which blocks until they select text and ask. Answer withanswer_branch(stream chunks withpartial: true, finish with a titled final call) and keep looping untilstatus='session_closed'.
Notes for you: the tool call blocks by design (long-poll) โ that is normal, not
a hang. First npx run takes ~15โ30s while it fetches the repo; later runs are
cached. If the browser must not auto-open (headless), set
RABBITHOLE_NO_BROWSER=1 in the server's env.
Tools
| Tool | What it does |
|---|---|
open_rabbithole |
Open a doc ({ title, content } / { title, file_path }) or resume one ({ hole_id }). Opens the canvas in the browser and blocks until the human asks something. |
answer_branch |
Answer a pending branch request โ a child document. Stream with partial: true chunks, then finish with a normal call carrying the node title. |
list_rabbitholes |
List saved holes to resume by id. |
The loop: open_rabbithole โ branch_request โ answer_branch โ branch_request โ โฆ โ session_closed.
What's inside
- Reader mode (default): fullscreen reading, branches sidebar, breadcrumbs; selections become inline marks (pending โ ready); hover a ready mark for a peek preview; child docs carry a FROM strip that jumps back to the exact origin.
- Streamed answers: words appear live with a breathing caret โ in the reader, the thread, and the canvas card.
- Lenses: one-tap presets on the ask popup โ Explain ยท ELI5 ยท Example ยท Go Deeper (keys 1โ4).
- Follow-up chat: a composer under each document asks about the doc as a whole; answers render inline and are branchable like any other text.
- Canvas mode: infinite pan/zoom, draggable/resizable cards, edges that attach to the exact selected text in the parent, collapse, auto-layout.
- Navigation:
j/kwalk marks,โตopens,โซjumps back up,โKsearches the whole hole. - Share/export: copy any trail or document as Markdown, download a frozen single-file snapshot, or ask the agent for a synthesis of the whole journey.
- Durable asks: questions asked while the agent is away are saved and re-queued on resume โ the agent answers them first thing.
- Persistence: holes auto-save as JSON under
~/.rabbithole/; resuming restores the doc, scroll position, mode, and canvas framing.
Configuration
| Env var | Effect |
|---|---|
RABBITHOLE_DIR |
Override the storage directory (default ~/.rabbithole/). |
RABBITHOLE_NO_BROWSER=1 |
Don't auto-open the browser (headless/testing). |
Repo layout
bin/mcp-server.jsโ entry point (stdio MCP server)src/โ server, canvas UI (self-contained HTML), storagewebsite/โ rabbithole.ing, a Next.js single-page site
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.