Skip to main content
Glama
jinzcdev
by jinzcdev

Markmap MCP Server

Sample Mindmap

NPM Version NPM Downloads GitHub License 中文文档 Stars

Markmap MCP Server is based on the Model Context Protocol (MCP). It converts Markdown into interactive mind maps using markmap, and can optionally export PNG / JPG / SVG on the server for Agent-friendly delivery. Generation runs locally — no third-party API keys required.

Features

  • Markdown → Mind Map: Convert Markdown (headings + nested lists) to interactive HTML mind maps

  • Agent-friendly returns: Return a file path, inline HTML, and/or image content (configured at startup)

  • Server-side export: Export PNG / JPG / SVG via Playwright for chat/inline preview

  • Browser preview: Configurable open behavior — always, never, or agent-decided (startup setting)

  • Browser export toolbar: When viewing HTML, also export PNG/JPG/SVG or copy Markdown in the page UI

  • Offline HTML: Startup --offline inlines assets so the page works without CDN access

  • File workflows: Read from inputPath, list recent outputs, clean up old files

  • Privacy-first: Fully local conversion; no cloud mind-map API

Related MCP server: MindManager MCP Server

Prerequisites

  1. Node.js v20 or above

  2. For server-side image export (format: png|jpg|svg): install Playwright and Chromium

npm install playwright
npx playwright install chromium

(playwright is an optional dependency of this package.)

Installation

# Install from npm
npm install @jinzcdev/markmap-mcp-server -g

# Basic run
npx -y @jinzcdev/markmap-mcp-server

# Specify output directory and auto-open in browser
npx -y @jinzcdev/markmap-mcp-server --output /path/to/output/directory --open always

Docker

docker build -t markmap-mcp-server .
docker run --rm -i \
  -v /path/to/output:/data/markmap \
  -e MARKMAP_DIR=/data/markmap \
  markmap-mcp-server

Or clone and run locally:

git clone https://github.com/jinzcdev/markmap-mcp-server.git
cd markmap-mcp-server
npm install && npm run build
# Optional: enable server-side image export
npx playwright install chromium
node build/index.js

Usage

Add the following configuration to your MCP client (Cursor / Claude Desktop / etc.):

{
  "mcpServers": {
    "markmap": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@jinzcdev/markmap-mcp-server"],
      "env": {
        "MARKMAP_DIR": "/path/to/output/directory",
        "MARKMAP_OPEN": "never",
        "MARKMAP_RETURN_MODE": "path"
      }
    }
  }
}

Server preferences (CLI / env)

These are decided when the server starts — not tool arguments:

Preference

CLI

Env

Values

Default

Output directory

--output / -o

MARKMAP_DIR

any directory path

~/.markmap-mcp

Open in browser

--open [mode]

MARKMAP_OPEN

always | never | agent (bare --open = always)

never

Return mode

--return-mode

MARKMAP_RETURN_MODE

path | content | both

path

Offline HTML

--offline

MARKMAP_OFFLINE

true | false (CLI: pass --offline to enable)

false

CLI flags override environment variables. --output overrides MARKMAP_DIR.

--open: bare --open means always. You may also pass --open always|never|agent. An invalid value exits with an error. Without the flag, MARKMAP_OPEN is used (default never).

Return mode:

Mode

Meaning

path

Paths JSON only (htmlFilePath + filePath)

content

Inline content only (raw HTML text, or a base64 image block) — no paths

both

Paths JSON plus inline content

Generated HTML always includes the markmap toolbar, English export labels, and fully expanded nodes.

Example prompts

  • “Summarize this design doc as a mind map.”

  • “Convert ./notes/architecture.md to a mind map.”

  • “Generate a PNG mind map of this outline for the chat.”

Available Tools

markdown_to_mindmap

Convert Markdown into an interactive mind map (and optionally an image).

Parameter

Type

Default

Description

markdown

string

Markdown content (required unless inputPath is set). Wins when both are provided.

inputPath

string

Absolute path to a local .md file

format

html | png | svg | jpg

html

Output format. Image formats need Playwright

filename

string

auto

Output base name (sanitized; prefixed with markmap- if needed; reusing overwrites)

open

boolean

false

Whether to open the result in browser. Only exposed when server open mode is agent (--open agent / MARKMAP_OPEN=agent).

Return (returnMode=path):

