# XMind to Markdown MCP Server
[](https://badge.fury.io/py/xmind-to-markdown-mcp)
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
将 XMind 思维导图文件转换为 Markdown 格式的 MCP (Model Context Protocol) 服务。
## ✨ 特性
- 🚀 **快速转换**:将 XMind 文件转换为结构化的 Markdown 文档
- 📊 **保留层级**:完整保留思维导图的层级结构
- 🏷️ **支持元数据**:可选包含文件元信息(大小、时间等)
- 🔧 **双工具支持**:提供转换和结构查看两种工具
- 🌐 **MCP 协议**:标准化的 AI 工具接口,易于集成
## 📦 安装
### 使用 uvx(推荐)
```bash
uvx xmind-to-markdown-mcp
```
### 使用 pip
```bash
pip install xmind-to-markdown-mcp
```
## 🚀 快速开始
### 作为 MCP Server 使用
在支持 MCP 的客户端(如 Claude Desktop、Cursor、Cline)中配置:
```json
{
"mcpServers": {
"xmind-to-markdown": {
"command": "uvx",
"args": ["xmind-to-markdown-mcp"]
}
}
}
```
### 可用工具
#### 1. convert_xmind_to_markdown
将 XMind 文件转换为 Markdown 格式。
**参数:**
- `xmind_path` (必需): XMind 文件路径
- `output_path` (可选): 输出 Markdown 文件路径,不提供则自动保存到 `output/` 目录
- `include_metadata` (可选): 是否包含文件元信息,默认 `true`
**示例:**
```json
{
"xmind_path": "/path/to/file.xmind",
"output_path": "/path/to/output.md",
"include_metadata": true
}
```
#### 2. read_xmind_structure
读取并返回 XMind 文件的结构化数据(JSON 格式)。
**参数:**
- `xmind_path` (必需): XMind 文件路径
**示例:**
```json
{
"xmind_path": "/path/to/file.xmind"
}
```
## 📝 Markdown 转换格式
转换后的 Markdown 采用以下层级结构:
```markdown
# [中心主题]
## [一级分支1]
- 子主题1.1
- 详细内容1.1.1
- 详细内容1.1.2
- 子主题1.2
## [一级分支2]
- 子主题2.1
> 备注:这里是XMind中的备注内容
- 子主题2.2
---
**文件元信息**
- 文件名: example.xmind
- 文件大小: 15.32 KB
- 创建时间: 2025-01-01 10:00:00
- 修改时间: 2025-01-02 15:30:00
```
## 🔧 客户端配置示例
### Claude Desktop (macOS)
编辑 `~/Library/Application Support/Claude/claude_desktop_config.json`:
```json
{
"mcpServers": {
"xmind-to-markdown": {
"command": "uvx",
"args": ["xmind-to-markdown-mcp"]
}
}
}
```
### Cursor IDE
在项目的 `.vscode/settings.json` 中添加:
```json
{
"mcp.servers": {
"xmind-to-markdown": {
"command": "uvx",
"args": ["xmind-to-markdown-mcp"]
}
}
}
```
### Cline (VS Code Extension)
在 Cline 的 MCP 设置中添加:
```json
{
"xmind-to-markdown": {
"command": "uvx",
"args": ["xmind-to-markdown-mcp"]
}
}
```
## 🛠️ 开发
### 克隆仓库
```bash
git clone https://github.com/yourusername/xmind-to-markdown-mcp.git
cd xmind-to-markdown-mcp
```
### 安装开发依赖
```bash
pip install -e ".[dev]"
```
### 运行测试
```bash
pytest
```
## 📄 许可证
本项目采用 MIT 许可证 - 详见 [LICENSE](LICENSE) 文件
## 🤝 贡献
欢迎贡献!请随时提交 Pull Request。
## 📮 联系方式
- GitHub Issues: [提交问题](https://github.com/yourusername/xmind-to-markdown-mcp/issues)
- Email: your.email@example.com
## 🙏 致谢
- [FastMCP](https://github.com/jlowin/fastmcp) - MCP 服务框架
- [xmindparser](https://github.com/tobyqin/xmindparser) - XMind 文件解析库
- [Model Context Protocol](https://modelcontextprotocol.io) - MCP 协议规范
Raw data
{
"_id": null,
"home_page": null,
"name": "xmind-to-markdown-mcp",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "ai, converter, llm, markdown, mcp, xmind",
"author": null,
"author_email": "\"jiandong.liu\" <jiandong.yh@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/b3/64/f82bc935f0c682e3b862f9990384246b725462d8bd63ff05e57afe551f6f/xmind_to_markdown_mcp-0.1.3.tar.gz",
"platform": null,
"description": "# XMind to Markdown MCP Server\n\n[](https://badge.fury.io/py/xmind-to-markdown-mcp)\n[](https://www.python.org/downloads/)\n[](https://opensource.org/licenses/MIT)\n\n\u5c06 XMind \u601d\u7ef4\u5bfc\u56fe\u6587\u4ef6\u8f6c\u6362\u4e3a Markdown \u683c\u5f0f\u7684 MCP (Model Context Protocol) \u670d\u52a1\u3002\n\n## \u2728 \u7279\u6027\n\n- \ud83d\ude80 **\u5feb\u901f\u8f6c\u6362**\uff1a\u5c06 XMind \u6587\u4ef6\u8f6c\u6362\u4e3a\u7ed3\u6784\u5316\u7684 Markdown \u6587\u6863\n- \ud83d\udcca **\u4fdd\u7559\u5c42\u7ea7**\uff1a\u5b8c\u6574\u4fdd\u7559\u601d\u7ef4\u5bfc\u56fe\u7684\u5c42\u7ea7\u7ed3\u6784\n- \ud83c\udff7\ufe0f **\u652f\u6301\u5143\u6570\u636e**\uff1a\u53ef\u9009\u5305\u542b\u6587\u4ef6\u5143\u4fe1\u606f\uff08\u5927\u5c0f\u3001\u65f6\u95f4\u7b49\uff09\n- \ud83d\udd27 **\u53cc\u5de5\u5177\u652f\u6301**\uff1a\u63d0\u4f9b\u8f6c\u6362\u548c\u7ed3\u6784\u67e5\u770b\u4e24\u79cd\u5de5\u5177\n- \ud83c\udf10 **MCP \u534f\u8bae**\uff1a\u6807\u51c6\u5316\u7684 AI \u5de5\u5177\u63a5\u53e3\uff0c\u6613\u4e8e\u96c6\u6210\n\n## \ud83d\udce6 \u5b89\u88c5\n\n### \u4f7f\u7528 uvx\uff08\u63a8\u8350\uff09\n\n```bash\nuvx xmind-to-markdown-mcp\n```\n\n### \u4f7f\u7528 pip\n\n```bash\npip install xmind-to-markdown-mcp\n```\n\n## \ud83d\ude80 \u5feb\u901f\u5f00\u59cb\n\n### \u4f5c\u4e3a MCP Server \u4f7f\u7528\n\n\u5728\u652f\u6301 MCP \u7684\u5ba2\u6237\u7aef\uff08\u5982 Claude Desktop\u3001Cursor\u3001Cline\uff09\u4e2d\u914d\u7f6e\uff1a\n\n```json\n{\n \"mcpServers\": {\n \"xmind-to-markdown\": {\n \"command\": \"uvx\",\n \"args\": [\"xmind-to-markdown-mcp\"]\n }\n }\n}\n```\n\n### \u53ef\u7528\u5de5\u5177\n\n#### 1. convert_xmind_to_markdown\n\n\u5c06 XMind \u6587\u4ef6\u8f6c\u6362\u4e3a Markdown \u683c\u5f0f\u3002\n\n**\u53c2\u6570\uff1a**\n- `xmind_path` (\u5fc5\u9700): XMind \u6587\u4ef6\u8def\u5f84\n- `output_path` (\u53ef\u9009): \u8f93\u51fa Markdown \u6587\u4ef6\u8def\u5f84\uff0c\u4e0d\u63d0\u4f9b\u5219\u81ea\u52a8\u4fdd\u5b58\u5230 `output/` \u76ee\u5f55\n- `include_metadata` (\u53ef\u9009): \u662f\u5426\u5305\u542b\u6587\u4ef6\u5143\u4fe1\u606f\uff0c\u9ed8\u8ba4 `true`\n\n**\u793a\u4f8b\uff1a**\n```json\n{\n \"xmind_path\": \"/path/to/file.xmind\",\n \"output_path\": \"/path/to/output.md\",\n \"include_metadata\": true\n}\n```\n\n#### 2. read_xmind_structure\n\n\u8bfb\u53d6\u5e76\u8fd4\u56de XMind \u6587\u4ef6\u7684\u7ed3\u6784\u5316\u6570\u636e\uff08JSON \u683c\u5f0f\uff09\u3002\n\n**\u53c2\u6570\uff1a**\n- `xmind_path` (\u5fc5\u9700): XMind \u6587\u4ef6\u8def\u5f84\n\n**\u793a\u4f8b\uff1a**\n```json\n{\n \"xmind_path\": \"/path/to/file.xmind\"\n}\n```\n\n## \ud83d\udcdd Markdown \u8f6c\u6362\u683c\u5f0f\n\n\u8f6c\u6362\u540e\u7684 Markdown \u91c7\u7528\u4ee5\u4e0b\u5c42\u7ea7\u7ed3\u6784\uff1a\n\n```markdown\n# [\u4e2d\u5fc3\u4e3b\u9898]\n\n## [\u4e00\u7ea7\u5206\u652f1]\n- \u5b50\u4e3b\u98981.1\n - \u8be6\u7ec6\u5185\u5bb91.1.1\n - \u8be6\u7ec6\u5185\u5bb91.1.2\n- \u5b50\u4e3b\u98981.2\n\n## [\u4e00\u7ea7\u5206\u652f2]\n- \u5b50\u4e3b\u98982.1\n > \u5907\u6ce8\uff1a\u8fd9\u91cc\u662fXMind\u4e2d\u7684\u5907\u6ce8\u5185\u5bb9\n- \u5b50\u4e3b\u98982.2\n\n---\n**\u6587\u4ef6\u5143\u4fe1\u606f**\n- \u6587\u4ef6\u540d: example.xmind\n- \u6587\u4ef6\u5927\u5c0f: 15.32 KB\n- \u521b\u5efa\u65f6\u95f4: 2025-01-01 10:00:00\n- \u4fee\u6539\u65f6\u95f4: 2025-01-02 15:30:00\n```\n\n## \ud83d\udd27 \u5ba2\u6237\u7aef\u914d\u7f6e\u793a\u4f8b\n\n### Claude Desktop (macOS)\n\n\u7f16\u8f91 `~/Library/Application Support/Claude/claude_desktop_config.json`:\n\n```json\n{\n \"mcpServers\": {\n \"xmind-to-markdown\": {\n \"command\": \"uvx\",\n \"args\": [\"xmind-to-markdown-mcp\"]\n }\n }\n}\n```\n\n### Cursor IDE\n\n\u5728\u9879\u76ee\u7684 `.vscode/settings.json` \u4e2d\u6dfb\u52a0\uff1a\n\n```json\n{\n \"mcp.servers\": {\n \"xmind-to-markdown\": {\n \"command\": \"uvx\",\n \"args\": [\"xmind-to-markdown-mcp\"]\n }\n }\n}\n```\n\n### Cline (VS Code Extension)\n\n\u5728 Cline \u7684 MCP \u8bbe\u7f6e\u4e2d\u6dfb\u52a0\uff1a\n\n```json\n{\n \"xmind-to-markdown\": {\n \"command\": \"uvx\",\n \"args\": [\"xmind-to-markdown-mcp\"]\n }\n}\n```\n\n## \ud83d\udee0\ufe0f \u5f00\u53d1\n\n### \u514b\u9686\u4ed3\u5e93\n\n```bash\ngit clone https://github.com/yourusername/xmind-to-markdown-mcp.git\ncd xmind-to-markdown-mcp\n```\n\n### \u5b89\u88c5\u5f00\u53d1\u4f9d\u8d56\n\n```bash\npip install -e \".[dev]\"\n```\n\n### \u8fd0\u884c\u6d4b\u8bd5\n\n```bash\npytest\n```\n\n## \ud83d\udcc4 \u8bb8\u53ef\u8bc1\n\n\u672c\u9879\u76ee\u91c7\u7528 MIT \u8bb8\u53ef\u8bc1 - \u8be6\u89c1 [LICENSE](LICENSE) \u6587\u4ef6\n\n## \ud83e\udd1d \u8d21\u732e\n\n\u6b22\u8fce\u8d21\u732e\uff01\u8bf7\u968f\u65f6\u63d0\u4ea4 Pull Request\u3002\n\n## \ud83d\udcee \u8054\u7cfb\u65b9\u5f0f\n\n- GitHub Issues: [\u63d0\u4ea4\u95ee\u9898](https://github.com/yourusername/xmind-to-markdown-mcp/issues)\n- Email: your.email@example.com\n\n## \ud83d\ude4f \u81f4\u8c22\n\n- [FastMCP](https://github.com/jlowin/fastmcp) - MCP \u670d\u52a1\u6846\u67b6\n- [xmindparser](https://github.com/tobyqin/xmindparser) - XMind \u6587\u4ef6\u89e3\u6790\u5e93\n- [Model Context Protocol](https://modelcontextprotocol.io) - MCP \u534f\u8bae\u89c4\u8303",
"bugtrack_url": null,
"license": "MIT",
"summary": "MCP Server for converting XMind files to Markdown format",
"version": "0.1.3",
"project_urls": {
"Documentation": "https://github.com/jiandong0718/mcp-xmind-to-markdown#readme",
"Homepage": "https://github.com/jiandong0718/mcp-xmind-to-markdown",
"Issues": "https://github.com/jiandong0718/mcp-xmind-to-markdown/issues",
"Repository": "https://github.com/jiandong0718/mcp-xmind-to-markdown"
},
"split_keywords": [
"ai",
" converter",
" llm",
" markdown",
" mcp",
" xmind"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "a727634cd27a7784226403d13c34604c7b7ea186f467d13f3df42bc54a5653cc",
"md5": "ce955f6ddd12442772980f550502cbd5",
"sha256": "de18158ddcd78c4723ae292a575831e5ac8a4c0bfe977a7d264eda5f4e9655de"
},
"downloads": -1,
"filename": "xmind_to_markdown_mcp-0.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ce955f6ddd12442772980f550502cbd5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 9810,
"upload_time": "2025-10-16T11:34:31",
"upload_time_iso_8601": "2025-10-16T11:34:31.731684Z",
"url": "https://files.pythonhosted.org/packages/a7/27/634cd27a7784226403d13c34604c7b7ea186f467d13f3df42bc54a5653cc/xmind_to_markdown_mcp-0.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "b364f82bc935f0c682e3b862f9990384246b725462d8bd63ff05e57afe551f6f",
"md5": "4eeb50bb6bf6abd0ec74bf96915995b2",
"sha256": "09525d1a893fd958c5160d1f55abc97a69f64ac75dc47f362f82b017bc9b9b96"
},
"downloads": -1,
"filename": "xmind_to_markdown_mcp-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "4eeb50bb6bf6abd0ec74bf96915995b2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 7689,
"upload_time": "2025-10-16T11:34:33",
"upload_time_iso_8601": "2025-10-16T11:34:33.086412Z",
"url": "https://files.pythonhosted.org/packages/b3/64/f82bc935f0c682e3b862f9990384246b725462d8bd63ff05e57afe551f6f/xmind_to_markdown_mcp-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-16 11:34:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jiandong0718",
"github_project": "mcp-xmind-to-markdown#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "fastmcp",
"specs": [
[
">=",
"2.0.0"
]
]
},
{
"name": "xmindparser",
"specs": [
[
">=",
"1.0.9"
]
]
}
],
"lcname": "xmind-to-markdown-mcp"
}