mcp单原料
MCP(模型上下文协议)服务器 Monoddraw,适用于macOS的强大ASCII艺术编辑器。
特性
- 导出图表 -转换
.monopic和.monojson将文件转换为纯文本或JSON - 列出图表 -查找目录中的所有Monodraw文件
- 在Monodraw中打开 -直接在Monodraw应用程序中启动文件
- 创建ASCII艺术 -生成方框、流程图、表格、树和序列图
- 图表提示 -常见图表类型的预构建模板
需求
- Node.js 18+
- macOS
- Monodraw(直接版 helftone.com,而不是App Store)
注: Monodraw CLI仅在Direct版本中可用。由于沙盒限制,Mac App Store版本不包括CLI支持。
安装
npm install -g mcp-monodraw或者直接与npx一起使用:
npx mcp-monodraw配置
克劳德代码
将MCP服务器添加到您的项目或全局配置中:
claude mcp add monodraw -- npx mcp-monodraw或手动添加到 ~/.claude/settings.json:
{
"mcpServers": {
"monodraw": {
"command": "npx",
"args": ["mcp-monodraw"]
}
}
}克劳德桌面版
添加到 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"monodraw": {
"command": "npx",
"args": ["mcp-monodraw"]
}
}
}工具
export_diagram
将Monodraw图导出为纯ASCII文本。
filePath: string (required) - Path to the .monopic or .monojson file
unicode: boolean - Use Unicode characters in output (default: false)
trimWhitespace: boolean - Trim trailing whitespace (default: true)export_diagram.json
将包含完整元数据的图表导出为结构化JSON。
filePath: string (required) - Path to the diagram filelist_digrams
查找目录中的所有Monodraw文件。
directory: string - Directory to search (default: ".")
recursive: boolean - Search subdirectories (default: true)open_in_monodraw
在Monodraw应用程序中打开一个文件。
filePath: string (required) - Path to the file to openget_digramm_preview
获取图表文件的文本预览。
filePath: string (required) - Path to the diagram file
maxLines: number - Maximum lines to return (default: 20)create_ascii_art
以编程方式生成ASCII艺术。
type: "box" | "flowchart" | "sequence" | "architecture" | "table" | "tree"
content: string (required) - Content or description
style: "single" | "double" | "rounded" | "heavy" | "ascii" (default: "single")
width: number - Maximum width提示
用于生成图表的预构建模板:
flowchart-创建流程图box-diagram-创建方框/容器图sequence-diagram-创建序列图architecture-创建架构图table-创建ASCII表tree-创建树结构
例子
导出图表
Use the export_diagram tool with filePath: "/path/to/diagram.monopic"创建流程图
Use the create_ascii_art tool with:
type: "flowchart"
content: "Start, Process Data, Validate, Save, End"
style: "rounded"输出:
╭─────────────────╮
│ Start │
╰─────────────────╯
│
v
╭─────────────────╮
│ Process Data │
╰─────────────────╯
│
v
╭─────────────────╮
│ Validate │
╰─────────────────╯
│
v
╭─────────────────╮
│ Save │
╰─────────────────╯
│
v
╭─────────────────╮
│ End │
╰─────────────────╯发展
# Install dependencies
yarn install
# Build
yarn build
# Run in development
yarn dev许可证
麻省理工学院
