Skip to main content
Glama
README.md
# ltspice-mcp-addon

An add-on to [ltspice-mcp](https://github.com/cognitohazard/ltspice-mcp).
It is a second MCP server that runs beside ltspice-mcp and adds what
ltspice-mcp and LTspice's own MCP bridge do not offer. It does not replace
or patch ltspice-mcp: simulation, schematic editing and waveform reading
stay there.

| Tool | What it adds |
|---|---|
| `check_deck` | Before a run: LTspice 26 behaviours that ltspice-mcp's lint does not catch, each recorded on LTspice 26.1. Errors LTspice stops on (a `.step` that makes one step; a `.meas` WHEN/TRIG/TARG given FROM or TO) and warnings where it runs but gives another number than meant (`db()` of a complex value in an AC `.meas`; MAX/MIN/PP/AVG of a signed AC expression; two `.step` lines beside `.op`). |
| `review_job` | After a run: what a batch's LTspice logs say together. Runs that wrote results although their log has an `ERROR:` line (a floating node), and `.meas` that failed in every run or in some. |
| `knowhow` | Offline circuit know-how: ASC / CIR / Schemdraw conversion, node-name-invariant topology comparison, `.measure` log summaries, operation reading of a netlist, solver-neutral review gates, design seeds, SPICE simulator theory. `op="list"` names every op. |

## Install

Not on PyPI. Install from a checkout; ltspice-mcp comes in as a dependency.

```bash
python -m pip install -e ".[schemdraw]"
```

## Use with an MCP client

Register both servers:

```json
{
  "mcpServers": {
    "ltspice": { "command": "ltspice-mcp" },
    "ltspice-addon": { "command": "ltspice-mcp-addon" }
  }
}
```

`--allowed-path DIR` (repeatable) or `LTSPICE_MCP_ADDON_ALLOWED_PATHS`
limits the folders the add-on's tools read. Without either there is no
sandbox, as with ltspice-mcp's default.

A typical round: `check_deck` on the deck, `run_experiments` in
ltspice-mcp, then `review_job` on the job's output folder.

## Develop

```bash
python -m pip install -e ".[test]"
python -m pytest
```

`tests/` holds the add-on's own tests; `check_deck` and `review_job` are
tested on decks and logs recorded on LTspice 26.1.1 (`tests/fixtures/lt26`).
`knowhow/tests` is the know-how package's suite.

## Scope

- Only what ltspice-mcp and LTspice's own bridge lack. A tool that either
  of them gains is dropped here.
- Only the latest LTspice.
- Fixes to ltspice-mcp itself go to ltspice-mcp as pull requests, not here.

## Licence

GPL-3.0-or-later (it builds on ltspice-mcp). The know-how package
`src/ltspice_knowhow/` is also available under the MIT licence in
`src/ltspice_knowhow/LICENSE-MIT`.

TDQS

A3.6/5.0

Scored across 3 tools

Disambiguation3/5

check_deck (pre-run deck validation) and review_job (post-run log review) have clear, distinct phases, but knowhow is a catch-all whose advertised scope includes lint/info, netlist reading, review gates, and handoff packets — overlapping both other tools. The descriptions do disambiguate (check_deck explicitly covers what ltspice-mcp's lint misses; review_job covers cross-run patterns only), but agents must read carefully to avoid routing a review or lint task into knowhow instead.

Naming Consistency3/5

check_deck and review_job follow a clean verb_noun pattern, but knowhow is a vague bare noun that breaks the convention and gives no hint of its verb or resource. Mixed but still readable; two of three names are predictable.

Tool Count3/5

Three tools is thin for a surface that must cover deck checking, log review, and a very broad know-how domain. Effectively, knowhow bundles dozens of operations (op='list' required for discovery) behind one entry point, which makes the nominal count of 3 misleading.

Completeness4/5

As an add-on that deliberately delegates simulation runs to ltspice-mcp, it covers the sensible pre-run (check_deck), post-run (review_job), and knowledge/analysis (knowhow) phases. The main gap is discoverability: what knowhow actually offers is opaque until op='list' is called, so agents can't assess coverage from the tool list alone.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues