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.
Install Wine
Section titled “Install Wine”sudo pacman -S winesudo dpkg --add-architecture i386sudo apt updatesudo apt install wine64sudo dnf install wineVerify the installation:
wine --versionExtract LTspice
Section titled “Extract LTspice”LTspice is distributed as a Windows .msi installer. Rather than running it through Wine’s installer, extract the files directly with 7z.
-
Download LTspice
Get
LTspice64.msifrom analog.com/ltspice. -
Extract the MSI
Terminal window 7z x LTspice64.msi -oltspicecd ltspice7z x disk1.cab -
Initialize a Wine prefix
Terminal window export WINEPREFIX=$PWD/.wineexport WINEARCH=win64wineboot --initThis creates a minimal Wine prefix in the same directory. LTspice does not need a full Windows environment --- the prefix just provides the runtime.
Set the LTspice directory
Section titled “Set the LTspice directory”mcltspice looks for LTspice in this order:
- The
LTSPICE_DIRenvironment variable - The default path:
~/claude/ltspice/extracted/ltspice
If your extracted files are elsewhere, set the environment variable:
export LTSPICE_DIR=/path/to/your/extracted/ltspiceFor persistent configuration, add it to your shell profile (~/.bashrc, ~/.zshrc, etc.) or pass it through your MCP client configuration.
Verify the setup
Section titled “Verify the setup”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.