Skip to content

Prerequisites

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 Wine and LTspice are in place, use the check_installation tool to confirm everything is working:

check_installation()

This checks for:

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

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