wireviz-mcp

v1.0.2
wireviz-mcp Checked 3 days ago Published 2 months ago

A wrapper around WireViz for bringing it to AI agents.

A Model Context Protocol (MCP) server that wraps WireViz. This allows AI assistants to design and visualize physical wiring harnesses. 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) Edit mcp_config.json to add the server:

Summary extracted from the README.

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