Skip to content

Commit be2f9fa

Browse files
committed
docs: add README for Markmap MCP Server
1 parent e6f925c commit be2f9fa

File tree

5 files changed

+224
-3
lines changed

5 files changed

+224
-3
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@ typings/
7878
# lib
7979
lib/
8080

81-
# docs
82-
docs/
83-
8481
**/.DS_Store
8582

8683
build/

README.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Markmap MCP Server
2+
3+
![Sample Mindmap](./docs/markmap.png)
4+
5+
[![NPM Version](https://img.shields.io/npm/v/@jinzcdev/markmap-mcp-server.svg)](https://www.npmjs.com/package/@jinzcdev/markmap-mcp-server)
6+
[![GitHub License](https://img.shields.io/github/license/jinzcdev/markmap-mcp-server.svg)](https://www.npmjs.com/package/@jinzcdev/markmap-mcp-server)
7+
[![中文文档](https://img.shields.io/badge/中文文档-点击查看-blue)](README_zh-CN.md)
8+
[![Stars](https://img.shields.io/github/stars/jinzcdev/markmap-mcp-server)](https://github.com/jinzcdev/markmap-mcp-server)
9+
10+
Markmap MCP Server is based on the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) that allows one-click conversion of Markdown text to interactive mind maps, built on the open source project [markmap](https://github.com/markmap/markmap). The generated mind maps support rich interactive operations and can be exported in various image formats.
11+
12+
## Features
13+
14+
- 🌠 **Markdown to Mind Map**: Convert Markdown text to interactive mind maps
15+
- 🖼️ **Multi-format Export**: Support for exporting as PNG, JPG, and SVG images
16+
- 🔄 **Interactive Operations**: Support for zooming, expanding/collapsing nodes, and other interactive features
17+
- 📋 **Markdown Copy**: One-click copy of the original Markdown content
18+
- 🌐 **Automatic Browser Preview**: Option to automatically open generated mind maps in the browser
19+
20+
## Prerequisites
21+
22+
1. Node.js runtime environment
23+
24+
## Installation
25+
26+
### Manual Installation
27+
28+
```bash
29+
# Install from npm
30+
npm install @jinzcdev/markmap-mcp-server -g
31+
32+
# Basic run
33+
npx -y @jinzcdev/markmap-mcp-server
34+
35+
# Specify output directory
36+
npx -y @jinzcdev/markmap-mcp-server --output /path/to/output/directory
37+
```
38+
39+
Alternatively, you can clone the repository and run locally:
40+
41+
```bash
42+
# Clone the repository
43+
git clone https://github.com/jinzcdev/markmap-mcp-server.git
44+
45+
# Navigate to the project directory
46+
cd markmap-mcp-server
47+
48+
# Build project
49+
npm install && npm run build
50+
51+
# Run the server
52+
node build/index.js
53+
```
54+
55+
## Usage
56+
57+
Add the following configuration to your MCP client configuration file:
58+
59+
```json
60+
{
61+
"mcpServers": {
62+
"markmap": {
63+
"type": "stdio",
64+
"command": "npx",
65+
"args": [
66+
"-y",
67+
"@jinzcdev/markmap-mcp-server",
68+
"--output",
69+
"/path/to/output/directory"
70+
]
71+
}
72+
}
73+
}
74+
```
75+
76+
> [!TIP]
77+
>
78+
> The service supports the following environment variables:
79+
>
80+
> - `MARKMAP_DIR`: Specify the output directory for mind maps (optional, defaults to system temp directory)
81+
>
82+
> **Priority Note**:
83+
>
84+
> When both the `--output` command line argument and the `MARKMAP_DIR` environment variable are specified, the command line argument takes precedence.
85+
86+
## Available Tools
87+
88+
### markdown-to-mindmap
89+
90+
Convert Markdown text into an interactive mind map.
91+
92+
**Parameters:**
93+
94+
- `markdown`: The Markdown content to convert (required string)
95+
- `open`: Whether to automatically open the generated mind map in the browser (optional boolean, default is false)
96+
97+
**Return Value:**
98+
99+
```json
100+
{
101+
"content": [
102+
{
103+
"type": "text",
104+
"text": "JSON_DATA_OF_MINDMAP_FILEPATH"
105+
}
106+
]
107+
}
108+
```
109+
110+
## License
111+
112+
This project is licensed under the MIT License.

README_zh-CN.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Markmap MCP 服务器
2+
3+
![321](./docs/markmap_zh.png)
4+
5+
[![NPM Version](https://img.shields.io/npm/v/@jinzcdev/markmap-mcp-server.svg)](https://www.npmjs.com/package/@jinzcdev/markmap-mcp-server)
6+
[![GitHub License](https://img.shields.io/github/license/jinzcdev/markmap-mcp-server.svg)](https://www.npmjs.com/package/@jinzcdev/markmap-mcp-server)
7+
[![English Doc](https://img.shields.io/badge/English-Click-blue)](README.md)
8+
[![Stars](https://img.shields.io/github/stars/jinzcdev/markmap-mcp-server)](https://github.com/jinzcdev/markmap-mcp-server)
9+
10+
Markmap MCP Server 基于 [模型上下文协议 (MCP)](https://modelcontextprotocol.io/introduction),可将 Markdown 文本一键转换为交互式思维导图,底层采用开源项目 [markmap](https://github.com/markmap/markmap)。生成的思维导图支持丰富的交互操作,并可导出为多种图片格式。
11+
12+
## 特性
13+
14+
- 🌠 **Markdown 转思维导图**:将 Markdown 文本转换为交互式思维导图
15+
- 🖼️ **多格式导出**:支持导出为 PNG、JPG 和 SVG 格式的图片
16+
- 🔄 **交互式操作**:支持缩放、展开/折叠节点等交互功能
17+
- 📋 **Markdown 复制**:一键复制原始 Markdown 内容
18+
- 🌐 **自动浏览器预览**:可选择自动在浏览器中打开生成的思维导图
19+
20+
## 前提条件
21+
22+
1. Node.js 运行环境
23+
24+
## 安装
25+
26+
### 手动安装
27+
28+
```bash
29+
# 从 npm 安装
30+
npm install @jinzcdev/markmap-mcp-server -g
31+
32+
# 基本运行
33+
npx -y @jinzcdev/markmap-mcp-server
34+
35+
# 指定输出目录
36+
npx -y @jinzcdev/markmap-mcp-server --output /path/to/output/directory
37+
```
38+
39+
或者,您可以克隆仓库并在本地运行:
40+
41+
```bash
42+
# 克隆仓库
43+
git clone https://github.com/jinzcdev/markmap-mcp-server.git
44+
45+
# 导航到项目目录
46+
cd markmap-mcp-server
47+
48+
# 构建项目
49+
npm install && npm run build
50+
51+
# 运行服务器
52+
node build/index.js
53+
```
54+
55+
## 使用方法
56+
57+
添加以下配置到您的 MCP 客户端配置文件中:
58+
59+
```json
60+
{
61+
"mcpServers": {
62+
"markmap": {
63+
"type": "stdio",
64+
"command": "npx",
65+
"args": [
66+
"-y",
67+
"@jinzcdev/markmap-mcp-server",
68+
"--output",
69+
"/path/to/output/directory"
70+
]
71+
}
72+
}
73+
}
74+
```
75+
76+
> [!TIP]
77+
>
78+
> 服务支持以下环境变量:
79+
>
80+
> - `MARKMAP_DIR`:指定思维导图的输出目录(可选,默认为系统临时目录)
81+
>
82+
> **优先级说明**
83+
>
84+
> 当同时指定命令行参数 `--output` 和环境变量 `MARKMAP_DIR` 时,命令行参数优先。
85+
86+
## 可用工具
87+
88+
### markdown-to-mindmap
89+
90+
将 Markdown 文本转换为交互式思维导图。
91+
92+
**参数:**
93+
94+
- `markdown`:要转换的 Markdown 内容(必填字符串)
95+
- `open`:是否在浏览器中自动打开生成的思维导图(可选布尔值,默认为 false)
96+
97+
**返回值:**
98+
99+
```json
100+
{
101+
"content": [
102+
{
103+
"type": "text",
104+
"text": "JSON_DATA_OF_MINDMAP_FILEPATH"
105+
}
106+
]
107+
}
108+
```
109+
110+
## 许可证
111+
112+
本项目采用 MIT 许可证。

docs/markmap.png

190 KB
Loading

docs/markmap_zh.png

173 KB
Loading

0 commit comments

Comments
 (0)