About Pcb Lens
Pcb Lens is an MCP server published by IntelligentElectron in the Developer Tools category: mCP server for IPC-2581 PCB layout analysis and review. Conduid read 11 tools from its source: export_cadence_constraints, export_cadence_ipc2581, get_constraints, get_pcb_component, get_pcb_drc, get_pcb_footprint and 5 more. It is published to npm as @intelligentelectron/pcb-lens and starts with npx.
The repository has 7 stars and 3 forks, and its last commit was on 25 Nov 2026. Conduid has no tagged release on record for it. It passes all 1 static checks Conduid ran on the repository. Its topics include eda, hardware-review and pcb.
Install
claude mcp add pcb-lens -- npx -y @intelligentelectron/pcb-lensnpx -y @intelligentelectron/pcb-lensgit clone https://github.com/IntelligentElectron/pcb-lensTools (11)
export_cadence_constraintsExport the design rules and constraints from a Cadence Allegro .brd file to a .tcfx file, which you can then read with get_constraints. Windows only, and requires a Cadence SPB installation (detected automatically).| Parameter | Type | Description |
|---|---|---|
| board * | string | Path to Cadence Allegro .brd file |
| output | string | Output .tcfx path. Defaults to <boardname>_constraints.tcfx next to the .brd |
export_cadence_ipc2581Export a Cadence Allegro .brd file to an IPC-2581 XML file, the format the other PCB query tools (get_pcb_metadata, get_pcb_component, get_pcb_net) read. Windows only, and requires a Cadence SPB installation (detected automatically).| Parameter | Type | Description |
|---|---|---|
| board * | string | Path to Cadence Allegro .brd file |
| output | string | Output path (without .xml extension — Cadence appends it). Defaults to <boardname>_ipc2581.xml next to the .brd |
| revision | string | IPC-2581 revision to write: "B" (1.03) or "C" (1.04, the default). Rev C carries the most layout detail; prefer it unless a downstream tool needs Rev B. |
get_constraintsQuery layout constraints from a Cadence .tcfx file, a Constraint Manager .dcf file, or an Allegro .brd board (read directly, no Cadence install needed). Without a section name, returns an overview of all sections and object counts. With a section name, returns all constraint objects with their attributes, references, members and children. Common sections: PhysicalCSet, SpacingCSet, ElectricalCSet, NetClass, MatchGroup, DiffPair, Design (stackup), Region. A .brd also has Brd* sections decoded from its binary database (BrdPhysicalCSet, BrdNetClass, BrdNet, BrdStackup, ...): these are the board's live rules, while the XML sections are embedded Constraint Manager snapshots whose 'source' says where they came from.| Parameter | Type | Description |
|---|---|---|
| file * | string | Path to a .tcfx, .dcf or .brd file |
| section | string | Section name to query (e.g., 'PhysicalCSet', 'SpacingCSet'). Omit for overview. |
get_pcb_componentLook up a single component by its exact reference designator (refdes). Returns its placement (position, rotation, layer), package and BOM details, the nets connected to each pin, and a summary of its pads (count and the distinct pad shapes). The refdes must match exactly; it is not a pattern. Set detail='full' to additionally get the exact coordinate of every pad (sampled for components with very many pads).| Parameter | Type | Description |
|---|---|---|
| detail | string | How much to return. 'summary' (default) gives the pad count and distinct pad shapes. 'full' additionally returns the exact coordinate of each pad; components with very many pads are sampled. Use 'full' only when you need exact pad positions, since responses are larger. |
| file * | string | Path to an IPC-2581 XML file or an Allegro .brd file (Allegro 16.0 to 25.1) |
| refdes * | string | Exact component reference designator (e.g., 'U5', 'C10', 'R22') |
get_pcb_drcReport the DRC markers an Allegro .brd holds from its last DRC run, counted by check (e.g. LINE_TO_LINE_SPACING, PACKAGE_PACKAGE), and how many DRC checks the board has on, off or in batch mode. Set detail='full' for each marker's position, layer, constraint set and the two objects in conflict (pins as REFDES.PIN, vias, tracks and shapes with their net and layer), and the list of checks that are on. Markers are what the last DRC run found; edits since then are not reflected.| Parameter | Type | Description |
|---|---|---|
| check | string | Only checks whose name matches this case-insensitive regex (e.g. 'SPACING', 'PACKAGE') |
| detail | string | 'summary' (default) gives counts. 'full' adds each marker (sampled across checks) and the checks that are on. |
| file * | string | Path to an Allegro .brd file (Allegro 17.2 to 25.1) |
get_pcb_footprintLook up footprint (package symbol) and padstack definitions of an Allegro .brd by name pattern. A footprint gives its kind, the components placed with it, its pin count, the padstacks its pins use, its extent and properties; detail='full' adds each pin's position, rotation and padstack in the footprint's own frame, and its template drawing (silkscreen, assembly, place bound). A padstack gives its drill, slot, plating and type (smd, through, blind/buried), the pad, antipad and thermal figure on each copper layer, the soldermask and pastemask openings, custom pad outlines and the drill symbol. get_pcb_component gives a component's footprint name (packageRef) and each pad's padstack.| Parameter | Type | Description |
|---|---|---|
| detail | string | 'summary' (default) describes each definition. 'full' adds footprint pins and template drawing, capped. |
| file * | string | Path to an Allegro .brd file (Allegro 16.0 to 25.1) |
| pattern * | string | Case-insensitive regex on footprint and padstack names (e.g. '^SOIC', 'QFN48', 'VIA') |
get_pcb_layerList what is drawn on the layers of an Allegro .brd whose CLASS/SUBCLASS name matches a pattern: lines, rectangles, shapes (copper pours, keepouts, place bounds, soldermask openings, outlines) and text (refdes and value labels, pin numbers, notes). Layers are named as Allegro names them, e.g. 'BOARD_GEOMETRY/SILKSCREEN_TOP', 'PACKAGE_GEOMETRY/PLACE_BOUND_TOP', 'ETCH/TOP'; get_pcb_metadata lists the layers that hold items. The summary gives per-layer counts, filled area and extent. Set detail='full' for each item's geometry and text. Routed tracks and vias are reported by get_pcb_net.| Parameter | Type | Description |
|---|---|---|
| detail | string | 'summary' (default) gives counts, filled area and extent per layer. 'full' adds every item's geometry and text, sampled across layers when there are very many. |
| file * | string | Path to an Allegro .brd file (Allegro 16.0 to 25.1) |
| layer * | string | Case-insensitive regex on CLASS/SUBCLASS layer names (e.g. 'SILKSCREEN_TOP', '^PACKAGE_GEOMETRY/PLACE_BOUND', 'KEEPOUT') |
| refdes | string | Only items drawn by this component (exact refdes) |
| within | string | Only items overlapping this box: 'minX,minY,maxX,maxY' in microns |
get_pcb_metadataGet a high-level overview of a PCB design file: file metadata, the layer stackup, design units, the board outline (its width, height and extent, and its edge and cutout contours), and the total component and net counts. Use this first to understand a design's size and layers before querying specific components or nets. For an Allegro .brd the layers are the copper layers, top to bottom, and drawingLayers lists every CLASS/SUBCLASS layer that holds lines, shapes or text (silkscreen, assembly, place bounds, keepouts, copper shapes...) with its item count; get_pcb_layer reads them.| Parameter | Type | Description |
|---|---|---|
| file * | string | Path to an IPC-2581 XML file or an Allegro .brd file (Allegro 16.0 to 25.1) |
get_pcb_netLook up nets in a PCB layout by name and inspect their connectivity and routing. Provide a net-name pattern (a regular expression); for each matching net you get the connected component pins (grouped by component), the layers the net uses, a per-layer routing summary (trace widths, number of routed segments, and total routed length), and a via summary (count per drill size). All distances are in microns. Copper that is filled as a pour or plane instead of drawn as a trace is reported as routed on its layer but without a width or length, so a net can be fully routed yet show no trace width. A net that returns pins but no routing was most likely exported without its routed-copper data. Use a specific pattern: one that matches every net in the design is rejected. Set detail='full' to additionally return exact geometry — every via coordinate and the full point-by-point shape of each routed trace (including arcs for curved traces); for very large nets this geometry is sampled and the response is marked truncated.| Parameter | Type | Description |
|---|---|---|
| detail | string | How much to return. 'summary' (default) gives the per-layer routing summary and via counts. 'full' additionally returns exact geometry: every via coordinate and the full shape of each routed trace (its vertices, width, and arc data for curved traces); large nets are sampled and the response is marked truncated. Use 'full' only when you need exact coordinates, since responses are larger. |
| file * | string | Path to an IPC-2581 XML file or an Allegro .brd file (Allegro 16.0 to 25.1) |
| pattern * | string | Regex pattern for net name (e.g., '^DDR_D0$', 'CLK', '^VCC_3V3$') |
get_pcb_objectLook inside the binary database of an Allegro .brd, for data the other tools do not cover. Without arguments: every block type with Allegro's name and count, and the attachments (embedded files such as the last-save record, Constraint Manager archives, 3D models, DBDoctor logs). With 'type': the keys of the blocks of that type. With 'key': that block's words, each word that names another block or a string resolved, and the blocks whose words hold this key. With 'attachment': that attachment's text, decompressed when zlib. Use the named tools first; this is the backstop.| Parameter | Type | Description |
|---|---|---|
| attachment | string | An attachment name, e.g. 'ALLEGRO_DESIGN_WAS_LAST_SAVED' |
| file * | string | Path to an Allegro .brd file (Allegro 16.0 to 25.1) |
| key | string | A block key, decimal or hex (e.g. '81234' or '0x13d52') |
| type | string | A block type number, e.g. '0x1B' (nets) or '0x21' |
render_netRender a net's routing geometry as SVG from an IPC-2581 file. Returns an SVG showing board outline, trace paths by layer, exact SMD pad shapes, via annular rings, and pin labels.| Parameter | Type | Description |
|---|---|---|
| file * | string | Path to IPC-2581 XML file |
| pattern * | string | Regex pattern for net name (e.g., '^VDD_3V3B$', 'CLK') |
Security checks
- ✓README presentThe repository's README runs to about 494 words.
5 checks have not been run yet.
README
The repository's README runs to about 494 words. The original in the repository is authoritative.
Read full README