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.
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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。