xmindtomd
v1.0.1
Published
Convert XMind content.json or .xmind files to Markdown while preserving hierarchy.
Maintainers
Readme
xmindtomd
将 XMind 的 content.json 或 .xmind 文件转换为 Markdown,保留层级结构。
支持两种使用方式:
- CLI 命令行转换
- MCP Server(供大模型工具调用)
安装
全局安装
npm i -g xmindtomd临时使用
npx xmindtomd <input.json|input.xmind> [output.md]用法
xmind2md <input.json|input.xmind> [output.md]- 不传
output.md时,默认在同目录输出同名.md文件 - 支持直接输入
.xmind(会自动解压读取content.json)
示例
xmind2md ./demo.xmind
xmind2md ./content.json ./result.md环境要求
- Node.js >= 16
MCP 用法
启动 MCP Server
npm run mcp:start在 MCP Client 中配置(stdio)
可将以下配置加入你的 MCP 客户端(示例):
{
"mcpServers": {
"xmindtomd": {
"command": "npx",
"args": ["-y", "--package=xmindtomd", "xmindtomd-mcp"]
}
}
}暴露的工具
xmind_to_markdowninputPath:输入.xmind或.json路径writeToFile:是否写入文件(可选,默认false)outputPath:输出路径(可选)
