ltspice-mcp
This server provides an end-to-end SPICE/LTspice workflow: create and edit circuits, run simulations and batch analyses, and extract detailed measurements from results.
Configure and run parameter sweeps and Monte Carlo analyses, including component tolerances, model/parameter variation, Pelgrom mismatch, seeds, and parallel execution.
Run single simulations synchronously or asynchronously; check, list, or cancel jobs; inspect server status and recent circuits.
Analyze
.raw/.logresults: signal statistics, point queries, operating points, simulation summaries,.MEASaggregation, edge/pulse/timing/periodic metrics, stability margins, Bode/filter metrics, and resonance/Q.Create, read, validate, diff, and export netlists and
.ascschematics.Edit schematics: add/move/remove components, set values and attributes, add labels, connect pins, add directives/comments, apply batched operations, and reset to a pre-session snapshot.
Generate schematics from netlists, trace nets, inspect symbols/components, and detect shorts, floating pins, and dangling labels.
Discover and manage SPICE libraries and models, including fuzzy model search and library loading/unloading.
Provides tools for circuit simulation, schematic editing, and analysis using LTspice, including transient, AC, DC, Monte Carlo, and parameter sweep analyses with structured numeric results.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ltspice-mcp Check the phase margin of this op-amp circuit."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ltspice-mcp
Work in progress. Expect breaking changes across versions.
ltspice-mcp is an MCP server that lets an AI assistant simulate circuits with LTspice or ngspice and edit LTspice schematics. Its goals are speed, correctness, token efficiency and clean schematics.
The assistant uses ready-made, well-tested tools, which know the quirks of SPICE and of each simulator, instead of improvised scripts.
Mechanical checks catch common errors before a file is written or run, and direct the assistant's attention to the right place. Layout is left to the assistant's judgment, not an auto-router.
Results come back as named numbers, such as a phase margin, instead of waveforms to read. To see a waveform yourself, ask for an interactive chart, shown in the chat where the client supports it.
Sweeps, corners and Monte Carlo take one call and run as background jobs that survive a restart and can be replayed.
With LTspice 26.1 or later on Windows, you and the assistant can edit the same open schematic (Working with LTspice open).
Everything the tools do is also available from Python, as the
ltspice_mcp.api package. The server is built on
spicelib.
Quick start
Claude Code:
/plugin marketplace add cognitohazard/ltspice-mcp
/plugin install ltspice-mcpClaude Desktop: build the extension in packaging/mcpb/
and drag the .mcpb file onto Claude Desktop. The extension asks for an
optional sandbox folder. If you leave it blank, there is no sandbox.
Cursor, Codex and other MCP clients (Windsurf, Gemini CLI, Continue, Cline, Zed, …): install the server and add it to the client's MCP config.
uv tool install ltspice-mcp # or: pipx install ltspice-mcp{
"mcpServers": {
"spice": { "command": "ltspice-mcp", "args": [] }
}
}Cursor reads this JSON from .cursor/mcp.json
in the project, or from ~/.cursor/mcp.json for every project.
Codex reads TOML from
~/.codex/config.toml:
[mcp_servers.spice]
command = "ltspice-mcp"
tool_timeout_sec = 660Codex stops a tool call after 300 s by default; run_code can run for 600 s.
The server needs Python 3.11 or newer. If a client cannot find ltspice-mcp,
set command to its full path (on Windows, the ltspice-mcp.exe in the
folder uv tool dir --bin prints). In Claude Code,
claude mcp add -s project spice -- ltspice-mcp adds it without editing the
JSON.
You also need LTspice or ngspice on the same machine. The server finds
either one on Windows and Linux. On WSL, set the LTspice path yourself
(WSL).
Editing .asc schematics needs LTspice, because the server uses LTspice's
symbol libraries. Reading and checking netlists works without a simulator.
The plugin and the extension need uv.
macOS is not supported yet: the server cannot read simulation results
there. It reads each .raw and .log file in a separate process with a
memory limit, which has not been validated on macOS.
Make sure the assistant uses the server. Some assistants run the
simulator from the shell instead. Name the server spice, as the plugin
does, and not ltspice, which is the name LTspice's own MCP server takes.
Then add this rule to your project's CLAUDE.md or your client's equivalent:
Always use the spice MCP server for any SPICE/circuit simulation, sweep, or analysis. Do not invoke ngspice or LTspice from the shell, and do not hand-parse
.rawfiles orwrdataoutput.
If you prefer a less strict rule, When the shell is fine lists the cases in which running the simulator from the shell is acceptable.
LTspice's own MCP server. LTspice 26.1 and later include an MCP server,
which registers as ltspice and can run beside this one. It drives the
LTspice window and returns raw samples and logs, leaving measurements and
Monte Carlo setup to the assistant. This server does not need it. Alongside
LTspice's own MCP server
describes an LTspice setting you may want to change.
Related MCP server: ltspice-mcp
Examples
"Bias this common-source amplifier at 100 µA. What's its gain, and does the transistor stay in saturation at the slow and fast corners?"
"Here's my LDO schematic. What are the overshoot and settling time for a 1 mA to 100 mA load step, and how much phase margin does it have at full load?"
"Run 500 Monte Carlo samples with 1% resistors and mismatch in the input pair, and tell me what fraction keep the output offset under 1 mV."
"Find an N-channel MOSFET in the LTspice library for a 12 V, 5 A low-side switch, and compare the conduction loss of the three best candidates."
"I have my filter open in LTspice and the output doesn't move. Find out why, fix it, and show me V(out)."
Supported simulators
Simulator | Status |
LTspice | Primary. Windows, WSL2 (runs the Windows LTspice), Linux via Wine. Required for |
ngspice | Simulation and analysis. Does not need LTspice. |
QSPICE, Xyce | Secondary, selected per run. Netlists only, not |
Tools
The server has 8 tools:
Tool | What it does |
| Run a circuit, or a sweep or Monte Carlo set of runs, optionally measuring each |
| Check on, wait for, cancel, or list submitted runs |
| Measure finished runs, or a |
| Read circuits, schematics, symbols, nets, models, and server capabilities |
| Create and edit |
| Check a circuit, compare a schematic with a netlist, draw a schematic |
| Interactive waveform chart, in the chat where the client supports it, otherwise in a browser |
| Run a Python snippet that calls the server's Python API, for loops and calculations |
The assistant reads how to use them from inspect(kind="guide"), which
covers the simulators and common tasks, and looks up any option with
inspect(kind="reference").
Configuration
The server runs without configuration. To change a setting, copy
ltspice-mcp.example.toml to ltspice-mcp.toml
in your working directory. That file describes every option. Any of them
can also be set with an LTSPICE_MCP_ environment variable. The server keeps job
records and results in .ltspice-mcp/ in the working directory; add that
folder to .gitignore.
The tools can use any path unless you set a sandbox.
[security] allowed_paths limits them to the folders it lists; a relative
entry, such as ".", is a folder in the working directory. It does not
limit run_code, which runs Python with the server's own permissions, so
approve run_code in your client as you would a shell command. If anyone
else can reach the server, set [tools] run_code = false.
docs/USAGE.md covers the common settings, WSL, the files the server creates, and running the server on another machine.
Python API
Scripts and notebooks can do what the tools do by importing ltspice_mcp.api. Use it
for optimizers, curve fits, CI checks, or any loop where each run depends on
the last. The API returns complete results and numpy arrays, where the tools
return pages. Scripts and the server share the job records in the working
directory, so each can read a job the other ran.
pip install ltspice-mcp # or: uv add ltspice-mcpA script needs this install even if you use the plugin or the Desktop
extension, which keep the server in an environment of their own. An
assistant in a session does not need it, because it can use the API through
run_code.
With an RC low-pass in circuits/rc.cir:
* RC low-pass
V1 in 0 AC 1
R1 in out 1k
C1 out 0 159.155n
.ac dec 50 1 1Meg
.endthis sweeps R1 and returns the lowest and highest cutoff frequency:
from ltspice_mcp.api import Api
with Api(working_dir="circuits") as api:
result = api.run_experiments(
circuits=[{"path": "rc.cir"}],
variations=[{"kind": "assign", "assign": {"R1": ["1k", "2k", "4k"]}}],
analyze={"recipes": [
{"key": "fc", "metric": "bode_filter", "signal": "V(out)",
"field": "cutoff_high_hz", "reduce": ["min", "max"]},
]},
)
print(result["analysis"]["result"]["results"]["fc"]["reduced"])api.reference() lists the operations and api.guide() returns the guide.
Python API explains how the API differs from the
tools. The full specification is in docs/design/python_api.md.
Research behind the design
Published studies by other groups informed three design choices:
Measurements are returned as named numbers. A study of LLM workflows for switched-mode power supply design (arXiv:2507.10639, first published as SPICEAssistant) found that GPT-4o could not reliably read a ripple value from a waveform given as numbers or as an image, so its tools extract such values from each LTspice run and return them as text. With that simulation feedback, o3 solved 84.9% of 269 power-supply design tasks, against 25.4% with no simulation. The study compared simulation feedback with none, not named numbers with raw output.
Schematic edits are typed and checked. NetlistBench (arXiv:2608.12197) found that the strongest model's accuracy on netlist edits with dependent steps fell from 80% at 3 steps to 26% at 15. The study measured unassisted edits to text netlists.
edit_schematic, which checks each typed operation before it writes the file, was designed in response; its effect has not been measured.The tool interface is typed. A benchmark of agents that take chip designs from RTL to GDS (arXiv:2607.17528) traced 31.7% of physical-design errors to failures at the tool interface. That work is in a different domain, so it does not show the same effect in circuit simulation. The server follows the benchmark's recommendations: registered APIs, persistent sessions and structured results.
Development
uv sync # install runtime + dev dependencies
uv run pytest tests/ -v # tests
uv run pyright # type checking
uv run ruff check src/ tests/ # lint
uv run ltspice-mcp # run the server (stdio)To release, run scripts/release.sh <version> and push the tag it creates.
The script renders the fragments in changelog.d/ into CHANGELOG.md,
stamps the version into the plugin and Desktop-extension manifests, and
tags the commit. The pushed tag publishes to PyPI.
Contributing
docs/DESIGN.md: the architecture
docs/design/: specifications of the MCP tools and the Python API
docs/TESTING.md: testing practice
THIRD_PARTY_NOTICES.md: vendored components
The project does not take outside contributions yet. Bug reports with a reproduction are welcome as issues.
License
GPL-3.0-or-later
Available Tools
48 toolsadd_componentB
Add a new component to an .asc schematic at a specified grid position.
Inputs: path (required), reference (required), symbol (required), x (required), +5 more. Returns: reference, symbol, position, rotation, +4 more
add_net_labelBIdempotent
Add a net label or ground flag to an .asc schematic at a wire junction.
Inputs: path (required), net (required), x, y, +2 more.
apply_schematic_opsA
Apply many .asc edits in one transaction. Loads the schematic once, runs each op against the in-memory editor in order, and saves once at the end. Cuts the typical 25+ tool calls to build a real circuit (add_component × N + connect × N + add_net_label × N + edit_directive × N) down to a single round-trip.
Supported ops (each tagged via the op field): add_component, set_component_value, set_component_attribute, remove_component, move_component, add_net_label, connect, add_directive.
By default, the first op that raises aborts the whole transaction and nothing is written to disk. Set stop_on_error=false to run every op and persist whatever subset succeeded — useful when each op is independent and partial progress is acceptable. Errors are recorded under each op's error field; successes carry the per-op result keys (e.g. wire_count).
Inputs: path (required), ops (required), stop_on_error. Returns: path, applied_count, failed_count, saved, +2 more
batch_resultsARead-onlyIdempotent
Query a batch simulation job (sweep or Monte Carlo). Without signal: returns job status and progress. With signal: returns aggregate statistics or per-run data for that signal.
Inputs: job_id (required), signal, filters, at, +4 more. Returns: job_id, job_type, status, netlist, +12 more
bode_metricsARead-onlyIdempotent
AC / Bode-plot analysis in one tool, selected by mode. The response shape depends on the mode:
mode='filter' — filter type, cutoffs (at ref_db below passband), passband gain/ripple, stopband rejection, transition BW, pole-order.
mode='slope' — magnitude slope (dB/decade + dB/octave) between f_low and f_high; pick endpoints ≥1 decade past any knee.
mode='point' — magnitude (dB + linear) and phase at each of frequencies (log-axis interpolation; out-of-range clamps + warns).
mode='crossing' — every frequency where quantity crosses level (phase is UNWRAPPED first); the escape hatch for custom queries like unity-gain (0 dB) or phase-margin (-180°) frequencies.
Pass all_steps=true to compute the chosen mode for every step of a .step sweep in one call (returns a steps list instead of a single result) — e.g. the -3 dB cutoff at every value of a stepped component.
To analyze a run of a completed sweep/MC job, pass job_id + run_index instead of raw_file (combine with all_steps to also sweep the .step axis within that run).
For loop-gain stability margins use stability_metrics; for resonant peaks & Q use resonance.
Inputs: signal (required), mode (required), raw_file, job_id, +19 more. Returns: filter_type, passband_gain_db, passband_low_hz, passband_high_hz, +29 more
cancel_jobADestructiveIdempotent
Cancel a running simulation job (single run, or a sweep/Monte-Carlo batch). Kills the simulator process(es) and marks the job as cancelled.
Inputs: job_id (required).
check_jobARead-onlyIdempotent
Check status of a simulation job by ID, or list all jobs. Without job_id: lists active jobs (filter with status param). With job_id: returns detailed status or completion results.
Inputs: job_id, status, format. Returns: job_id, status, netlist, simulator, +23 more
component_infoARead-onlyIdempotent
Get a placed component's pin positions, bounding box, value, and attributes from an .asc schematic.
Inputs: path (required), reference (required), format. Returns: reference, symbol, position, rotation, +4 more
configure_montecarloAIdempotent
Configure a Monte Carlo analysis with component tolerances and return a config_id for later execution.
Inputs: netlist (required), tolerances, model_tolerances, mismatch, +3 more.
configure_sweepAIdempotent
Configure a multi-parameter sweep for a netlist and return a config_id for later execution.
Inputs: netlist (required), parameters (required).
connectA
Connect two component pins with wire(s). Resolves pin positions automatically. Waypoints define the wire route through intermediate points. For a straight horizontal or vertical connection, waypoints can be omitted.
Inputs: path (required), from_pin (required), to_pin (required), waypoints. Returns: from, to, wire_count, points, +2 more
create_netlistADestructive
Create a new SPICE netlist file from content string. Automatically appends .END if missing.
Inputs: name (required), content (required), overwrite.
create_schematicADestructive
Create an empty .asc schematic ready for incremental editing via add_component / connect / add_net_label. Tip: prefer create_netlist + .cir for design iteration; use this only when a visual schematic is the deliverable.
Inputs: name (required), width, height, overwrite.
diff_circuitARead-onlyIdempotent
Structural diff between two circuit files: reports added/removed components, components whose value or attributes (Value2/SpiceLine/SpiceModel) changed, and added/removed .PARAM/.MEAS/.MODEL directives. Use after set_component_value, set_component_attribute or edit_directive to confirm that the intended change actually landed.
Inputs: path_a (required), path_b (required), format.
edge_metricsARead-onlyIdempotent
Use when you need to quantify HOW FAST one transition happened: rise time, fall time, slew rate. Inputs a transient .raw plus a time window around the edge of interest.
Returns: transition_time (10→90% by default, configurable via low_pct/high_pct), slew_rate (V/s or A/s), detected low/high levels, and the three crossing times.
Levels are auto-estimated from the first/last 10% of the window — NOT global min/max — so overshoot/undershoot doesn't poison the level estimate. Crossings are sub-sample-accurate via linear interpolation. Rejects AC analysis.
PICK THE WINDOW. If the transient has startup glitches or multiple edges, set t_start/t_end tightly around the edge you care about — otherwise you get the first edge in the full waveform, which is often the power-up artifact. Use edge_index only when multiple edges in the window are intentional.
For settling/overshoot after the edge, use pulse_response. For delay between two signals' edges, use timing_between.
Inputs: raw_file (required), signal (required), step, t_start, +8 more. Returns: transition_time, slew_rate, low_level, high_level, +10 more
edit_directiveA
Add or remove a SPICE directive or .asc free-text comment. Set kind=comment for annotation text; default is a SPICE directive. Works on .cir/.net and .asc; kind=comment is .asc-only. remove matches against directives AND comments, so callers can delete either kind without knowing which it is.
Inputs: path (required), action (required), instruction (required), kind, +3 more.
export_netlistADestructiveIdempotent
Export an .asc schematic to a SPICE netlist (.net) using LTspice.
Inputs: path (required).
find_modelARead-onlyIdempotent
Find model/subcircuit candidates across loaded (and optionally built-in) libraries. Default is fuzzy matching — finds typos, case variants, and near-neighbour part numbers (e.g., '2N3905' → '2N3904'); pass exact=true to only return the exact case-insensitive match. Returns ranked candidates with similarity score and ready-to-paste .include directive. Each candidate carries ports (the .SUBCKT port list, empty for .MODEL) and params (default parameter values from the body / params: clause).
Inputs: name (required), exact, limit, cutoff, +3 more. Returns: query, results, include_builtin, exact, +1 more
list_componentsARead-onlyIdempotent
List components in a circuit file, optionally filtered by type prefix, or return a single component value by reference.
Inputs: path (required), prefix, reference, offset, +2 more. Returns: components, pagination
list_librariesARead-onlyIdempotent
List loaded libraries. With detail=true, also shows the .SUBCKT and .MODEL names defined in each library (so foundry .bjt/.mod files with hundreds of .MODEL cards are discoverable without guessing).
Inputs: detail, path, offset, limit, +1 more. Returns: libraries, pagination
load_libraryA
Load a SPICE library file (.lib, .mod) or directory of library files into the session.
Inputs: path (required).
measurement_statsARead-onlyIdempotent
Use to AGGREGATE .MEAS scalar results across a .step sweep or Monte Carlo run. Answers questions like 'across 100 MC trials, what's the worst-case rise time?' or 'how does gain vary as R sweeps 1k..10k?'. Inputs the .log file produced by the run.
Returns per-measurement: min, max, mean, median, std, p10, p90, best_step_index (argmin) and worst_step_index (argmax), failure count, and an optional histogram (set histogram_bins=0 to skip).
Accepts any job id: a sweep/MC batch aggregates across its runs; a single-simulation job aggregates its own log (one value per step for a .step run). Axis choice differs by shape: a batch detects WHEN-style .MEAS (constant level, varying crossing) and swaps to aggregating the 'at' field; a stepped single-run log always aggregates the 'value' field. The aggregated_field output says which was used. On a plain single run there's only one value per measurement, so stats collapse to n=1 — use simulation_summary instead to just read the scalars.
Works with .MEAS from any analysis type (.tran/.ac/.dc/.op) — the measurement directives themselves embed the analysis context. Pass measurement=NAME to aggregate just one; otherwise returns all .MEAS in the log.
Inputs: log_file, job_id, measurement, histogram_bins, +1 more. Returns: stats
move_componentA
Move and/or rotate a component in an .asc schematic. Warns if the new position overlaps another component's bounding box, and lists wire endpoints orphaned by the move (the component's old pin coordinates are no longer connected to anything).
Inputs: path (required), reference (required), x (required), y (required), +1 more.
operating_pointBRead-onlyIdempotent
Read DC operating point data showing all node voltages and branch currents.
Inputs: raw_file (required), step, format. Returns: step, step_count, voltages, currents
parameterBIdempotent
Read or write .PARAM directive values in a circuit file.
Inputs: path (required), name, value, format. Returns: parameters
periodic_metricsARead-onlyIdempotent
Use for an oscillating transient signal (clock, oscillator output, switching waveform) when you need period, frequency, duty cycle, pulse widths, and period-to-period jitter.
Returns: period (mean across measured periods), frequency (1/period), jitter_rms (std-dev of period lengths — timing jitter, NOT signal amplitude variance), duty_cycle_pct, mean high/low pulse widths, edge counts. duty_cycle_pct / pulse_widths are null if no full periods could be paired.
Uses threshold crossings; threshold defaults to the midpoint of window min/max. For a signal with DC drift, set an explicit threshold — the auto midpoint moves with the drift and the edge detection gets unstable. min_periods guards against accidentally running on 1-edge windows.
Skip the startup transient via t_start/t_end; the first cycle is often wider than steady state. Rejects AC analysis. For a single edge (not periodic), use edge_metrics.
Inputs: raw_file (required), signal (required), step, t_start, +4 more. Returns: period, frequency, jitter_rms, duty_cycle_pct, +8 more
pulse_responseARead-onlyIdempotent
Use when you need step-response quality metrics: overshoot %, undershoot %, settling time, peak value and peak time. Inputs a transient .raw covering ONE step transition — ideally with the stimulus edge near t_start and enough tail to see settling.
Returns: direction (rising/falling), initial/steady-state values, peak (absolute and pct), settling_time (to within settling_tolerance_pct band; null if never settled in window).
Definitions: overshoot is excursion BEYOND final in the step direction; undershoot is excursion beyond initial opposite the step direction. overshoot_pct = 0 means MEASURED overdamped, not missing data. settling_tolerance_pct defaults to 2% of |final - initial|; 1% and 5% are also common.
If the auto-detected initial/final (mean of first/last 10% of window) is contaminated by ringing, pass explicit initial_value/final_value. Rejects AC analysis.
For just rise/fall time without overshoot, use edge_metrics.
Inputs: raw_file (required), signal (required), step, t_start, +5 more. Returns: direction, initial_value, steady_state_value, peak_value, +8 more
query_valueARead-onlyIdempotent
Look up the value of a signal at a specific time point (transient) or frequency (AC). Returns the nearest data point without interpolation.
To pick a step of a .step/.DC sweep by its axis VALUE (rather than a raw step index), pass step_axis + step_value (e.g. step_axis='temp', step_value='27'); at then selects the inner-axis point within that step (optional). AC samples also return magnitude_linear alongside magnitude_db/phase_deg.
To query a run of a completed sweep/MC job, pass job_id + run_index instead of raw_file — the run is analyzed like any standalone raw.
Inputs: signal (required), raw_file, job_id, run_index, +5 more. Returns: signal, requested_x, actual_x, value, +11 more
read_circuitARead-onlyIdempotent
Read and parse a circuit file (.cir/.net or .asc). For netlists: returns content and component values. For schematics: returns layout and directives.
Inputs: path (required), format. Returns: file, type, components, content, +3 more
recentARead-onlyIdempotent
Call on session start to find circuits the user was last working with, including jobs that were still running when the server stopped. Needs no inputs.
Returns a list of recent circuits, each with its absolute path, whether the file still exists, last-touched timestamp, total persisted job count, status_counts (completed/failed/interrupted/etc.), and the IDs of any interrupted jobs.
'interrupted' means a simulation was in flight when the server stopped — recovery path is check_job(job_id) to see whether results are recoverable or the run needs to be re-kicked. Does NOT start or cancel anything; purely read-only.
Inputs: format. Returns: circuits, count
remove_componentADestructive
Remove a component from an .asc schematic by reference designator.
Inputs: path (required), reference (required), cleanup_wires.
reset_schematicADestructiveIdempotent
Revert an .asc schematic to the state it had BEFORE the first edit this session — a recovery escape hatch for when a sequence of edits went wrong. The server snapshots each .asc file's bytes just before its first in-session mutation (add_component, set_component_value, move_component, connect, apply_schematic_ops, etc.); this restores that snapshot exactly and drops it (so a later edit establishes a fresh restore point). Because add_component is a trigger, the first add_component on a freshly created schematic snapshots the empty file — so reset can revert all the way back to the empty post-create state, dropping every component added this session. Returns reverted=false (not an error) when the file has no recorded in-session edits. Note: the snapshot lives only for the current server session — it does not persist across restarts, and it is not a substitute for version control.
Inputs: path (required), format. Returns: path, reverted, bytes
resonanceARead-onlyIdempotent
Detect magnitude peaks in an AC sweep and estimate Q factor + -3 dB bandwidth for each. Useful for RLC resonators, crystal oscillators, peaking amps, or any response with distinct resonant modes.
Q = f_peak / Δf(-3 dB from peak). Q is returned as null for peaks without two flanking -3 dB crossings inside the swept range — widen the sweep if you need Q for a boundary peak.
min_prominence_db=3 rejects the gentle hump of a filter's passband (which isn't a resonance). Tight resonances (Q > 30) need dense sampling near f_peak — log sweeps with <50 pts/decade will under-sample the peak and give inflated Q/bandwidth.
For overall filter characterization use bode_metrics(mode='filter'); for stability margins use stability_metrics.
Inputs: raw_file (required), signal (required), min_prominence_db, min_separation_decades, +3 more. Returns: peaks, num_peaks_detected, warnings, signal
run_montecarloA
Execute a previously configured Monte Carlo analysis asynchronously and return a job_id immediately.
Inputs: config_id (required), max_parallel.
run_simulationA
Run a SPICE simulation on a netlist file. Automatically runs synchronously for short simulations (<=30s timeout) or asynchronously for longer ones. Use wait=true to force synchronous execution. Returns raw/log file paths and simulation summary on completion, or a job ID for async tracking.
Inputs: netlist (required), timeout, wait, format. Returns: job_id, status, netlist, simulator, +16 more
run_sweepA
Execute a previously configured parameter sweep asynchronously and return a job_id immediately.
Inputs: config_id (required), max_parallel.
schematic_from_netlistADestructive
Generate an .asc schematic from SPICE netlist text. Parses the netlist, grid-places each supported component (R/C/L/V/I/D) on its LTspice symbol, and connects pins by net label (FLAGs carrying the node name) so the result is electrically identical to the netlist — no manual pin-by-pin placement. Directives (.model/.tran/.ac/.param/.meas/...) are carried over. Multi-terminal / controlled / subcircuit elements (M, Q, J, X, E, G, F, H) can't have their symbol inferred from the instance line and are returned in skipped for manual placement. Round-trips through read_circuit. Connection is label-based, not routed wires, so the layout is functional rather than pretty.
Inputs: name (required), content (required), overwrite, format. Returns: file, placed, components, skipped, +4 more
server_statusARead-onlyIdempotent
Get comprehensive server status including detected simulators, configuration settings, security sandbox paths, and runtime state. Use this to check what capabilities are available before attempting operations.
Inputs: format. Returns: simulators, default_simulator, requested_simulator, diagnostics, +5 more
set_component_attributeAIdempotent
Set a schematic-only component attribute. The standard LTspice slots are Value, Value2, SpiceLine, SpiceLine2, SpiceModel, InstName — anything else is rejected, since LTspice silently ignores unknown SYMATTR keys at netlist time. To set arbitrary KEY=val pairs (e.g. W=10u L=0.5u), pass them as the SpiceLine value.
Inputs: path (required), reference (required), attribute (required), value (required).
set_component_valueAIdempotent
Set component value(s) in a circuit file. Supports single or batch mode.
Inputs: path (required), reference, value, values.
signal_statsARead-onlyIdempotent
Scalar summary of one signal in a .raw result. Use this when you need a single number per metric (average, RMS, peak, etc.) — not a waveform or a trend.
Transient: time-weighted mean, RMS, std, abs-mean, and min/max/pk-pk using trapezoidal integration (RMS = sqrt(∫ y² dt / T)). This is correct on LTspice's adaptive timestep — simple np.mean(y) would overweight densely sampled regions. Optionally restrict to [t_start, t_end]; passing no window averages the whole waveform including any startup transient, which is usually wrong for RMS/mean.
DC: returns min/max/pk-pk and the simple/abs mean over the swept axis, plus sweep_start_used/sweep_end_used/sweep_span. RMS and std are deliberately omitted — they're meaningless on a non-time axis. Use t_start/t_end to restrict the sweep range.
AC: returns magnitude (dB) min/max/mean and phase (deg) min/max. t_start/t_end are rejected for AC — use query_value for a point at a specific frequency.
Noise: returns min/max/pk-pk and the simple/abs mean of the noise spectral density over the frequency axis, plus freq_start_used/freq_end_used. RMS/std/duration are omitted; t_start/t_end are rejected — pass them via query_value at specific frequencies instead.
Related tools: for rise/fall times use edge_metrics; for overshoot/settling use pulse_response; for period/duty use periodic_metrics; to aggregate .MEAS values across a sweep use measurement_stats.
Inputs: raw_file (required), signal (required), step, t_start, +2 more. Returns: signal, analysis_type, min, max, +19 more
simulation_summaryARead-onlyIdempotent
Get a comprehensive simulation summary including type, signal list, data size, .MEAS results, Fourier analysis, AC bandwidth metrics, and warnings.
Inputs: raw_file (required), log_file, signal, step, +1 more. Returns: sim_type, range, point_count, step_count, +9 more
stability_metricsARead-onlyIdempotent
Find EVERY unity-gain and -180° phase crossover in a loop-gain AC sweep, report phase margin at each unity-gain crossing and gain margin at each -180° crossing. Replaces the single-crossing approximation in simulation_summary, which returns wrong margins on conditionally-stable systems.
Run this on a LOOP-GAIN signal (typically a dedicated middlebrook probe or .AC of the open loop). Running on a closed-loop output gives meaningless margins — if the DC phase starts near ±180° (a closed-loop / inverting output rather than a loop probe, which starts near 0°), a warning says so in warnings.
Returns: dc_gain_db, high_freq_gain_db, stability classification (stable / unstable / conditional / unconditional / always_below_unity), all crossings, per-crossing margins, and the worst-case values.
Nuances:
Phase is UNWRAPPED first, so systems whose phase drops past -360° are handled correctly (otherwise the raw wrap hides the crossing).
If phase NEVER crosses -180°, gain margin is 'infinite' (returned as null with stability='unconditional'). That's stable, not an error.
If gain NEVER reaches unity, phase margin is undefined (returned as null with stability='always_below_unity').
Multiple crossovers trigger stability='conditional' and a warning — each one needs its own review.
For -3 dB filter cutoffs use bode_metrics(mode='filter'); for custom crossings use bode_metrics(mode='crossing').
Inputs: raw_file (required), signal (required), min_separation_decades, step, +1 more. Returns: dc_gain_db, high_freq_gain_db, stability, unity_gain_crossovers, +7 more
symbol_infoARead-onlyIdempotent
Get symbol pin positions, bounding box, and description. Optionally compute absolute positions for a given placement and rotation.
Inputs: symbol (required), x, y, rotation, +1 more. Returns: name, description, bbox_width, bbox_height, +4 more
timing_betweenARead-onlyIdempotent
Use when you need propagation delay / skew between TWO signals — e.g. input-to-output delay, clock-to-Q, input-skew. Inputs one transient .raw containing both signals on a shared time axis.
Returns: signed delay = t_b - t_a where t_a and t_b are the FIRST threshold crossings of signal_a and signal_b in the window. Negative delay means signal_b leads signal_a.
Thresholds default to 50% of EACH signal's own min-max range in the window — intentional for asymmetric CMOS where V_in and V_out have different rails. Override per-signal via threshold_a / threshold_b if you need absolute thresholds (e.g. VIH/VIL at fixed voltages). Set direction_a / direction_b independently (e.g. rising input → falling output for an inverter).
Picks only the FIRST crossing of each signal in the window — if both signals have multiple edges, tighten t_start/t_end around the specific edge pair you want. Rejects AC analysis.
Inputs: raw_file (required), signal_a (required), signal_b (required), step, +8 more. Returns: t_a, t_b, delay, threshold_a_used, +8 more
trace_netARead-onlyIdempotent
Report everything electrically connected to a net: starting from a pin ('Ref.Pin'), a net label ('net:NAME'), or an (x,y) coordinate, return the net's labels and every component pin, FLAG, and wire vertex on it. Follows both wires (segment-aware — catches labels placed mid-wire) and same-name FLAGs (LTspice's name-based nets, as produced by schematic_from_netlist). Use it to answer 'what's on net X', to confirm a connect landed, or to spot an accidental short (a net carrying two different non-ground labels).
Inputs: path (required), pin, x, y, +1 more. Returns: start, labels, pins, coordinates, +1 more
unload_libraryAIdempotent
Unload a previously loaded library from the session.
Inputs: path (required).
validate_netlistARead-onlyIdempotent
Lint a netlist or schematic before simulation — the static circuit check gate. Catches: element arity (too few nodes, missing E/G/F/H/B value), duplicate/multiple analysis directives ('More than one analysis specified'), .MEAS whose analysis kind isn't present, known-bad .MEAS patterns (vdb()/phase()/group_delay()), and directives the LTspice runner is known to reject. On .asc, also surfaces named-net shorts, floating pins, and dangling labels. Returns a structured issue list; an empty list means the file passes the static gate. Note: value tokens (e.g. a typo'd '1kk') and undefined model references are NOT checked — LTspice coerces or resolves those at run time.
Inputs: path (required), format. Returns: file, issue_count, issues
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 48 tools
Each tool targets a very specific circuit design or analysis task, with detailed descriptions that prevent overlap. For example, edge_metrics, periodic_metrics, and pulse_response each handle distinct transient phenomena. Even tools that might seem similar, like simulation_summary and measurement_stats, serve different purposes (overview vs. aggregated .MEAS results).
Names follow a mostly consistent verb_noun pattern for actions (add_component, run_simulation) but analysis tools use varied suffixes (_metrics, _stats, _summary) or are single words (resonance). The mix is still readable and predictable, with only minor deviations from a uniform pattern.
48 tools is well beyond the typical 3-15 for a well-scoped server, indicating possible redundancy or over-specification. While the LTspice domain is complex, many tools could be merged or streamlined without losing functionality, e.g., combining several metrics tools into a single configurable analysis tool.
The tool surface covers the entire LTspice workflow: schematic editing, netlist creation, simulation setup and execution, result analysis (transient, AC, sweeps, Monte Carlo), library management, and validation. There are no obvious gaps; advanced features like diffing circuits and tracing nets are included. The set feels complete for the domain.
Maintenance
Related MCP Connectors
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
MCP server for AI dialogue using various LLM models via AceDataCloud
Related MCP Servers
- AlicenseBqualityDmaintenanceAI-powered circuit design through simulation — an MCP server that gives language models direct access to SPICE circuit simulation via ngspice, enabling natural language circuit description and automated netlist generation, simulation, measurement, and spec verification.28107 PyPI48GPL 3.0
- FlicenseCqualityCmaintenanceMCP server for automating LTspice on macOS, enabling simulation, schematic generation, data extraction, verification, and rendering via natural language or agents.7122-
- AlicenseNot gradedqualityBmaintenanceThis MCP server enables agents to control LTspice on macOS for running simulations, generating schematics, extracting data, and automating verification workflows.MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables LLMs to read and modify LTspice schematics, run simulations, parse results, and generate plots, all through natural language.6-