Skip to content

Design Rule Checks

The DRC tools let you run Design Rule Checks on your KiCad PCB designs, get detailed violation reports, track progress over time, and generate technology-specific rule sets. All DRC operations use kicad-cli and do not require a running KiCad instance.

  • KiCad 9.0 or newer installed
  • kicad-cli available in your system PATH (included with KiCad 9.0+)
Run a DRC check on my project at /path/to/project.kicad_pro

The run_drc_check tool:

  • Locates the .kicad_pcb file for the project
  • Runs DRC via kicad-cli pcb drc
  • Parses the JSON report to extract violations
  • Saves results to DRC history
  • Compares with previous runs (if available)
Show me the DRC report for /path/to/project.kicad_pro

Loads the kicad://drc/project_path resource, showing total violations, categorized issues, violation details with locations, and recommendations for common fixes.

Show me the DRC history for /path/to/project.kicad_pro

Loads the kicad://drc/history/project_path resource, showing a visual trend of violations over time, table of all check runs, comparison between first and most recent checks, and progress indicators.

CategoryDescriptionCommon fixes
ClearanceItems too close togetherIncrease spacing, reroute traces
Track WidthTraces too narrowIncrease trace width, check current requirements
Annular RingVia rings too smallIncrease via size, adjust manufacturing settings
Drill SizeHoles too smallIncrease drill diameter, check fab capabilities
SilkscreenSilkscreen conflicts with padsAdjust silkscreen position, resize text
CourtyardComponent courtyards overlapAdjust placement, reduce footprint sizes
Create a DRC rule set for HDI technology

The create_drc_rule_set tool generates rules tailored to specific PCB technologies:

  • standard — conventional PCB manufacturing
  • HDI — high-density interconnect
  • RF — radio frequency designs
  • automotive — automotive-grade requirements
Export DRC rules for RF technology in KiCad format

The export_kicad_drc_rules tool outputs rules in KiCad-compatible text format, ready to paste into your project’s design rules.

Get manufacturing constraints for automotive technology

The get_manufacturing_constraints tool returns numeric limits (minimum track width, clearance, via size, etc.) along with design recommendations and notes for the specified technology.

The DRC tools work alongside KiCad’s built-in DRC:

  1. Run the mckicad DRC check to get an overview and start tracking progress
  2. Use KiCad’s built-in DRC for interactive fixes (highlights exact locations in the editor)
  3. Re-run the mckicad DRC to verify fixes and update the history

Use the DRC prompt templates for help creating specialized rules:

I need custom design rules for a high-voltage circuit with 2kV isolation

This provides guidance for high-voltage circuits, high-current paths, RF constraints, and specialized manufacturing requirements.

  1. Ensure the project exists at the specified path
  2. Verify the project contains a .kicad_pcb file
  3. Check that kicad-cli is in your PATH or set KICAD_CLI_PATH
  4. Use the full absolute path to the project file
  5. Check the server logs for detailed error information
  1. Verify the PCB file is not corrupted — try opening it in KiCad
  2. Ensure you are using KiCad 9.0+ for full kicad-cli DRC support
  3. Check that all referenced libraries are available