Ryan Malloy b16c20c2ca Fix CE amp coupling cap routing and Colpitts test variable selection
CE amplifier schematic: the input coupling cap CC_in was placed
horizontally (R90) at y=336 — the same y as the RB1-to-base bias
wire. Both cap pins sat on the wire, shorting the cap and allowing
Vin's 0V DC to override the bias divider, putting Q1 in cutoff.

Fix: move CC_in to vertical orientation (R0) above the base wire.
Now pinA=(400,256) and pinB=(400,320) are off the y=336 bias path.
The cap properly blocks DC while passing the 1kHz input signal.
Result: V(out) swings 2.2Vpp (gain ≈ 110) instead of stuck at Vcc.

Colpitts oscillator test: the schematic was actually working (V(out)
pp=2.05V) but the test's fallback variable selection picked V(n001)
(the Vcc rail, constant 12V) instead of V(out). Fix: look for V(out)
first since the schematic labels the collector with "out".

Integration tests: 4/4 pass, unit tests: 360/360 pass.
2026-02-11 06:01:30 -07:00
2026-02-10 23:35:53 -07:00

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 symbols
  • ltspice://examples - All example circuits
  • ltspice://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

Description
MCP server for LTspice circuit simulation automation
Readme MIT 191 MiB
Languages
Python 100%