convez.ai
MCP ServerAutomaçãoAvançado
palavrov

MCP Server EDIF

palavrov/mcp-server-edif

Consulte netlists EDIF com linguagem natural e trace conexões eletrônicas

Ver no GitHub
InicialPluginScore · de 0 a 100

Servidor MCP para consulta de arquivos netlist EDIF (Electronic Design Interchange Format) exportados de ferramentas de design eletrônico como Altium e OrCAD. Permite explorar componentes, nets e conectividade em nível de pinos, com suporte automático para componentes multi-parte (ICs divididos em seções como U5A/U5B/U5C).

Instalação

$npx convez-ai palavrov/mcp-server-edif

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
1
Acompanhando
0
Saúde
28%
Último commit
há 5 meses
Versão
v0.5.0
Issues abertas
0
Contribuidores
1

Casos de uso

  • Análise de esquemas eletrônicos e conectividade de componentes
  • Rastreamento de caminhos entre componentes (CPU-PHY, clock paths, etc)
  • Validação de configuração de pinos e nets em projetos de hardware
  • Geração de device-tree e documentação técnica de circuitos

Veredito

Ferramenta especializada para engenheiros de hardware que trabalham com netlists EDIF. Permite consultas complexas sobre conectividade eletrônica através de linguagem natural, reduzindo significativamente o tempo de análise manual de esquemas — ideal para validação de designs e troubleshooting de plataformas como BeagleBone Black.

README

A tradução para o português deste README ainda está na fila.

mcp-server-edif

MCP server and CLI tool for querying EDIF (Electronic Design Interchange Format) netlist files.

Load an EDIF/EDF file exported from Altium, OrCAD, or other EDA tools, then explore components, nets, and pin-level connectivity. Multi-part components (ICs split into sections like U5A/U5B/U5C) are automatically detected and merged into a single logical component.

What you can ask

Once connected, talk to your assistant about the design in plain language — it picks the right tools and chains them. The following are real questions with real answers, captured from a live MCP session against the boards in testdata/ (BeagleBone Black and Marvell OpenRD):

🧑‍🔧 What is U5 pin GPIO2_1 connected to?

🤖 runs get_pin_net(component="U5A", pin="GPIO2_1"), get_component_pins(name="P8")

U5A pin GPIO2_1 sits on net GPIO2_1, and the only other connection is P8.34 — pin 34 of expansion header P8. So this GPIO goes straight out to the expansion connector with nothing else on it: no pulls, no series resistor, just SoC-to-header.

🧑‍🔧 Is the boot configuration pulled up or down by default?

🤖 runs list_nets(pattern="boot"), find_pull_resistors(), get_net(...)

This netlist doesn't use SYSBOOT net names — the AM3358 boot-strap balls appear as nets GPIO2_6 through GPIO2_13. Each of these eight lines has both a 100k pull-up to VDD_3V3A (R80–R87) and a 100k pull-down to DGND (R100–R107) — the classic stuffing-option pattern, so the actual boot word depends on which resistors are populated. The Ethernet PHY straps (MODE0/1/2, RMIISEL) have the same up/down pairs.

🧑‍🔧 Trace the connection between the CPU and the Ethernet PHY.

🤖 runs trace_path(from="U5", to="U15") — verbatim output (23 paths; excerpt):

Connections from U5 to U15 (23):
  U5A.NRESET_INOUT -- SYS_RESETn -- U15.NRST
  U5B.GPIO0_28 -- RMII1_TXD0 -- U15.TXD0
  U5B.GPIO0_0 -- MDIO_DATA -- U15.MDIO
  U5B.GPIO0_1 -- MDIO_CLK -- U15.MDC
  U5B.GPIO2_21 -- RMII1_RXD0 -- R135 -- MODE0 -- U15.MODE0
  U5B.GPIO3_3 -- RMII1_TXEN -- U15.TXEN
  U5B.GPIO3_9 -- RMII1_TXCLK -- R206 -- TXCLK -- U15.TXCLK
  U5B.GPIO0_29 -- U5_H18 -- R201 -- RMII1_REFCLK -- R200 -- RCLKIN -- U15.CLKIN
  ...

The trace covers the complete interface: the RMII data bus, the MDIO management pair (MDIO_DATA/MDIO_CLK), the reset line, the strap pins behind their series resistors, and the clock paths — see the clock question below for what those R200/R201 resistors are doing.

🧑‍🔧 How does the Ethernet PHY get its clock?

🤖 runs list_components(cell_type="lan"), get_component_pins(name="Y4"), trace_path(from="U5", to="U15"), get_net(...)

The LAN8710 PHY (U15) is clocked primarily by its own 25 MHz crystal Y4 (Suntsu ITEMP, 20 pF): Y4.1 → PHY_XTAL1 → R199 → RCLKIN → U15.CLKIN. The series resistors exist because there's an alternative: the trace above shows the AM3358 can drive a reference clock into the PHY instead — U5B.GPIO0_29 -- R201 -- RMII1_REFCLK -- R200 -- RCLKIN -- U15.CLKIN — so the clock source is resistor-selectable between the crystal and the SoC.

🧑‍🔧 Write a Linux device-tree node for the user LEDs on this board.

🤖 runs get_net(name="USR0") … get_net(name="USR3"), get_component_pins(name="Q1"), get_net(name="LEDAC"), get_net(name="LEDAA"), find_pull_resistors()

The four user LEDs hang off U5A.GPIO1_21–GPIO1_24 (nets USR0–USR3). Each GPIO drives the base of an RN1907 transistor (Q1/Q2) whose collector sinks the LED cathode, with the anode fed from VDD_LED through a 470 Ω resistor — so the LEDs are active-high — and 100k pull-downs (R116–R119) hold them off until the pins are configured:

