Skip to main content
Glama
etch-mcp
by xuio
README.md
# etch for Altium Designer

**Let your AI agent work in Altium Designer: Altium's own compiler, DRC, generators and renders, and
every change planned, applied by Altium and read back.**

[![License: MIT-0](https://img.shields.io/badge/license-MIT--0-blue.svg)](LICENSE)
[![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](pyproject.toml)
[![Platform](https://img.shields.io/badge/platform-Altium%20Designer%20on%20Windows%20%7C%20client%20macOS%2FLinux%2FWindows-lightgrey.svg)](#requirements)
<!-- CI badge: add once a public CI workflow exists -->

<!-- hero: docs/media/hero.gif (pending owner approval) -->

etch is a CLI, an MCP server and four agent skills for Altium Designer. You, your scripts and LLM agents
(Claude Code, Claude Desktop or any MCP client) create and fix library parts, check and compare designs,
run ECOs and outputs, and look at any document as Altium renders it.

## Things you can ask your agent

- "Compile `Board.PrjPcb`, run DRC and group the violations by rule."
- "Render every schematic sheet and the PCB, then show me the USB section."
- "Which parts and nets are within two hops of the 3V3 regulator?"
- "What is the smallest copper gap between `USB_DP`/`USB_DN` and any other net on the top layer?"
- "Make a footprint for this QFN-32 from the datasheet table with Altium's IPC generator, check it and
  render it."
- "Align the STEP model of J1 to its footprint and show me the preview before you apply it."
- "What changed in this board between the last two commits: parts, nets, placement?"
- "Show the schematic-to-PCB differences and plan the ECO."

Each prompt maps to `etch` verbs (`check`, `render`, `trace`, `pcb gaps`, `ipc`, `model`, `diff`, `eco`)
that the agent calls through MCP or the CLI; the skills teach it which one to use.

## Requirements

- **Altium Designer on Windows**, installed and licensed. etch automates your existing Altium; it does
  not replace it.
- Python 3.11 or newer on the Altium PC (and on any other client machine).
- An administrator terminal on the Altium PC for the one-time setup.

## Quick start (5 minutes, on the Altium PC)

1. From the [latest release](https://github.com/xuio/etch-for-altium/releases/latest) download the
   Python package `etch_for_altium-1.8.0-py3-none-any.whl` and the plugin `etch-plugin-1.8.0.zip` into one
   folder. Optional: check both with `gh attestation verify <file> --repo xuio/etch-for-altium`
   ([SECURITY.md](SECURITY.md#verify-a-release)).
2. In a terminal opened with **Run as administrator**, close Altium, then:

   ```powershell
   pip install etch_for_altium-1.8.0-py3-none-any.whl
   etch setup --plugin-zip etch-plugin-1.8.0.zip    # registers the plugin, starts Altium, runs etch doctor
   etch doctor                                      # every check etch needs, each problem with a fix hint
   ```

3. Get a sample board: copy [`fixtures/open-source/nodemcu-devkit`](fixtures/open-source/nodemcu-devkit)
   from this repository (the MIT-licensed NodeMCU devkit) to `C:\Etch\nodemcu`. etch works on files
   under `C:\Etch` by default.
4. Connect your agent. For Claude Code, in your project folder:

   ```powershell
   etch mcp install --client claude-code   # MCP server + the four skills; or --client claude-desktop
   ```

   The agent may use local files only inside its roots. Run the command in your project folder, or name the
   folders with `--root <dir>` (repeatable). Claude Desktop starts the server in `/` or your home folder,
   which never count, so it needs a root: `etch mcp install --client claude-desktop --root C:\Etch`.

   **Agent access.** By default the agent has full access: it may run every etch action, including approving
   plans, electrical-risk library rows, releases and `etch clean --force`. In this mode approvals guard against
   stale or swapped plans and mistakes, not against an agent tricked by instructions hidden in what it reads.
   When your agent reads untrusted content (vendor libraries, datasheets, candidate repositories), switch to
   restricted mode: `etch mcp access restricted` (or `etch mcp install --restricted`). Those steps then stay
   yours, and the agent hands you the `etch` command to run. For an agent that should only look,
   `etch mcp access read-only` (or `etch mcp install --read-only`) lets it read, check, list and render (renders
   go to etch's own artifact folder) and nothing else: no reports, plans or captures on the host, no project
   opened or closed. Your MCP client's own permission prompts are a human gate
   in every mode. `etch doctor` shows the mode; see [SECURITY.md](SECURITY.md).

5. Ask: *"Check `C:\Etch\nodemcu\NODEMCU_ESP12.PrjPCB` with DRC and render the schematic."*
   The same from the terminal:

   ```powershell
   etch check C:\Etch\nodemcu\NODEMCU_ESP12.PrjPCB --drc
   etch render C:\Etch\nodemcu\NODEMCU_ESP12.PrjPCB --all-sheets
   ```

`etch setup` accepts only the plugin zip whose sha256 is built into the etch package of the same version
(nothing is unpacked or run before that check), refuses a zip built for a different Altium build, and can be
re-run to repair or upgrade (`--dry-run` shows the plan, `etch uninstall` removes the plugin).
All flags and the daily verbs: [docs/CLI-REFERENCE.md](docs/CLI-REFERENCE.md).

**As a Claude Code plugin.** Instead of step 4 you can install the skills and the MCP server as one
plugin: `/plugin marketplace add xuio/etch-for-altium`, then `/plugin install etch@etch-for-altium`. The
plugin starts the `etch-mcp` command, so the wheel from step 2 must be installed and `etch-mcp` on your
`PATH`. Use either the plugin or `etch mcp install`, not both.

**Release plugin and source builds.** The plugin zip on the release page applies ECOs headlessly. A
plugin built from this source shows and plans ECOs (`etch eco`), and you apply them with Altium's
Design > Update PCB; the few other release-only actions are marked in
[docs/CAPABILITY-MATRIX.md](docs/CAPABILITY-MATRIX.md). Building the plugin: [BUILDING.md](BUILDING.md).

### Windows installer (instead of steps 1, 2 and 4)

The release page also has `etch-for-altium-setup-<version>.exe`. It bundles its own Python, etch and the
plugin zip, needs no network access, and installs for all users into `C:\Program Files\etch` (it asks for
administrator rights). Close Altium first. The installer runs `etch setup` with the bundled plugin zip, with
the same checks as above, and adds `etch` to `PATH`. It asks three things:

- **Set up etch's MCP server for Claude Desktop / Claude Code** (on): runs `etch mcp install` for each of the
  two clients it finds on the PC, with `C:\Etch` as the root.
- **Install the etch agent skills** (on): copies the four skills into `%USERPROFILE%\.claude\skills`.
- **What AI agents may do** (see *Agent access* above):
  - **Full** (preselected): agents may run every etch action, including approvals and releases
    (`etch mcp access full`). Approvals then guard against mistakes, not against a prompt-injected agent.
  - **Restricted**: a person approves and releases (`etch mcp access restricted`).
  - **Read-only**: agents can only read, inspect, check and render (`etch mcp access read-only`).

The installer is unsigned for now; signing follows. Windows SmartScreen therefore warns the first time. Check
the file first with `gh attestation verify etch-for-altium-setup-<version>.exe --repo xuio/etch-for-altium`,
then choose *More info > Run anyway*. To remove etch, use *Settings > Apps*: this runs `etch uninstall` and
keeps your settings unless you choose to remove them. For unattended installs and other details, see
[docs/DISTRIBUTION.md](docs/DISTRIBUTION.md#windows-installer).

## How it works

- A **plugin** runs inside Altium Designer and accepts authenticated jobs over HTTP.
- All CAD work happens through Altium's own APIs, editors, compilers and output generators, on Altium's
  UI thread.
- A **client** (`etch` and `etch-mcp`, Python) runs on the Altium PC or on another machine.
- Every change is planned against a file hash, applied by Altium, saved and read back.
- Every picture is Altium's own rendering; etch never invents CAD state.
- Keep Altium open and edit as usual: each save exports the document in the background, and **Sync to
  etch** (the **etch status** panel, or the command once added through Altium's Customize dialog) exports
  it right away ([docs/IN-ALTIUM-SYNC.md](docs/IN-ALTIUM-SYNC.md)).
- Export on save is on by default (`server.json` `exportOnSave`, or the **Export on save** checkbox in the
  panel); switched off, a save only marks the document stale.

## How etch differs

Other ways to connect an agent to Altium designs exist; they make different trade-offs.

| | etch | Live-session script bridges | File parsers without Altium | Vendor cloud integrations |
|---|---|---|---|---|
| Needs a licensed Altium on Windows | yes | yes | no | a cloud workspace |
| Who compiles, checks and renders | Altium, in-process | Altium, through scripts run in the open session | the tool's own re-implementation of the file format | the vendor's service |
| Writes | hash-bound plan, applied by Altium, saved and read back | as the script does them | written to files directly, or read-only | depends on the service |
| Pictures of documents | Altium's own renders | varies | the tool's own drawing | varies |
| Works on local files and libraries | yes | yes | yes | designs in the workspace |
| Drive it from macOS/Linux | yes, remote mode over pinned HTTPS | usually same machine | yes | yes |
| Setup | one admin install of a plugin | low, often a script file | none | a workspace account |

etch's cost is that one-time plugin install and a licensed Altium Designer on Windows.

## Remote mode

Run etch on your laptop and let it drive Altium on another Windows PC (the *host*) over HTTPS, with a
pinned certificate, a token, signed requests and a client allowlist; no ssh, remote desktop or file
share. On the host, `etch setup --allow-remote <client address>` prints one connection line; on the
client, `etch setup --connect -` reads it. Project commands upload the project and its libraries, run on
the host and bring the results back. Setup, rotation and revocation: [docs/STANDALONE.md](docs/STANDALONE.md);
security model: [SECURITY.md](SECURITY.md).

## Documentation

| Topic | Doc |
|---|---|
| All commands, staging rules | [docs/CLI-REFERENCE.md](docs/CLI-REFERENCE.md) |
| Library parts, end to end | [docs/LIBRARY-GUIDE.md](docs/LIBRARY-GUIDE.md) |
| 3D model alignment | [docs/MODEL-ALIGNMENT.md](docs/MODEL-ALIGNMENT.md) |
| Saves, status panel, Sync | [docs/IN-ALTIUM-SYNC.md](docs/IN-ALTIUM-SYNC.md) |
| MCP server, clients and skills | [docs/CLIENTS-AND-MCP.md](docs/CLIENTS-AND-MCP.md) |
| Configuration, remote setup | [docs/STANDALONE.md](docs/STANDALONE.md) |
| Architecture and invariants | [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) |
| Managed API (every action) | [docs/MANAGED-API.md](docs/MANAGED-API.md), [docs/CAPABILITY-MATRIX.md](docs/CAPABILITY-MATRIX.md) |
| Library and ECAD data formats | [docs/LIBRARY-IR.md](docs/LIBRARY-IR.md), [docs/ECAD-IR.md](docs/ECAD-IR.md) |
| Reliability | [docs/RELIABILITY.md](docs/RELIABILITY.md) |
| Privacy, logs, file locations | [docs/PRIVACY-AND-LOGS.md](docs/PRIVACY-AND-LOGS.md) |
| Building, contributing, security | [BUILDING.md](BUILDING.md), [CONTRIBUTING.md](CONTRIBUTING.md), [SECURITY.md](SECURITY.md) |
| Changes | [CHANGELOG.md](CHANGELOG.md) |

Questions and ideas: GitHub Discussions. Bugs: an issue with your `etch doctor` output.

## Licence and trademarks

etch is MIT-0 (MIT No Attribution); see [LICENSE](LICENSE). The vendored build-time analyzer under
`vendor/nuget/` keeps its own MIT licence (the `LICENSE-*.txt` file next to it).

Altium and Altium Designer are trademarks of Altium Limited. etch is an independent project; it is not
affiliated with, sponsored by or endorsed by Altium Limited.