Skip to main content
Glama
zesun33
by zesun33

@zesun33/mcp-gds

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.


⚡ Quick Tour: See It in Action

Real Agent Scenarios in 60 Seconds

1. Probing the Toolchain (Zero-Config Verification)

// Tool Call: gds_toolchain_info
{
  "runtime": "podman",
  "image": "localhost/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
}

Related MCP server: ansys-aedt-mcp

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, cwd?: string

KLayout + Nangate45 LEFs

DEF-to-GDSII stream-out (abstract cell footprints; full transistor GDS needs the PDK).

drc_klayout

gds_file: string, deck_file?: string, width_um?: number, space_um?: number, cwd?: string

KLayout batch -b -r

Generated generic width/space smoke deck over the layout's own layers, or a custom .drc deck. Parses .lyrdb to per-rule counts. 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 tools inside the zesun33/asic rootless Podman image (localhost/zesun33/asic), with the repo's platforms/ directory mounted read-only at /opt/platforms for LEF access:

  • Container mount: -v <workspace>:/workspace:Z -w /workspace plus -v <platforms>:/opt/platforms:ro,Z

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

To force host binaries instead of container execution:

export MCP_GDS_RUNTIME=host

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

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNoOptional working directory.
gds_fileYesGDSII layout file to check.
space_umNoGeneric-deck min space in um (default: 0.09).
width_umNoGeneric-deck min width in um (default: 0.06).
deck_fileNoOptional custom KLayout .drc rule deck (batch-mode with source()/report()).

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description must fully convey behavior. It accurately describes the operation (batch DRC run), mentions the default smoke deck, and clarifies that it is not LVS. However, it does not explicitly state whether the tool modifies any files or generates a report, though the DRC context implies read-only analysis. This is a minor gap given the lack of annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured: it opens with the primary action, clarifies the default behavior, then provides the custom deck option, and ends with an explicit LVS exclusion. Each sentence adds essential information without fluff or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description gives sufficient context for selecting and invoking the tool, including the default vs. custom deck use case and the LVS distinction. However, it does not mention what output or report format the DRC run produces, which could be useful for interpreting results. Since no output schema is provided, this slight omission leaves a minor gap in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All five parameters are documented in the input schema with meaningful descriptions (e.g., cwd as working directory, gds_file as the layout, space_um and width_um with defaults, deck_file for custom DRC rules). The main description adds context on how to use deck_file versus the default, fully covering parameter meaning. Schema coverage is 100%, leaving no ambiguity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the tool runs KLayout batch DRC on a GDS file, distinguishing it from other EDA tools like LVS or extraction. It also specifies the default smoke deck behavior versus custom PDK decks, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use the default mode versus passing a deck_file for real PDK rules, and explicitly says 'Does not do LVS; use lvs_netgen for netlist comparison,' which provides clear direction and prevents misuse. It also implies that gds_info or gds_stream_out are separate tools for other tasks.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNoOptional working directory.
cellNoOptional cell to select before extraction.
sourceYesMagic (.mag) or GDSII source layout.
tech_fileNoOptional Magic technology file (required for device-accurate extraction).
output_spiceNoOutput SPICE path (default: <source>_extracted.spice).

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description must carry the burden. It explains the extraction function and the tech file caveat, but does not mention side effects such as output file creation or whether the input layout is modified. This is adequate but not fully transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences cover purpose and a key caveat. No redundant words, and the most important information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the moderate complexity (5 parameters, no output schema, no nested objects), the description gives enough context for correct usage. It explains the core function and the critical tech file requirement, while the schema provides parameter details. Could mention output behavior but is not necessary for basic invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, with each parameter described in the input schema. The description adds no extra semantics beyond the schema, so the baseline applies. The tech_file parameter's importance is highlighted, but other parameters rely on schema definitions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Extracts') and a specific resource ('SPICE netlist from layout') along with the method ('Magic batch mode (ext2spice lvs)'). Clearly distinguishes from sibling tools like drc_klayout and lvs_netgen.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides meaningful usage context by noting that generic technology works for flow plumbing but a PDK tech file is required for device-accurate extraction. Does not explicitly name alternative tools, but the limitation is clearly communicated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNoOptional working directory.
gds_fileYesPath to the GDSII/OASIS layout file.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral burden. It discloses that the tool is headless, pure introspection, and requires no PDK, implying read-only behavior. It does not explicitly state that it never modifies the file, but 'pure introspection' strongly conveys this.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences with no unnecessary words. The first sentence states the action and output content, the second clarifies use case and limitations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only metadata tool, the description is sufficiently complete. It names the input format, the kind of information returned, and the use case. It does not describe return formatting, but that is not essential given the explicit metadata list.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema already describes both parameters (gds_file as path to layout file, cwd as optional working directory) with 100% coverage. The description adds no additional parameter meaning beyond what the schema provides, so the baseline score of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool reads GDSII/OASIS layout metadata and lists the specific metadata types (cells, top cells, bounding boxes, per-layer shape counts). It distinguishes itself from sibling tools by emphasizing pure introspection and no PDK requirement.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says 'Use when you need to know what is inside a layout file,' providing clear guidance. It does not explicitly contrast with sibling tools, but the pure-introspection framing makes the appropriate use case evident.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNoOptional working directory.
def_fileYesInput DEF file path.
gds_fileNoOutput GDSII path (default: <def basename>.gds).

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of behavior disclosure. It reveals the underlying mechanism (headless KLayout), the technology dependency (Nangate45 LEFs), and the limitation of abstract footprints vs. full transistor GDS. It does not explicitly mention output file creation, but that is implied by the output path parameter.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, each with a clear purpose: the first states the function and method, the second states the use case and limitation. It is succinct and free of redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a straightforward conversion tool, the description covers the essential context: what it does, how it does it, what it produces, and its limitations. It does not mention error handling or return values, but the absence of an output schema and the simplicity of the tool make this sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides clear descriptions for all three parameters (cwd, def_file, gds_file), achieving 100% coverage. The description adds no extra parameter-specific meaning beyond what the schema already states, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: streaming a DEF layout to GDSII via headless KLayout with Nangate45 LEFs. It also distinguishes its intended use (DRC input, handoff previews) from tapeout signoff, making its role unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly says when to use the tool ('produce DRC input or handoff previews') and gives a critical caveat ('not tapeout signoff' and 'full transistor GDS needs the PDK'). This provides practical guidance, though it does not explicitly name alternative sibling tools for comparison.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

