ASCII艺术编辑器服务器

一个为Monodraw ASCII艺术编辑器提供服务的MCP服务器,支持导出、创建和管理ASCII图表。

  • by Caryyon
  • TypeScript
  • 本地部署
  • 8 星标
  • 更新于
在 GitHub 查看 Caryyon/mcp-monodraw

使用说明

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 file

list_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 open

get_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

许可证

麻省理工学院