leds {
    compatible = "gpio-leds";

    led-usr0 {
        label = "beaglebone:green:usr0";
        gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
        default-state = "off";
    };
    /* usr1..usr3 identically on gpio1 22, 23, 24 */
};

Every fact in that node is read off the netlist: the GPIO bank and line from the SoC ball names, the polarity from the transistor topology, the default state from the pull-downs.

This derivation matches the mainline am335x-bone-common.dtsi — produced here purely from the EDIF, without looking at the kernel sources.

🧑‍🔧 Load openrd.edf and give me an overview of this board.

🤖 runs load_edif, summary, list_components

Marvell 88F6281 Kirkwood SoC (7-section symbol U1A–U1G) with 4× MT47H128M8 DDR2 plus a dedicated MT47H16M16 for the XGI graphics chip. Storage: K9F5608U0D NAND, SD slot, SATA + eSATA. Networking: dual Gigabit Ethernet via 2× 88E1116 PHYs. USB: SMSC USB2517 7-port hub feeding 3 Type-A + 2 stacked receptacles, plus an FT2232 debug bridge. Also: VGA out, CS42L51 audio codec, PCIe x1, RS-232 and RS-485, JTAG headers, RTC battery. (1401 components, 681 nets.)

Every designator and net name above came from tool output — nothing invented. The assistant combines netlist facts with its own domain knowledge (what a USB hub is, what a stuffing option means, what a sane reset circuit looks like), so it can review a design, not just look things up.

Install

Download a pre-built binary from Releases (Linux, macOS, Windows — amd64 and arm64).

Or install with Go:

go install github.com/palavrov/mcp-server-edif@latest

Or build from source:

git clone https://github.com/palavrov/mcp-server-edif.git
cd mcp-server-edif
go build -o mcp-server-edif .

MCP Server

The binary runs as an MCP server over stdio by default. Add it to your Claude Code, Claude Desktop, or VS Code MCP config:

{
  "mcpServers": {
    "edif": {
      "command": "mcp-server-edif"
    }
  }
}

To change the watchdog timeout (default 5s, see below), set the MCP_SERVER_EDIF_TIMEOUT environment variable in the server config:

{
  "mcpServers": {
    "edif": {
      "command": "mcp-server-edif",
      "env": { "MCP_SERVER_EDIF_TIMEOUT": "30" }
    }
  }
}

Tools

ToolDescription
load_edifParse and load an EDIF file
summaryHigh-level overview: component count, nets, power rails, multi-part info
list_componentsCompact component list (multi-part merged), optional cell type filter
list_netsCompact net list with connection counts, optional name filter
list_cellsCell (component type) definitions from libraries
get_component_pinsPin list for a component, grouped by section for multi-part
get_pin_netTrace a specific pin to its net and see all other connections
get_netFull connectivity for a named net
find_pull_resistorsFind all pull-up and pull-down resistors
trace_pathTrace signal paths between two components through passives and active ICs (using port direction analysis)

The API is optimized for LLM consumption: compact lists at the top level, drill down to pin-level detail on demand. This avoids flooding the model context with hundreds of nets and pins at once.

CLI

The same binary doubles as a CLI tool:

mcp-server-edif summary board.edf
mcp-server-edif list-components board.edf
mcp-server-edif list-components --filter cap board.edf
mcp-server-edif list-nets board.edf
mcp-server-edif list-nets --filter i2c board.edf
mcp-server-edif pins U5 board.edf
mcp-server-edif pin-net U5A GPIO2_1 board.edf
mcp-server-edif get-net GND board.edf
mcp-server-edif list-cells board.edf
mcp-server-edif pull-resistors board.edf
mcp-server-edif trace U5 U10 board.edf
mcp-server-edif summary --timeout 30 huge-board.edf

Multi-part components

ICs are often split into sections in schematic tools (e.g., an AM335x processor as U5A, U5B, U5C). This tool detects these automatically and presents them as a single component U5. Querying pins shows them grouped by section. You can refer to either U5 or U5A — both resolve correctly.

Signal path tracing

trace_path finds signal connections between two components, following through:

  • Passive components (resistors, capacitors, inductors, ferrite beads) in any direction
  • Active ICs (level shifters, buffers, USB hubs) using port direction analysis from the EDIF cell definitions (INPUT to OUTPUT/INOUT)

Power and ground nets are automatically excluded. The search is bounded by a depth limit of 5 intermediate components, a result cap, and the process watchdog.

Watchdog

Every MCP request and CLI run is covered by a process watchdog (default 5s — real requests finish in well under a second, even parsing an 8MB file). If a request runs past the timeout — malformed file, pathological query, parser bug — the watchdog prints an error to stderr and kills the process (exit code 2). This is deliberate: a stuck request cannot be cancelled gently, so exiting is the only way to guarantee it doesn't live on as a CPU-burning zombie. MCP clients simply restart the server.

  • CLI: --timeout N (seconds) works with every subcommand
  • MCP server: set the MCP_SERVER_EDIF_TIMEOUT environment variable

Supported formats

  • Altium Designer EDIF exports (.edf)
  • OrCAD Capture EDIF 2.0.0 exports (.edf, .edif)

OrCAD uses internal IDs for instance references in nets (e.g., INS20386449 instead of U5C). These are resolved transparently to designator names.

Cross-page nets in OrCAD multi-page schematics are automatically merged so that signal tracing works across schematic pages.

Tested with

  • BeagleBone Black Rev A6A (TI AM3358, 530 components)
  • TI PandaBoard (OMAP4430, 552 components)
  • Marvell OpenRD (88F6281, 1401 components)
  • Custom ESP32 board (78 components)

Tests

go test ./...

License

MIT

Ver o original no GitHub

Bom para

Relacionados