Add 7 new graphical schematic templates (differential amp, buck converter, LDO regulator, H-bridge, common emitter, Colpitts oscillator) and rewrite inverting amp to actually include an op-amp instead of just passive components. Fix UniversalOpamp2 subcircuit error: the .asy symbol defines SpiceModel as "level2", so SYMATTR Value must be omitted to let the built-in model name resolve. Previously emitting SYMATTR Value UniversalOpamp2 caused LTspice to search for a non-existent subcircuit. Fix wire-through-pin routing bugs: vertical wires crossing intermediate opamp/source pins auto-connect at those pins, creating unintended shorts. Rerouted V1-to-In+ paths to avoid crossing In- pins in non-inverting, common-emitter, Colpitts, and differential amp templates. Refactor generate_schematic tool from hardcoded if/elif to registry dispatch via _ASC_TEMPLATES dict, matching the _TEMPLATES pattern for netlists. All 10 templates verified: simulate with zero errors and zero NC nodes. 255 tests pass, source lint clean.
mcp-ltspice
MCP server for LTspice circuit simulation automation on Linux.
Features
- Run Simulations - Execute .asc schematics or .cir netlists in batch mode
- Extract Waveforms - Parse binary .raw files to get voltage/current data
- Modify Schematics - Programmatically edit component values
- Browse Libraries - Access 6500+ symbols and 4000+ example circuits
Requirements
- Linux with Wine installed
- LTspice extracted (see below)
- Python 3.11+
Installation
# From PyPI (once published)
uvx mcp-ltspice
# From source
uv pip install -e .
LTspice Setup
Extract LTspice from the Windows MSI installer:
# Download LTspice64.msi from analog.com
cd /path/to/downloads
7z x LTspice64.msi -oltspice
cd ltspice
7z x disk1.cab
# Set up Wine prefix
export WINEPREFIX=$PWD/.wine
export WINEARCH=win64
wineboot --init
Set the LTSPICE_DIR environment variable or use the default ~/claude/ltspice/extracted/ltspice.
MCP Tools
| Tool | Description |
|---|---|
simulate |
Run simulation on .asc schematic |
simulate_netlist |
Run simulation on .cir netlist |
get_waveform |
Extract signal data from .raw file |
read_schematic |
Parse schematic components and nets |
edit_component |
Modify component values |
list_symbols |
Browse component symbol library |
list_examples |
Browse example circuits |
get_symbol_info |
Get symbol pins and attributes |
check_installation |
Verify LTspice setup |
MCP Resources
ltspice://symbols- All available component symbolsltspice://examples- All example circuitsltspice://status- Installation status
Usage with Claude Code
claude mcp add mcp-ltspice -- uvx mcp-ltspice
Or for local development:
claude mcp add mcp-ltspice -- uv run --directory /path/to/mcp-ltspice mcp-ltspice
License
MIT
Languages
Python
100%