Skip to content
Back to search

orcad-mcp

MCP server for OrCAD Capture: read and edit schematics (parts, nets, properties, BOM, PADS netlist) from an AI assistant

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/blessingq--orcad-mcp/badge.svg)](/listings/blessingq--orcad-mcp)

HTML

<a href="/listings/blessingq--orcad-mcp"><img src="/api/listings/blessingq--orcad-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. Install the bridge into Capture (once per PC)

uvx orcad-mcp install

This writes the bridge script and a token to `%USERPROFILE%\.orcad-mcp`, and a small loader to `<Cadence>\tools\capture\tclscripts\capAutoLoad` (found through `CDSROOT` or under `C:\Cadence`; use `--cdsroot C:\Cadence\SPB_16.5` to choose). Capture then starts the bridge every time it starts.

**Restart Capture**, or start the bridge right away in Capture's Command Window (View > Command Window):

source {C:/Users/<you>/.orcad-mcp/orcad_bridge.tcl}

The Command Window shows `orcad-mcp bridge 1 listening on 127.0.0.1:47800`. Check from a terminal:

uvx orcad-mcp status

> Not on PyPI yet? Use the GitHub version everywhere `uvx orcad-mcp` appears: > `uvx --from git+https://github.com/BlessingQ/orcad-mcp orcad-mcp install`

2. Add the server to your MCP client

**Claude Code** (all projects on this PC):

claude mcp add --scope user orcad -- uvx orcad-mcp

Use `--scope project` to write `.mcp.json` into a project instead, or `--scope local` for this project only. Start a new Claude Code session afterwards.

