Skip to content

Prerequisites

mcltspice drives LTspice in batch mode. How you set it up depends on your platform: on Linux it runs LTspice through Wine (fully headless), and on macOS it drives the native LTspice.app directly (no Wine).

mcltspice drives LTspice through Wine in headless batch mode. You need two things: a working Wine installation and the LTspice application files extracted from the Windows installer.

Terminal window
sudo pacman -S wine

Verify the installation:

Terminal window
wine --version

LTspice is distributed as a Windows .msi installer. Rather than running it through Wine’s installer, extract the files directly with 7z.

  1. Download LTspice

    Get LTspice64.msi from analog.com/ltspice.

  2. Extract the MSI

    Terminal window
    7z x LTspice64.msi -oltspice
    cd ltspice
    7z x disk1.cab
  3. Initialize a Wine prefix

    Terminal window
    export WINEPREFIX=$PWD/.wine
    export WINEARCH=win64
    wineboot --init

    This creates a minimal Wine prefix in the same directory. LTspice does not need a full Windows environment --- the prefix just provides the runtime.

mcltspice looks for LTspice in this order:

  1. The LTSPICE_DIR environment variable
  2. The default path: ~/claude/ltspice/extracted/ltspice

If your extracted files are elsewhere, set the environment variable:

Terminal window
export LTSPICE_DIR=/path/to/your/extracted/ltspice

For persistent configuration, add it to your shell profile (~/.bashrc, ~/.zshrc, etc.) or pass it through your MCP client configuration.

Once LTspice is in place, use the check_installation tool to confirm everything is working:

check_installation()

The report is the single source of truth for whether the box is usable, and its contents differ by platform.

On Linux it checks for:

  • Wine availability and version
  • LTspice binary presence
  • Library and symbol directories
  • Write permissions for output files

On macOS it reports:

  • The platform
  • The resolved native binary path (from LTSPICE_BIN or the default)
  • The resolved library root (~/Library/Application Support/LTspice/)
  • The detected LTspice version
  • GUI-session availability (whether an active login session is present to run batch jobs)

If any check fails, the tool reports exactly what is missing and how to fix it.