线束设计MCP服务器

一个将WireViz封装为MCP服务器的工具,使AI助手能够设计并可视化物理线束,生成WireViz YAML、BOM和PNG输出。

  • by chrisflesher
  • Python
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 chrisflesher/wireviz-mcp

使用说明

WireViz MCP Server

A Model Context Protocol (MCP) server that wraps WireViz. This allows AI assistants to design and visualize physical wiring harnesses.

Typical workflow:

  1. Create a "harness concept" to specify rough connectivity between components
  2. Create a "harness" to specify detailed connectivity between components
  3. Generate output files (WireViz YAML, BOM, PNG)

Examples

Refer to the examples/ directory.

Tools

  • concept_to_mermaid: Translates a rough design (HarnessConcept) into a Mermaid diagram to help plan the detailed design.
  • mermaid_to_svg: Renders Mermaid diagram as SVG.
  • harness_to_wireviz: Translates a complete harness design (Harness) into WireViz YAML.
  • wireviz_to_bom: Generates a Bill of Materials (BOM) in TSV format from WireViz YAML.
  • wireviz_to_png: Renders WireViz YAML as PNG.

Installation

Option 1: pip

Create a virtual environment:

python -m venv .venv
.venv/bin/pip install git+https://github.com/chrisflesher/wireviz-mcp.git

Edit mcp_config.json to add the server:

{
  "mcpServers": {
    "wireviz-mcp": {
      "command": ".venv/bin/wireviz-mcp-server",
      "args": []
    }
  }
}

Option 2: uvx

Edit mcp_config.json to add the server:

{
  "mcpServers": {
    "wireviz-mcp": {
      "command": "uvx",
      "args": [
        "--from", "git+https://github.com/chrisflesher/wireviz-mcp.git",
        "wireviz-mcp-server"
      ]
    }
  }
}

Contributing

To run unit tests:

tox