npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mcpcn/mcp-mindmap

v1.0.4

Published

MCP server for converting Markdown to interactive mindmaps

Readme

思维导图 MCP 服务器 (TypeScript版)

一个用于将Markdown内容转换为交互式思维导图的MCP服务器,使用TypeScript实现。

✨ 特性

  • 纯TypeScript实现 - 无需Python环境
  • 直接使用markmap API - 性能更好,无subprocess开销
  • 灵活的返回模式 - 支持返回HTML内容或文件路径
  • 可定制化 - 支持显示/隐藏工具栏,自定义输出路径
  • 简单部署 - 只需Node.js环境

📦 安装

方式1:本地开发

cd typescript/思维导图生成
npm install
npm run build

方式2:全局安装(待发布)

npm install -g @mcpcn/mcp-mindmap

🚀 使用方法

在Claude Desktop中配置

返回HTML内容(可在Artifact中预览)

{
  "mcpServers": {
    "mindmap": {
      "command": "node",
      "args": [
        "/Users/你的用户名/path/to/typescript/思维导图生成/dist/index.js",
        "--return-type",
        "html"
      ]
    }
  }
}

返回文件路径(节省token)

{
  "mcpServers": {
    "mindmap": {
      "command": "node",
      "args": [
        "/Users/你的用户名/path/to/typescript/思维导图生成/dist/index.js",
        "--return-type",
        "filePath"
      ]
    }
  }
}

🛠️ 工具说明

convert_markdown_to_mindmap

将Markdown内容转换为交互式思维导图HTML。

参数:

| 参数 | 类型 | 必填 | 说明 | |------|------|------|------| | markdown_content | string | 否* | 要转换的Markdown内容 | | input_file_path | string | 否* | 现有Markdown文件的路径 | | output_dir | string | 否 | 保存HTML文件的目录 | | output_filename | string | 否 | 输出HTML的文件名 | | toolbar | boolean | 否 | 是否显示工具栏(默认:true) | | save_to_path | string | 否 | 强制保存到指定路径 |

注意: markdown_contentinput_file_path 至少需要提供一个。

💡 使用示例

示例1:创建项目规划思维导图

在Claude中输入:

请帮我创建一个关于"项目规划"的思维导图:

# 项目规划
## 研究阶段
### 市场分析
### 竞品调研
## 设计阶段
### 线框图
### 视觉稿
## 开发阶段
### 前端开发
### 后端开发
## 测试阶段
### 单元测试
### 用户测试

示例2:从文件生成思维导图

请将 ~/Documents/notes.md 文件转换为思维导图,并保存到 ~/Downloads/ 目录

示例3:生成无工具栏的思维导图

生成一个关于"学习路线"的思维导图,不要显示工具栏

📊 对比Python版本

| 特性 | TypeScript版本 | Python版本 | |------|---------------|-----------| | 依赖环境 | 仅需Node.js | 需要Python + Node.js | | 性能 | 直接调用API | 通过subprocess调用 | | 部署复杂度 | 低 | 中等 | | 错误处理 | 更直接 | 需要处理进程间通信 | | 代码维护 | 更简洁 | 更复杂 | | 启动速度 | 快 | 较慢 |

🧪 本地测试

# 运行测试脚本
node test-local.js

# 在浏览器中打开生成的HTML
open test-output.html  # macOS
# 或
xdg-open test-output.html  # Linux
# 或
start test-output.html  # Windows

🔧 开发

# 安装依赖
npm install

# 构建
npm run build

# 运行
npm start

# 开发模式(构建并运行)
npm run dev

📝 项目结构

typescript/思维导图生成/
├── src/
│   └── index.ts          # 主服务器代码
├── dist/                 # 编译输出
├── package.json          # 项目配置
├── tsconfig.json         # TypeScript配置
├── test-local.js         # 本地测试脚本
├── mcp-config.example.json  # MCP配置示例
└── README.md             # 文档

🐛 故障排除

问题1:找不到node命令

确保Node.js已安装并在PATH中:

node --version
npm --version

问题2:构建失败

清理并重新安装依赖:

rm -rf node_modules package-lock.json
npm install
npm run build

问题3:MCP服务器无法连接

  1. 检查配置文件中的路径是否正确
  2. 确保已运行 npm run build
  3. 重启Claude Desktop

📄 License

MIT

🙏 致谢


如果这个项目对你有帮助,请给个 ⭐️ Star!