mindlm-mcp

Text, web pages and PDFs
into mind maps.

An MCP server and a command-line tool. Give it a document; get back a Markdown outline and one standalone HTML mind map that works with no network. No API key required — over MCP the model you are already talking to writes the outline.

npx -y mindlm-mcp demo
Live, and generated by the package itself: this frame is examples/quickstart.md run through export_mindmap. Drag to pan, scroll to zoom, click a node to fold it.

Install

Nothing to install, really — npx fetches it on demand. Node 22.12 or newer.

npx -y mindlm-mcp demo        # render a built-in example and open it
npx -y mindlm-mcp doctor      # what is configured, and where files go
npm  i -g mindlm-mcp          # or keep it around

Add it to a client

All three run the same command and need no environment variables.

Claude Code

claude mcp add mindlm \
  -- npx -y mindlm-mcp serve

Add --scope project for one project, -e KEY=value for env vars.

Claude Desktop

{
  "mcpServers": {
    "mindlm": {
      "command": "npx",
      "args": ["-y", "mindlm-mcp", "serve"]
    }
  }
}

claude_desktop_config.json, then restart the app.

Cursor

{
  "mcpServers": {
    "mindlm": {
      "command": "npx",
      "args": ["-y", "mindlm-mcp", "serve"]
    }
  }
}

~/.cursor/mcp.json, or .cursor/mcp.json in a project.

Tools

ToolTakesReturns
text_to_mindmap text — anything you already have: a draft, notes, a transcript Markdown outline, node and depth stats
url_to_mindmap url — an http(s) page or a PDF served over http Outline of the article body, plus where it came from
pdf_to_mindmap path, optional pages — a local PDF with a text layer Outline built on the document's bookmarks when it has them
export_mindmap markdown — an outline you or your model wrote Path to a standalone HTML mind map

The three outline tools share mode, title, maxDepth, maxChildren, language and export. Full schemas are in the README.

Why there is no API key

client

The MCP default. The server returns a rule-based draft, the cleaned source text and instructions; your client's model rewrites the outline and calls export_mindmap. Nothing leaves your machine that the client was not already seeing.

heuristic

The CLI default. Rules only, no network: headings become branches, ranked sentences become leaves. Deterministic, which matters when you are processing forty documents.

llm

Used only if you set ANTHROPIC_API_KEY or OPENAI_API_KEY. Your key, your endpoint, called over plain fetch. There is no hosted backend and no telemetry.

Command line

mindlm-mcp text notes.md -o notes.html      # a file, or "-" for stdin
mindlm-mcp url https://example.com/article --open
mindlm-mcp pdf paper.pdf --pages 1-20
mindlm-mcp export outline.md -o map.html    # an outline you wrote yourself
mindlm-mcp serve                            # MCP server on stdio
mindlm-mcp doctor

Paths and outlines go to stdout, progress to stderr. Exit codes: 0 ok, 1 usage, 2 input, 3 LLM. --md prints the outline instead of writing a file; --no-offline links CDN assets instead of inlining them.

One file, and it keeps working

Every export inlines d3, markmap-view and the toolbar, so the map opens with a double click on a machine with no network — and still opens in five years, when the CDN has moved on. That costs about 340 KB per file. Raw HTML from the source is never rendered, so text scraped from a hostile page cannot inject script into the file you open. Exports carry no attribution unless you ask for it.

Want a full editor?

mindlm-mcp is deliberately small: an outline goes in, one HTML file comes out. If you want to keep working on the map afterwards — rearrange nodes, restyle branches, collaborate, keep a library — that is what mindlm.io is for. This package works entirely on its own and never talks to it.