**Claude Desktop / other clients** (`claude_desktop_config.json` or the client's MCP config):

{
  "mcpServers": {
    "orcad": {
      "command": "uvx",
      "args": ["orcad-mcp"]
    }
  }
}

If `uvx` is not on the `PATH` of the client, use its full path (`C:\Users\<you>\.local\bin\uvx.exe`).

**Updating**: `uvx` caches the package. Run `uvx orcad-mcp@latest --version` (or `uv cache clean orcad-mcp`) to fetch a new release; the server updates the installed bridge script when it starts. Restart Capture when `orcad_status` reports a bridge version mismatch.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 220 lines
  1. # orcad-mcp
  2. An [MCP](https://modelcontextprotocol.io) server that lets an AI assistant (Claude Code, Claude Desktop, any MCP
  3. client) read and edit **OrCAD Capture** schematics while Capture is running.
  4. [한국어 문서 (Korean)](README.ko.md)
  5. - **Read** designs, pages, parts (Value, PCB Footprint, any property), pins with their nets, and the full
  6. netlist (connectivity across pages, as Capture's netlister sees it)
  7. - **Edit** part properties in bulk: Value, PCB Footprint, Part Reference, user properties. All changes of a
  8. call are checked first and applied together, with rollback on failure
  9. - **Save** the design (the `.dsn` is backed up first)
  10. - **BOM**: grouped by any properties, optionally written as CSV; or exported as Capture's own `.BOM` report and
  11. the same report as `.xlsx`
  12. - **PADS netlist**: writes a PADS PowerPCB ASCII netlist (`.asc`) for PADS Layout, in the layout Capture's
  13. own PADS formatter uses
  14. - **Draw**: place parts, wires, off-page connectors, power/ground symbols, junctions and no-connect marks;
  15. rename symbols; delete an area (listed first); move between pages
  16. - **Libraries**: add parts (rectangular body, any pin numbers such as `A5`/`SH1`) to a `.olb` without Capture
  17. - **Tcl escape hatch** (`run_tcl`): the complete Capture database API (`Dbo*`) and Capture commands
  18. ## How it works
  19. ```
  20. MCP client ──stdio──> orcad-mcp (Python) ──TCP 127.0.0.1:47800──> bridge (Tcl, inside Capture) ──> Capture database
  21. ```
  22. Capture has a Tcl interpreter with a database API. A small bridge script runs inside Capture, listens on
  23. `127.0.0.1` only, and executes requests from orcad-mcp. Every request must carry a random token stored in
  24. `%USERPROFILE%\.orcad-mcp\token`, so only programs of the same Windows user can talk to it.
  25. ## Requirements
  26. - Windows with **OrCAD Capture 16.5** or later (tested with 16.5, Tcl 8.4.15; 17.x uses the same API but
  27. has not been tested yet)
  28. - [uv](https://docs.astral.sh/uv/getting-started/installation/) (it installs Python by itself):
  29. `powershell -c "irm https://astral.sh/uv/install.ps1 | iex"`
  30. ## Installation
  31. ### 1. Install the bridge into Capture (once per PC)
  32. ```powershell
  33. uvx orcad-mcp install
  34. ```
  35. This writes the bridge script and a token to `%USERPROFILE%\.orcad-mcp`, and a small loader to
  36. `<Cadence>\tools\capture\tclscripts\capAutoLoad` (found through `CDSROOT` or under `C:\Cadence`;
  37. use `--cdsroot C:\Cadence\SPB_16.5` to choose). Capture then starts the bridge every time it starts.
  38. **Restart Capture**, or start the bridge right away in Capture's Command Window (View > Command Window):
  39. ```tcl
  40. source {C:/Users/<you>/.orcad-mcp/orcad_bridge.tcl}
  41. ```
  42. The Command Window shows `orcad-mcp bridge 1 listening on 127.0.0.1:47800`. Check from a terminal:
  43. ```powershell
  44. uvx orcad-mcp status
  45. ```
  46. > Not on PyPI yet? Use the GitHub version everywhere `uvx orcad-mcp` appears:
  47. > `uvx --from git+https://github.com/BlessingQ/orcad-mcp orcad-mcp install`
  48. ### 2. Add the server to your MCP client
  49. **Claude Code** (all projects on this PC):
  50. ```powershell
  51. claude mcp add --scope user orcad -- uvx orcad-mcp
  52. ```
  53. Use `--scope project` to write `.mcp.json` into a project instead, or `--scope local` for this project only.
  54. Start a new Claude Code session afterwards.
  55. **Claude Desktop / other clients** (`claude_desktop_config.json` or the client's MCP config):
  56. ```json
  57. {
  58. "mcpServers": {
  59. "orcad": {
  60. "command": "uvx",
  61. "args": ["orcad-mcp"]
  62. }
  63. }
  64. }
  65. ```
  66. If `uvx` is not on the `PATH` of the client, use its full path (`C:\Users\<you>\.local\bin\uvx.exe`).
  67. **Updating**: `uvx` caches the package. Run `uvx orcad-mcp@latest --version` (or `uv cache clean orcad-mcp`)
  68. to fetch a new release; the server updates the installed bridge script when it starts. Restart Capture when
  69. `orcad_status` reports a bridge version mismatch.
  70. ## Tools
  71. | Tool | What it does |
  72. |------|--------------|
  73. | `orcad_status` | Bridge connection, Capture version, open designs (active, unsaved changes). Explains how to start the bridge when it does not answer |
  74. | `install_bridge` | Same as `orcad-mcp install`, from the AI client |
  75. | `list_pages` | Schematic folders and pages with part counts |
  76. | `list_parts` | Part table (refdes, value, footprint, page, library part) with wildcard filters and extra property columns |
  77. | `get_part` | All properties (and which are read-only), pins with pin name, type and net, location |
  78. | `list_nets` | Nets with their pins (`U1.9:PA3`), filter by net name or by part |
  79. | `get_bom` | BOM grouped by properties; optional CSV file |
  80. | `set_part_properties` | Change properties of one or many parts at once (checked first, rolled back on failure) |
  81. | `save_design` | Save to the `.dsn` (backup to `%USERPROFILE%\.orcad-mcp\backups` first) |
  82. | `open_design` / `close_design` | Load a `.dsn` that is not open in Capture (no window) and unload it again |
  83. | `export_netlist` | PADS PowerPCB ASCII netlist (`.asc`) |
  84. | `export_bom` | Bill of materials as Capture's `.BOM` report and/or the same report as `.xlsx` (header from the title block, one line per Value) |
  85. | `active_page` / `goto_page` | Which page Capture shows / show another page (View > Next/Previous Page) |
  86. | `page_objects` | Page geometry: parts with bounding box and pin coordinates, symbols, wires (optionally only an area) |
  87. | `place_part` | Place a library part and set reference, value, footprint; returns its pin coordinates |
  88. | `place_wire` | Wire through points |
  89. | `place_symbol` | Off-page connector, power or ground symbol with its connection point at (x, y) |
  90. | `place_marks` | Junctions or no-connect marks |
  91. | `delete_area` | Delete what touches a rectangle; lists first, deletes with `apply=true` |
  92. | `rename_symbol` | Rename a power/ground symbol or off-page connector |
  93. | `set_no_connect` | Set or clear the no-connect flag of pins |
  94. | `check_points` | Is a point a connection point, which nets end there |
  95. | `create_library_parts` | Add parts to a `.olb` through Cadence's Tcl shell (copy, check, back up, replace) |
  96. | `run_tcl` | Run any Tcl in Capture (refuses GUI commands known to crash Capture) |
  97. `design` arguments accept the `.dsn` path, the file name or a unique part of it; without it the design active
  98. in Capture's project manager is used.
  99. Example prompts:
  100. - *"List all 100n capacitors and their footprints."* → `list_parts value="*100n*"`
  101. - *"Which nets is U2 connected to? Is PA9 really on USART1_TX?"* → `list_nets refdes="U2"`
  102. - *"Set the footprint of every 0603 resistor to R1608, then show me the changes."* → `list_parts`,
  103. `set_part_properties`
  104. - *"Make a BOM grouped by Value and Manufacturer and save it as CSV next to the design."* → `get_bom`
  105. - *"Export the PADS netlist."* → `export_netlist`
  106. ## Safety
  107. - Reading never changes anything.
  108. - `set_part_properties` changes the design in Capture's memory immediately (the server asks Capture to
  109. redraw the active page); the `.dsn` file only changes with `save_design`. Capture's **Edit > Undo does not cover these changes**: the
  110. tool returns the old values, so the assistant can set them back.
  111. - `save_design` copies the current `.dsn` to `%USERPROFILE%\.orcad-mcp\backups\<design>\` first (the last 20
  112. are kept). Capture also writes its usual `_0.DBK` backup. Its result says whether the file was rewritten
  113. (`file_written`). Capture's window may keep its `*` (modified) mark: no scripted save clears it (saving through
  114. the database, or File > Save by menu id or menu path), although the file is saved; Ctrl+S in Capture clears it.
  115. - MCP tool annotations: reading tools are read-only; tools that only add objects (`place_*`,
  116. `create_library_parts`) or change what Capture shows (`goto_page`) are non-destructive; tools that delete or
  117. overwrite (`delete_area`, `save_design`, `set_part_properties`, `rename_symbol`, `set_no_connect`, `run_tcl`)
  118. are marked destructive, so clients can ask for approval.
  119. - `run_tcl` can do anything Capture's Tcl can (including starting programs). Disable it with
  120. `ORCAD_MCP_ALLOW_TCL=0`.
  121. - Two script mistakes crash Capture 16.5 with an access violation that Tcl `catch` cannot stop: calling a
  122. method on a NULL database object (for example the net of an unconnected pin) and calling undocumented GUI
  123. commands such as `GetWindows`, `GetActiveWindow`, `GetActivePage`. The bridge defines `::NULL` so the first
  124. becomes an ordinary Tcl error; `run_tcl` refuses the second unless `allow_unsafe=true`. The drawing tools
  125. only use commands whose signatures are known (the `Declare Sub` list and menu resources in `Capture.exe`).
  126. - The drawing tools work on the page Capture shows and check that first. `active_page` finds that page by
  127. drawing a 0.2 mm marker wire in the page corner and deleting it again (the page is marked modified).
  128. - `delete_area` deletes nothing unless `apply=true`. Capture's area select takes everything that touches the
  129. rectangle, including parts whose text reaches into it; the dry run lists exactly that.
  130. - `create_library_parts` never opens the original library: it edits a copy, reads it back, compares it with
  131. the request and only then backs up and replaces the original. Restart Capture to see the new parts.
  132. - The bridge only accepts connections from `127.0.0.1` with the token; malformed requests (for example a web
  133. page posting to the port) are dropped without being evaluated.
  134. - Capture runs requests on its GUI thread. While a modal dialog is open in Capture, requests wait and time
  135. out after `ORCAD_MCP_TIMEOUT` seconds.
  136. ## Configuration
  137. | Variable | Default | Meaning |
  138. |----------|---------|---------|
  139. | `ORCAD_MCP_PORT` | `47800` | Bridge port (set it for Capture too, e.g. as a Windows user variable) |
  140. | `ORCAD_MCP_HOME` | `%USERPROFILE%\.orcad-mcp` | Bridge script, token, backups (must be the same for Capture) |
  141. | `ORCAD_MCP_TIMEOUT` | `120` | Seconds to wait for Capture |
  142. | `ORCAD_MCP_ALLOW_TCL` | `1` | `0` disables `run_tcl` |
  143. | `ORCAD_MCP_BACKUP` | `1` | `0` disables the backup before `save_design` |
  144. | `ORCAD_MCP_CDSROOT` | `CDSROOT` | Cadence folder used by `install` |
  145. | `ORCAD_MCP_LOG_LEVEL` | `WARNING` | Log level (stderr) |
  146. ## Command line
  147. ```
  148. orcad-mcp run the MCP server on stdio (what MCP clients start)
  149. orcad-mcp install install the bridge (see above); --cdsroot DIR
  150. orcad-mcp uninstall remove the Capture loader; --purge also deletes bridge script and token
  151. orcad-mcp status check the connection, list open designs
  152. orcad-mcp tcl "<script>" run Tcl in Capture (or @file.tcl)
  153. ```
  154. ## Limitations / roadmap
  155. - Parts are placed unrotated (rotation 0); net aliases are not a tool (use off-page connectors).
  156. - `goto_page` moves within one schematic folder and needs a page of the design to be shown already.
  157. - New library parts get a rectangular body and passive pins.
  158. - Hierarchical designs with reused blocks (occurrence properties): parts are read per instance, not per
  159. occurrence.
  160. - PDF export is not included.
  161. - One Capture instance per port.
  162. ## Development
  163. ```powershell
  164. git clone https://github.com/BlessingQ/orcad-mcp
  165. cd orcad-mcp
  166. uv sync
  167. uv run pytest # unit tests; the bridge protocol is tested in a local Tcl interpreter, no Capture needed
  168. uv run ruff check src tests
  169. ```
  170. The Capture-side code is in `src/orcad_mcp/tcl/`: `orcad_bridge.tcl` (TCP server, kept small and stable) and
  171. `orcad_mcp_lib.tcl` (queries and edits; sent to Capture by the server and reloaded whenever it changes).
  172. It must stay compatible with Tcl 8.4 (no `{*}`, `dict`, `lassign`, `lmap`, `apply`).
  173. Cadence's reference for the Tcl API: `<Cadence>\tools\capture\tclscripts\OrCAD_Capture_TclTk_Extensions.pdf`.
  174. ## License
  175. MIT. OrCAD and Cadence are trademarks of Cadence Design Systems, Inc. This project is not affiliated with
  176. Cadence.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.