rabbithole

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.

Category
Visit 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:

  1. Check Node: node --version must be โ‰ฅ 18.
  2. 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). The npx -y github:shlokkhemani/rabbithole form needs no clone and no install step โ€” npx fetches this repo and runs bin/mcp-server.js over stdio.
  3. Verify: after the client reconnects, three tools should be available โ€” open_rabbithole, answer_branch, list_rabbitholes. (In Claude Code, claude mcp list should show rabbithole as connected. The server itself also responds to a standard MCP initialize with server name rabbithole.)
  4. Tell your human what to do next: they should start a session and say "open <some document> in rabbithole" โ€” you then call open_rabbithole with { title, content } (or { title, file_path }), which blocks until they select text and ask. Answer with answer_branch (stream chunks with partial: true, finish with a titled final call) and keep looping until status='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/k walk marks, โ†ต opens, โŒซ jumps back up, โŒ˜K searches 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), storage
  • website/ โ€” rabbithole.ing, a Next.js single-page site

License

MIT

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured