Skip to main content
Glama
mcp-gds
by zesun33

@zesun33/mcp-gds

Purpose and first steps

Inspect layouts, stream out GDS, and run geometry or netlist checks through an MCP server.

Who it is for: Hardware engineers using an MCP-capable client or coding agent.

First task: Configure the server in your MCP client, then call gds_toolchain_info before running a design.

What to expect: Tool availability, then layout summaries and check results for the chosen inputs/decks.

Current scope: Published MCP server for layout and netlist checks. Smoke geometry checks use the selected deck; PDK-specific extraction/LVS requires appropriate technology and setup files. The npx command waits for an MCP client.

Start here: Runtime requirements and configuration.

Related projects: mcp-openroad, agentic-asic.

Choose another project.

Model Context Protocol (MCP) server for GDSII stream-out, KLayout DRC, Netgen LVS, and Magic extraction.

License: Apache-2.0 CI Protocol: MCP Runtime: Rootless Podman

mcp-gds gives AI coding agents and IDEs (Cursor, Windsurf, GitHub Copilot / OpenAI Codex, Claude Code, Google Antigravity, OpenCode, Cline) structured, token-capped access to open-source physical-verification tools. It closes the loop after mcp-openroad place-and-route: stream the DEF to GDSII, smoke-check geometry with KLayout, compare netlists with Netgen, and extract with Magic — without pasting thousand-line tool logs into context.

Scope honesty: geometry decks here are smoke-level sanity checks, not foundry signoff. Netgen compares SPICE-vs-SPICE structurally (nosetup by default; pass a PDK setup file for device mapping). Magic runs on generic technology until a PDK tech file is provided. Use extract_magic to derive layout netlists, then lvs_netgen to compare them.

Related MCP server: sentaurus-mcp

Install and run

Run this MCP server directly from npm:

npx -y @zesun33/mcp-gds

For the complete hardware-agent setup, use npx -y @zesun33/create-hw-agent my-asic.

Foundry PDK Support (Sky130)

With a Sky130 PDK on disk (fetch once: volare fetch --pdk sky130 -l sky130_fd_sc_hd <sha>, ~770MB), point the server at the volare version dir and the flow turns real:

export MCP_GDS_PDK_ROOT=/path/to/pdks/volare/sky130/versions/<sha>

Capability

Without PDK

With PDK

lvs_netgen

structural compare (nosetup)

pdk: "sky130A" uses the real sky130A_setup.tcl with device mapping

extract_magic

generic tech (flow plumbing)

-rcfile Sky130 tech + PDK_ROOT=/pdk: real transistor extraction

drc_klayout

generated smoke deck

pdk: "sky130A" runs the foundry sky130A.lydrc deck

Validated live: Magic-extracted sky130_fd_sc_hd__inv_1 (nfet+pfet with areas) matches the PDK reference netlist (Netlists match uniquely, 6/6 nets, 2/2 devices). Magic ≥ 8.3.411 is required by the Sky130 tech (the ASIC image ships conda Magic 8.3.486).


⚡ Quick Tour: See It in Action

The examples below illustrate tool requests and result fields. Timings, counts, and scores depend on the input and runtime; they are not guaranteed outcomes or fresh verification results.

Example tool requests and results

1. Probing the Toolchain (Zero-Config Verification)

// Tool Call: gds_toolchain_info
{
  "runtime": "podman",
  "image": "ghcr.io/zesun33/asic",
  "klayoutVersion": "KLayout 0.28.16",
  "magicVersion": "Magic 8.3 revision 105",
  "netgenVersion": "Netgen 1.5.133"
}

2. Layout Introspection Without a Viewer

// Tool Call: gds_info {"gds_file": "counter.gds"}
{
  "success": true,
  "topCells": ["counter"],
  "layers": [{ "layer": "31/0", "shapes": 128 }],
  "totalShapes": 256
}

3. DEF-to-GDS Stream-Out (Abstract-Level Handoff)

// Tool Call: gds_stream_out {"def_file": "counter_routed.def"}
{
  "success": true,
  "gdsFile": "counter_routed.gds",
  "cellsWritten": 14
}

4. Geometry Smoke DRC in One Call

// Tool Call: drc_klayout {"gds_file": "counter.gds"}
{
  "success": true,
  "clean": true,
  "totalViolations": 0,
  "deck": "generated-generic"
}

5. Netlist-vs-Netlist LVS Verdict

// Tool Call: lvs_netgen {"schematic_netlist": "inv_a.spice", "schematic_cell": "inv", "layout_netlist": "inv_b.spice", "layout_cell": "inv"}
{
  "success": true,
  "match": true,
  "netCount1": 4,
  "netCount2": 4,
  "deviceCount1": 2,
  "deviceCount2": 2
}

Tools Exposed

Tool

Parameters

Engine

Description

gds_info

gds_file: string, cwd?: string

KLayout pya headless

Cells, top cells, bounding boxes, per-layer shape counts. No PDK needed.

gds_stream_out

def_file: string, gds_file?: string, pdk?: "sky130A", cwd?: string

KLayout + Nangate45 LEFs

DEF-to-GDSII stream-out (abstract cell footprints; full transistor GDS needs the PDK). pdk: "sky130A" (needs MCP_GDS_PDK_ROOT) resolves Sky130 macros via PDK LEFs and applies the foundry sky130A.map layer map — without it KLayout emits pseudo-layers and Magic extraction finds no connectivity.

drc_klayout

gds_file: string, deck_file?: string, pdk?: "sky130A", width_um?: number, space_um?: number, cwd?: string

KLayout batch -b -r

Generated generic width/space smoke deck, or a PDK/custom .drc deck. Parses .lyrdb to per-rule counts. Sky130 li.6 LEF-abstract pin hits are classified as informational (reported, not dropped, not treated as clean: false). Smoke-level, not foundry signoff.

lvs_netgen

schematic_netlist: string, schematic_cell: string, layout_netlist: string, layout_cell: string, setup_file?: string, cwd?: string

Netgen -batch lvs -json

SPICE-vs-SPICE comparison with net/device counts. Property errors count as mismatch. Does not do DRC.

extract_magic

source: string, output_spice?: string, cell?: string, tech_file?: string, cwd?: string

Magic ext2spice lvs

Batch netlist extraction. Generic technology until a PDK tech file is provided.

gds_toolchain_info

none

Probe

Returns container/host runtime and versions of KLayout, Magic, and Netgen.


Execution Runtime

mcp-gds runs inside the zesun33/asic rootless Podman image so tools are identical on any Linux host.

Public install (recommended — anyone can pull):

podman pull ghcr.io/zesun33/asic:latest
export MCP_GDS_IMAGE=ghcr.io/zesun33/asic

ghcr.io/zesun33/asic is the default (anyone can pull). Local builds still work as localhost/zesun33/asic via MCP_GDS_IMAGE.

  • Container mount: -v <workspace>:/workspace:Z -w /workspace

  • Podman storage option: --storage-opt overlay.ignore_chown_errors=true

To force host binaries instead of container execution:

export MCP_GDS_RUNTIME=host

The repo platforms/ directory is mounted read-only at /opt/platforms for LEF access. For Sky130 signoff, also set MCP_GDS_PDK_ROOT to a host volare cache (see eda-docker-images PDK section).


Universal Client & AI IDE Setup

Because mcp-gds implements the standard Model Context Protocol (MCP), it connects seamlessly to any MCP-compliant AI IDE or agent interface:

{
  "mcpServers": {
    "gds": {
      "command": "node",
      "args": ["/path/to/mcp-gds/dist/index.js"]
    }
  }
}
  • Cursor: Configure in .cursor/mcp.json.

  • Windsurf: Configure in ~/.codeium/windsurf/mcp_config.json.

  • GitHub Copilot / OpenAI Codex: Configure via Copilot MCP settings or Codex tool proxy.

  • Claude Code: Configure via claude mcp add gds node /path/to/dist/index.js.

  • Google Antigravity: Load as workspace MCP server in antigravity.json.

  • OpenCode & Cline: Direct stdio JSON-RPC connection.


Verification & Testing

Run the full 6-gate verification suite:

# Full verification (with Podman container execution)
./scripts/verify.sh

# Fast / CI verification (headless environments)
./scripts/verify.sh --quick

License

Apache-2.0 © 2026 Md Zesun Ahmed Mia

npm releases

See RELEASING.md for GitHub Actions dry runs and trusted publishing.

Available Tools

6 tools
drc_klayoutA

Runs KLayout batch DRC on a GDS file. Default is a generated generic width/space smoke deck over the layout's own layers (geometry sanity, not foundry signoff). Pass deck_file for a real PDK rule deck. Does not do LVS; use lvs_netgen for netlist comparison.

Inputs: gds_file (required), cwd, space_um, width_um, +1 more.

extract_magicA

Extracts a SPICE netlist from layout with Magic batch mode (ext2spice lvs). Runs on generic technology: correct flow plumbing, but device-accurate extraction needs a PDK tech file.

Inputs: source (required), cwd, cell, tech_file, +1 more.

gds_infoA

Reads GDSII/OASIS layout metadata headlessly (cells, top cells, bounding boxes, per-layer shape counts). Pure introspection, no PDK needed. Use when you need to know what is inside a layout file.

Inputs: gds_file (required), cwd.

gds_stream_outA

Streams a DEF layout to GDSII via headless KLayout using Nangate45 LEFs (abstract cell footprints; full transistor GDS needs the PDK). Use to produce DRC input or handoff previews, not tapeout signoff.

Inputs: def_file (required), cwd, gds_file.

gds_toolchain_infoA

Returns active container/host runtime and versions of KLayout, Magic, and Netgen.

Inputs: no named parameters.

lvs_netgenA

Compares two SPICE netlists with Netgen batch LVS and reports match/mismatch with net/device counts. Compares netlists only; use extract_magic to derive a layout netlist first. Does not do DRC.

Inputs: layout_cell (required), layout_netlist (required), schematic_cell (required), schematic_netlist (required), +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a clear, distinct purpose: metadata reading, DEF-to-GDS conversion, DRC, LVS, extraction, and version info. No overlapping or ambiguous responsibilities.

    Naming Consistency4/5

    Names generally follow a predictable pattern, but mix domain-first (gds_info, gds_stream_out) with verb-first (extract_magic) and tool-specific suffixes (drc_klayout, lvs_netgen). Slightly inconsistent but still mostly intuitive.

    Tool Count5/5

    Six tools cover the essential operations for a layout-to-signoff verification workflow without redundancy or overload. The count feels well-scoped.

    Completeness4/5

    The set covers the main EDA flow steps (metadata, conversion, DRC, LVS, extraction, environment info). Minor gaps like a dedicated netlist viewer or layout manipulation tool could be added, but the core cycle is complete.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to automate 嘉立创 EDA Professional through MCP, including schematic and PCB editing, component search and placement, net routing, DRC, and design capture.
      -
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to manage Sentaurus TCAD simulation experiments via MCP, including creating and submitting jobs, querying status, reading logs, and listing output files.
      6
      11
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to turn natural-language hardware prompts into deterministic schematics and netlists, query live LCSC parts data, validate designs, calculate trace impedance, and estimate PCBA BOM costs through stdio MCP tools and resources.
      84
      138 PyPI
      1
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables MCP-capable AI agents to generate and reorganize schematics, resolve LCSC components, place and route PCBs with custom DRC constraints, inspect design data, and safely apply, repair, or restore changes in native EasyEDA Pro and JLCEDA documents.
      219
      MIT