Skip to main content
Glama

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.

git clone https://github.com/shlokkhemani/rabbithole.git
cd rabbithole && npm install
claude mcp add rabbithole -- node "$(pwd)/bin/mcp-server.js"

Related MCP server: Grounded Code MCP

๐Ÿค– 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

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

โ€“Maintainers
โ€“Response time
โ€“Release cycle
โ€“Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shlokkhemani/rabbithole'

If you have feedback or need assistance with the MCP directory API, please join our Discord server