gds_toolchain_infoA

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

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It states that the tool 'Returns' information, which implies a read-only, non-destructive operation. It does not mention side effects, auth, or rate limits, but for a simple info-returning tool, this is sufficient disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence with no superfluous words. It is front-loaded with the action 'Returns' and clearly lists the objects returned. Perfectly sized for the tool's simplicity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (no parameters, no annotations, no output schema), the description adequately explains what the tool returns. It specifies the runtime and versions of the three tools, which is sufficient context for a user to decide to invoke it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema is empty (0 parameters), so there is nothing for the description to explain. According to the rubric, 0 params earns a baseline of 4. The description adds no unnecessary parameter details beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Returns active container/host runtime and versions of KLayout, Magic, and Netgen.' It uses a specific verb ('Returns') and identifies the exact resource (runtime and versions). This distinguishes it from sibling tools like gds_info or drc_klayout, which have different functions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage (when you need toolchain versions), but it does not explicitly state when to use this tool versus alternatives. There is no mention of conditions or exclusions, but the purpose is distinct enough that a user can infer it. Meets the 'implied usage' level but not explicit guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNoOptional working directory.
setup_fileNoOptional Netgen setup file for device-class mapping (default: nosetup).
layout_cellYesTop cell name in the layout netlist.
layout_netlistYesLayout-extracted SPICE file.
schematic_cellYesTop cell name in the schematic netlist.
schematic_netlistYesReference (schematic) SPICE file.

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations were provided, so the description carries the full burden of disclosure. It states the tool compares netlists and reports match/mismatch, and explicitly says what it does not do (DRC), but it does not mention potential side effects, error behavior, or whether it writes any files. This is adequate but not fully transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the primary purpose and then noting limitations and related tools. Every sentence adds value, with no redundancy or unnecessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description must cover expected outputs; it does by mentioning 'match/mismatch with net/device counts.' It also references related tools (extract_magic, DRC) to provide broader context. The parameter descriptions in the schema cover the specifics, making the overall context complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all parameters have basic descriptions. The tool description adds context about the relationship between schematic and layout netlists (e.g., 'use extract_magic to derive a layout netlist first') but does not go beyond the schema in explaining individual parameters. Baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool 'Compares two SPICE netlists with Netgen batch LVS and reports match/mismatch with net/device counts,' which names a specific verb, resource, and output. It also distinguishes itself from sibling tools by saying 'use extract_magic to derive a layout netlist first' and 'Does not do DRC.'

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly tells when to use the tool ('Compares netlists only') and when to use alternatives ('use extract_magic to derive a layout netlist first', 'Does not do DRC'). It names sibling tools and the conditions for using them, providing clear guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 6 tool updatesv0.1.0
    • First observeddrc_klayout
    • First observedextract_magic
    • First observedgds_info
    • First observedgds_stream_out
    • First observedgds_toolchain_info
    • First observedlvs_netgen

TDQS

A4.3/5.0
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

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zesun33/mcp-gds'

If you have feedback or need assistance with the MCP directory API, please join our Discord server