markmap-mcp-server

作者 jinzcdev

An MCP server for converting Markdown to interactive mind maps with export support (PNG/JPG/SVG).

277
Stars
35
Forks
TypeScript
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/jinzcdev/markmap-mcp-server

快速入门

使用 markmap-mcp-server 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

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

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:

PreferenceCLIEnvValuesDefault
Output directory--output / -oMARKMAP_DIRany directory path~/.markmap-mcp
Open in browser--open [mode]MARKMAP_OPENalways | never | agent (bare --open = always)never
Return mode--return-modeMARKMAP_RETURN_MODEpath | content | bothpath
Offline HTML--offlineMARKMAP_OFFLINEtrue | 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:

ModeMeaning
pathPaths JSON only (htmlFilePath + filePath)
contentInline content only (raw HTML text, or a base64 image block) — no paths
bothPaths 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).

ParameterTypeDefaultDescription
markdownstringMarkdown content (required unless inputPath is set). Wins when both are provided.
inputPathstringAbsolute path to a local .md file
formathtml | png | svg | jpghtmlOutput format. Image formats need Playwright
filenamestringautoOutput base name (sanitized; prefixed with markmap- if needed; reusing overwrites)
openbooleanfalseWhether 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.

ParameterTypeDefaultDescription
limitnumber20Max 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).

ParameterTypeDefaultDescription
filePathstringAbsolute 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.

ParameterTypeDefaultDescription
maxAgeDaysnumber7Delete files older than this many days
allbooleanfalseIf true, delete all markmap files
dryRunbooleanfalseIf true, preview without deleting

Prompt: mindmap_from_content

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

ParameterTypeDefaultDescription
topicstringTopic or raw notes to organize as a map

Related Projects

ProjectDescription
MarkXMind OnlineCreate XMind mind maps with Markdown online. Try it →
Obsidian MarkXMind PluginRender XMindMark syntax as XMind mind maps inside Obsidian.

License

This project is licensed under the MIT License.

常见问题

What is markmap-mcp-server?

markmap-mcp-server is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by jinzcdev. An MCP server for converting Markdown to interactive mind maps with export support (PNG/JPG/SVG). It has 277 GitHub stars.

Is markmap-mcp-server safe to use?

markmap-mcp-server returned warnings in SkillsLLM's automated security scan. It has no critical vulnerabilities, but review the flagged issues in the Security Report section before adding it to your workflow.

How do I install markmap-mcp-server?

Clone the repository with "git clone https://github.com/jinzcdev/markmap-mcp-server" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is markmap-mcp-server written in?

markmap-mcp-server is primarily written in TypeScript. It is open-source under jinzcdev on GitHub, so you can review or fork the full source.

Are there alternatives to markmap-mcp-server?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh markmap-mcp-server against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情