{
  "htmlFilePath": "/path/to/markmap-….html",
  "filePath": "/path/to/markmap-….html"
}

For image formats, filePath is the image path and htmlFilePath is still the HTML source.

Return (returnMode=content): Raw HTML text block, or an MCP image content block (base64) for png/jpg/svg — no paths JSON. Oversized HTML (≥200KB) falls back to paths JSON.

Return (returnMode=both): Paths JSON plus the inline content above.

Note: Interactive zoom/collapse and the in-page “Export PNG/JPG/SVG” buttons are part of the HTML viewer. Server-side format: png|jpg|svg is what Agents can consume directly without a manual browser click.

list_mindmaps

List recent generated files in the output directory (newest first). Only files whose names start with markmap are included.

Parameter

Type

Default

Description

limit

number

20

Max files to return (1–200)

Returns {outputDir, files: [{name, filePath, size, mtimeMs, mtime}]}.

get_mindmap

Retrieve a generated mind map file by its absolute path. Path must stay inside the configured output directory (path traversal denied).

Parameter

Type

Default

Description

filePath

string

Absolute path to the mind map file (HTML or image)

Returns JSON {filePath, mimeType, size}. For HTML/SVG under 200KB, also appends a text content block. PNG/JPG return metadata only (no image block) — re-export via markdown_to_mindmap with format=png\|jpg if pixels are needed.

cleanup_mindmaps

Delete old (or all) generated mind map files.

Parameter

Type

Default

Description

maxAgeDays

number

7

Delete files older than this many days

all

boolean

false

If true, delete all markmap files

dryRun

boolean

false

If true, preview without deleting

Prompt: mindmap_from_content

Helper prompt that asks the model to structure notes as Markdown, then call markdown_to_mindmap.

Parameter

Type

Default

Description

topic

string

Topic or raw notes to organize as a map

Project

Description

MarkXMind Online

Create XMind mind maps with Markdown online. Try it →

Obsidian MarkXMind Plugin

Render XMindMark syntax as XMind mind maps inside Obsidian.

License

This project is licensed under the MIT License.

Available Tools

1 tool
markdown_to_mindmapB

Convert a Markdown document into an interactive mind map

ParametersJSON Schema
NameRequiredDescriptionDefault
markdownYesMarkdown content to convert into a mind map
openNoWhether to open the generated mind map in a browser (default: false)

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the conversion action but fails to describe key behavioral traits such as what format the mind map output takes (e.g., file, URL, visual representation), whether the conversion is reversible, any rate limits, or error handling. This leaves significant gaps for an agent to understand how to interact with the tool effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It is front-loaded with the core action, making it easy to parse and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a conversion tool with no annotations and no output schema, the description is incomplete. It lacks details on the output format (e.g., how the mind map is returned or accessed), potential side effects, or any prerequisites for successful conversion. This leaves the agent with insufficient context to use the tool reliably.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the input schema already documents both parameters ('markdown' and 'open') thoroughly. The description adds no additional meaning beyond what the schema provides, such as examples of Markdown content or implications of the 'open' parameter. Baseline 3 is appropriate as the schema handles the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Convert') and the resources involved ('Markdown document' into 'interactive mind map'), leaving no ambiguity about what the tool does. It distinguishes the transformation process explicitly, which is sufficient even without sibling tools for comparison.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when converting Markdown to a mind map, but provides no explicit guidance on when to use this tool versus alternatives (e.g., other conversion tools or manual methods). Since there are no sibling tools listed, this omission is less critical, but it still lacks proactive usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 1 tool update
    • First observedmarkdown_to_mindmap

TDQS

A3.5/5.0
Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The tool's purpose is clearly distinct and singular.

Naming Consistency5/5

The single tool name follows a clear verb_noun pattern (markdown_to_mindmap), establishing a consistent naming convention for the server.

Tool Count2/5

One tool is too few for a server's typical scope, as it limits functionality and may indicate an incomplete or overly narrow implementation. However, it is not as extreme as a trivial single tool, so it avoids the lowest score.

Completeness3/5

The tool provides a core conversion function, but there are notable gaps such as missing operations for editing, saving, or loading mind maps, which could hinder agent workflows. The surface is functional but not fully comprehensive.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Connectors

Related MCP Servers

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/jinzcdev/markmap-mcp-server'

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