Skip to content
Projects
🖥

klayout-draw-mcp

An MCP server for drawing semiconductor GDS layouts with KLayout from an AI assistant.

PythonMCPKLayoutGDSEDA

Overview

klayout-draw-mcp is an MCP server that lets an AI assistant such as Claude Code or Claude Desktop generate, edit, and view semiconductor GDS layouts. Layout geometry is built in-process with the standalone klayout Python module (no GUI needed); the KLayout application is launched only for viewing or manual editing.

Ask in natural language — "Draw a 5×5 µm box on layer 1 and a 2 µm-wide path, then save to out.gds and open it" — and Claude calls new_layout → add_box / add_path → save_gds. It also supports loading an existing GDS and running DRC checks against it.

Features

  • Shape primitives — boxes, polygons, paths, and labels in micrometer coordinates
  • Cell creation/selection and instance/array placement
  • Vias (cut array + enclosing metal) and Manhattan wires with auto L-corners
  • Load/save GDS/OASIS files; per-layer shape count, area, and bbox inspection
  • Simple DRC — spacing, width, overlap, separation, and enclosure rules
  • Full klayout.db API access via run_script (hierarchy, boolean ops, and more)