ltspice-mcp

MCP server that runs circuits in LTspice and ngspice: sweeps, Monte Carlo, .asc schematic edits, results come back as numbers

  • 71 ★ on the repository
  • Last commit
  • GPL-3.0
MCP server

Broad access

Why this level

  • The run_code tool executes Python with the server's permissions and ignores the allowed-paths list
  • Without a sandbox every tool reads and writes files at any path, and schematic edits change .asc files on disk
All reasons and checks

cognitohazard/ltspice-mcp

Install

Manual install

/plugin marketplace add cognitohazard/ltspice-mcp

Then /plugin install ltspice-mcp. The plugin needs uv.

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • The run_code tool executes Python with the server's permissions and ignores the allowed-paths list
  • Without a sandbox every tool reads and writes files at any path, and schematic edits change .asc files on disk

This is third-party code. Review the repository files before installing.

What it does

ltspice-mcp connects an AI assistant to SPICE simulators. The server exposes eight tools: run a circuit or a series of runs with measurements, manage background jobs, analyze results, read schematics and models, edit .asc schematics, verify a circuit, draw an interactive chart and run Python on top of the server's own API. LTspice is the primary simulator, ngspice works without it, and QSPICE and Xyce are available for netlists. The assistant receives results as named numbers such as a phase margin, so it does not have to read waveforms by hand. Parameter sweeps, corners and Monte Carlo take one call and run as background jobs that survive a restart and can be replayed. Before writing a file the server checks for common SPICE mistakes, while the placement of parts on a schematic is left to the assistant, with no auto-router. On Windows with LTspice 26.1 or later, a person and the assistant can edit the same open schematic. Everything the tools do is also available from Python through the ltspice_mcp.api package, for optimizers, curve fits and CI checks.

Who it is for. For electronics engineers and hobbyists who design analog circuits in LTspice or ngspice and want an agent to handle runs, measurements and schematic edits.

Good fit when

  • You need the gain and transistor operating region at slow and fast process corners without hand-run simulations
  • An LDO schematic is measured for overshoot, settling time and phase margin under a load step
  • A 500-run Monte Carlo with 1% resistors shows the share of circuits that keep the output offset within limits
  • You pick a MOSFET from the LTspice library for a 12 V, 5 A switch and compare conduction loss
  • A filter is open in LTspice, the output does not move, and the assistant finds the cause and fixes the schematic

Not a fit when

  • You are on macOS, where the server cannot read simulation results
  • You need a PCB and routing: the server covers schematics and simulation, KiCad MCP Pro handles boards
  • Your circuits are digital or FPGA: the tool is aimed at SPICE simulation of analog circuits
  • Several people share the server: the run_code tool executes Python with the server's own permissions

Example request

Run a 200-sample Monte Carlo on this amplifier with 1% resistors and tell me what fraction keep the output offset under 1 mV

MCP

Transport
stdio
Authentication
not required

Limitations

  • The author marks the project as a work in progress, so versions may break compatibility.
  • macOS is not supported: the server reads .raw and .log files in a separate process with a memory limit, which has not been validated on macOS.
  • Editing .asc schematics needs LTspice because the server uses its symbol libraries. Reading and checking netlists works without a simulator.
  • Python 3.11 or newer is required. The plugin and the Claude Desktop extension need uv.
  • Without a sandbox the tools can use any path. The allowed_paths setting limits folders but does not apply to run_code.
  • The license is GPL-3.0.

How to disable. In Claude Code the plugin is removed with /plugin uninstall ltspice-mcp, and in other clients the spice entry is deleted from the MCP config. If the package was installed through uv, uv tool uninstall ltspice-mcp removes it. The .ltspice-mcp folder with job records can be deleted by hand.

FAQ

How do I connect ltspice-mcp to Claude Code?

In Claude Code the plugin takes two commands: /plugin marketplace add cognitohazard/ltspice-mcp and /plugin install ltspice-mcp. You need uv and an installed LTspice or ngspice.

Does the server work without LTspice?

Yes, ngspice is enough for simulation and analysis. LTspice is required only for editing .asc schematics because the server uses its symbol libraries.

How is it different from the MCP server built into LTspice?

The server built into LTspice 26.1 drives the program window and returns raw samples and logs. This one returns measured values and runs sweeps and Monte Carlo in the background. Both can run side by side.

Can the server run on another machine?

Yes, docs/USAGE.md has a section on running the server on another machine. The simulator has to be installed there, and access should be restricted because run_code executes code with the server's permissions.

Where does the server keep run results?

In a .ltspice-mcp folder inside the working directory, which holds job records and results. The README advises adding it to .gitignore.

Discussion

No questions or reviews yet.

Command-line inspector for HTTP MCP servers: lists tools, schemas, prompts and resources and calls any tool by hand.

CLIExtended access134Repository stars

MCP server for CODESYS V3.5: Claude reads and edits Structured Text, compiles with the real compiler and runs the simulation.

MCP serverBroad access131Repository stars

The openmcp CLI and a VS Code extension for debugging MCP servers: tools, prompts and resources, chat with a model, test cases

CLIExtended access750Repository stars

An MCP to LSP bridge: the agent gets types, references, diagnostics and refactoring from rust-analyzer, pyright and gopls.

MCP serverExtended access81Repository stars

cclsp connects LSP language servers to Claude Code over MCP: go to definition, find references, rename symbols and diagnostics with no editor needed

MCP serverExtended access675Repository stars

MCP server for ITASCA geomechanics: an agent searches PFC, FLAC, 3DEC, MPoint and MassFlow docs and runs simulations

MCP serverBroad access228Repository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
ltspice-mcp (this card)nonot required71
KiCad MCP Prononot required212PCB design in KiCad, does not run SPICE simulation
EasyEDA API Skillyes1,104works with EasyEDA projects through its API and runs no simulations

README in short

The repository opens with a paragraph on goals: speed, correctness, token economy and clean schematics. Next come a quick start for Claude Code, Claude Desktop, Cursor, Codex and other clients, example prompts, a table of supported simulators and the list of eight tools. It ends with sections on configuration and the sandbox and a description of the Python API with a sweep example.

README badge

Report a problem