hardware-formal-mcp
Provides deterministic KiCad EDA verification tools: board/schematic discovery, ERC/DRC, PCB net trace length and differential skew analysis, IPC-2221 ampacity auditing, RF/PDN checks, and DFM/BOM audits.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
hardware-formal-mcp
Deterministic Model Context Protocol (MCP) Server bridging AI Coding Agents (Claude Code, Claude Desktop, Cursor) with Physical Hardware EDA (KiCad 8/9/10), RF/IPC-2221 Signal Integrity, Embedded C Formal Verification (CBMC), and ISO-14229 UDS / CAN-Bus Diagnostics.
Why This Exists
While the Model Context Protocol ecosystem has rich coverage for web APIs, databases, and SaaS workflows, hardware electronics, PCB layout verification, and safety-critical embedded C/C++ firmware remain largely disconnected from agentic coding loops. When an LLM modifies a KiCad board, a bare-metal microcontroller driver, or an automotive CAN/UDS diagnostic stack without deterministic physical and mathematical gates, subtle failures slip through:
PCB Copper & Signal Integrity: Uncaught DRC/ERC violations, excessive USB/CAN/Ethernet differential pair skew, under-sized power traces violating IPC-2221 thermal rise limits, or 2.4 GHz RF microstrip impedance mismatches.
Safety-Critical Embedded C: Integer overflows, out-of-bounds LUT indexing, division-by-zero in fixed-point sensor math, or violated actuator safety interlocks that unit tests miss on edge cases.
Automotive & Industrial Protocols: Multi-frame ISO 15765-2 (ISO-TP) segmentation bugs, ISO 14229 (UDS) negative response handling (
NRC 0x31), and unbalanced ASAM MCD-2 MC (.A2L) calibration definitions.
hardware-formal-mcp exposes 12 zero-hallucination, deterministic verification tools over stdio JSON-RPC 2.0 with zero required core runtime dependencies (pure Python standard library core, with modular extras for kiutils, scikit-rf, wireviz, python-can/udsoncan, and diffblue/cbmc).
Related MCP server: KiCad Context MCP
Architecture
flowchart LR
Agent["Claude Code / MCP Client"] <-->|"JSON-RPC 2.0 (stdio)"| Server["hardware-formal-mcp"]
Server --> EDA["KiCad 10 CLI & pcbnew API"]
Server --> RF["Hammerstad-Jensen & scikit-rf 2.4GHz"]
Server --> CBMC["CBMC SAT/SMT Bounded Model Checker"]
Server --> SAST["Flawfinder CWE & Lizard CCN"]
Server --> UDS["Virtual CAN + ISO-TP + UDS + ASAM .A2L"]Quickstart with Claude Code
Install from source or PyPI-compatible Git URL and register directly with Claude Code:
pip install "git+https://github.com/DjohnHK/hardware-formal-mcp.git#egg=hardware-formal-mcp[eda,automotive,sast]"
# Register with Claude Code CLI:
claude mcp add hardware-formal -- hardware-formal-mcpOr add to claude_desktop_config.json:
{
"mcpServers": {
"hardware-formal": {
"command": "python",
"args": ["-m", "hardware_formal_mcp"]
}
}
}Exposed MCP Tools (12 Tools)
Tool Name | Domain | Underlying Engine / Math | What It Verifies |
| Diagnostics | Cross-platform discovery | Detects installed KiCad CLI, CBMC, Cppcheck, ARM/RISC-V GCC, Graphviz & Python stacks |
| KiCad EDA | Filesystem AST scan | Locates |
| KiCad EDA |
| Runs zone-refilled DRC & schematic ERC returning structured JSON violations |
| High-Speed PCB | KiCad C++ | Exact copper net lengths (mm), USB/CAN/ETH differential skew, min trace width, vias |
| Power Electronics | IPC-2221 + | Trace current capacity $I_{\max}$, DC resistance ($m\Omega$), copper pours & neckdowns |
| RF / PDN | Hammerstad-Jensen + | Microstrip $Z_0$, $\varepsilon_{eff}$, $S_{11}$, $S_{21}$, VSWR & 10 MHz decoupling PDN impedance |
| PCBA / DFM |
| SMD/THT breakdown, IC-to-decoupling capacitor distance (mm), 3D model & LCSC BOM coverage |
| Cable Harnesses |
| Connector pinout continuity, wire gauge validation & SVG/TSV BOM generation |
| Formal Methods |
| Proves zero buffer overflow, div-by-zero, signed overflow & |
| Embedded SAST |
| C/C++/ |
| Automotive HIL |
| Live multi-frame ISO-TP ( |
| Calibration | ASAM MCD-2 MC parser | Validates |
Running Tests Locally
pip install -e ".[automotive,sast,dev]"
ruff check src tests
pytest -vLicense
Released under the MIT License.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Autonomous 0-DRC PCB Routing, RF/DFM Pre-Flight & KiCad MCP Server (calligraphyeda.com).
Self-hosted MCP server: 26 deterministic dev, security, and EVM tools.
Design circuits, simulate and verify embedded firmware, and lay out PCBs with AI agents.
Related MCP Servers
- AlicenseBqualityBmaintenanceAn MCP server that enables AI assistants to analyze schematics, inspect PCBs, trace connections, validate designs, and generate embedded code for KiCad projects.39195MIT
- AlicenseAqualityCmaintenanceA read-only MCP server for AI agents to understand KiCad projects through progressive disclosure, providing compact summaries and drill-down tools for components, nets, traces, and ERC/DRC checks without blowing context budgets.71MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI agents end-to-end control of KiCad 9+ for rule checks, manufacturing exports, production-readiness certification, and live PCB editor control.MIT
- AlicenseCqualityBmaintenanceAI-powered PCB design review MCP server with 93 tools for EMC, signal integrity, power integrity, thermal, and DFM analysis, supporting KiCad, ODB++, Gerber, and more, and generating audit-grade DOCX/HTML reports.1003AGPL 3.0