Spice
Simulate circuits with ngspice or LTspice and plot their waveforms.
claude mcp add --scope project clio-spice -- clio-kit mcp-server spice
Install the launcher first. Restart your client after setup. Configuration locations →
Check the connection
clio-kit doctor --server spice --connect
Checks prerequisites and tool discovery. Test on known input to verify results. Native backends may require additional setup.
Tools
plot_waveformRender an interactive chart (zoom/pan/hover) of one or more signals for a person to look at. The chart type follows the run (transient, DC sweep, AC Bode, noise), a .step or Monte Carlo run overlays every step, and each unit gets its own panel.
Details
Writes a self-contained HTML file and returns its path — into ``out_dir`` if given, else the server's store. On a host that supports MCP Apps the chart is also embedded as an in-chat widget; otherwise it opens in your local browser. The reply summarizes each trace (min and max and where, first and final value, mean on a transient); attach_plot adds a PNG; in_ltspice also opens the run in the user's LTspice window. For more numbers use analyze_results: the waveform recipe returns a table (or CSV on disk), and signal_stats and the bode_* recipes return scalars.analyze_resultsMeasure finished simulation results: apply typed recipes to completed jobs, RAW or log files and get values, reductions, group splits and spec verdicts attributed to case, run and .step. One call spans many sources and many metrics, so batch them instead of calling per metric. Work is bounded by a compute budget; a partial response returns a result_set_id and cursor to resume with 'continue'. On a wide sweep set include.fields to return only the numbers you need. Recipes: stability (phase margin, gain margin, unity-gain crossover, DC gain), bode_filter (cutoff, bandwidth, Q), bode_point, bode_slope (dB/decade), bode_crossing, ac_structure (poles, zeros), resonance, return_loss (VSWR), thd (distortion), tone (amplitude and phase at one frequency), noise_integral, signal_stats (RMS, ripple, peak-to-peak, percentiles), edges (rise/fall time), timing (propagation delay), periodic (duty cycle), transient_response (overshoot, settling, load step), operating_point (bias point, gm/gds/vth), measurements (.meas), value (one trace at one axis point), summary, waveform (samples, CSV), plot (chart). inspect(kind='reference', query=...) searches these by plain words and returns a recipe's fields. A signal is one trace or V(a,b), not an expression; other trace math is numpy (guide section 'signals').
run_experimentsRun SPICE and get the numbers back in one call: point it at your deck(s), attach an 'analyze' block, and the measured values return with the results — from a one-off spot check to a full sweep or Monte Carlo grid. Express the whole sweep as one 'variations' grid rather than a call per point: cases run in parallel up to the server's cap, so a grid costs one call and one receipt, not one of each per case. When unsure about a behavior, assumption, or sizing, run a small experiment and read the numbers rather than reasoning it out. Quick runs return results inline; longer ones return a receipt to follow with 'jobs'. Every job is recorded on disk; pass your own request_id to make a retry replay the same job instead of running a new one.
jobsCheck on, wait for, or stop a run you started, by job_id or the request_id it was submitted under. 'wait' blocks server-side until the job finishes — prefer it to polling 'status' in a loop; 'status' snapshots it now; 'cancel' stops it (owner process, or the receipt's control_token); 'runs' pages the full per-run records, artifact paths included; 'list' with no circuit is the recently-touched-circuits view for picking up work from an earlier session. 'resume' creates a child of a terminal recoverable head, preserving produced cases; use a new resume_request_id for each retry. 'place_beside_sheet' copies a case's results beside the .asc it ran, where LTspice's window opens them. Fields by action: status: job_id, request_id; wait: job_id, request_id, timeout_s, wait_for; cancel: job_id, request_id, control_token; list: circuit, limit, cursor; runs: job_id, request_id, cursor, run_fields; resume: job_id (required), resume_request_id (required), control_token, case_ids, retry_failed, retry_cancelled, wait_s; place_beside_sheet: job_id, request_id, case_id.
inspectRead-only lookups over the server and the circuits it can reach, batched as independent 'queries'. Kinds: 'capabilities', 'symbols', 'symbol', 'net', 'components', 'hierarchy', 'model', 'results', 'reference', 'guide', 'simulator_docs', 'open_in_ltspice' — each with its own arguments, described on its branch of the query schema. 'reference' searches every tool's recipes, ops, checks and their fields in plain words ('phase margin'). 'guide' returns the guide's core, or one 'section' its index names. A denied path, a stale cursor, an unknown kind, or a malformed query fails only that item; every other query still returns, and paginated kinds resume via 'cursor'. It is the only tool on this surface that never writes.
edit_schematicApply a typed op batch to an LTspice .asc schematic in one revision-guarded, transactional call. base='blank' builds a whole circuit from an empty sheet; base='existing' applies deltas. Pass expected_sha256 of the file you edited against (required when the target exists) — a peer that committed first yields revision_conflict with nothing written. Returns geometry facts (pin/net table, wiring metric) and an optional post-commit netlist verification against a reference. To draw the sheet, call verify_circuit with a render policy.
verify_circuitCheck a circuit file, and optionally render it. It does not change the file it checks, or write next to it unless export_to='sidecar'. For a netlist: SPICE syntax, directive and element arity, non-ASCII value suffixes such as µ, and connectivity facts — nodes wired to one terminal, V()/I() naming something no element declares, nets with no DC path to ground, a parameter given twice. For an .asc: symbol and pin resolution, the authoritative LTspice netlist export (which silently drops wires the file appears to contain), geometric layout facts (overlapping bodies, wires through a body, floating pins, dangling wire ends and labels, a wire drawn twice), and quality facts (net connected only by label stubs with no drawn wire; text or a label anchored inside a symbol; stacked directives; a part giving a parameter twice; a byte order mark LTspice rejects). Supply 'compare' to compare against a known-good netlist: wiring, values and directives (equivalence), or a node-blind delta (structural_diff). Every fixable finding carries its location and subject. in_ltspice also opens the file in the user's LTspice window.
run_codeRun a Python snippet in a warm worker that holds this server's Python API as `api`. The snippet has the server process's own file and process authority, which no sandbox confines, so permission this tool like a shell. For loops over many runs, numpy on samples, and compute-decide-compute; a single run or measurement is a tool call. Trace math is numpy on one step's traces, r.trace(name, step=k) on r.axis(step=k); compute_signal_stats and time_weighted_quantiles weight a derived trace's statistics and quantiles by time, which np.mean and np.percentile do not (guide section 'signals'). In scope: api (the same six ops as methods on this working directory, complete results, no paging), np, load_raw, measurements, reference, window_and_clean, compute_signal_stats, time_weighted_quantiles — reference('run_experiments') lists an op's arguments, so read it before guessing them. Every call is a fresh namespace around the same live `api`; keep state on disk (a job by request_id, a file). stdout keeps the first 12000 and last 4000 characters of print() output, stderr its last 4000, result the repr of a trailing expression (4000). Bound: timeout_s, default 60 (max 600); a timeout interrupts the snippet and cancels a run it waits on. One snippet at a time: a call during another is answered busy, not queued.
Examples
Replace example paths with your own files and check the returned results.
Usage
Available tools: plot_waveform, analyze_results, run_experiments, jobs, inspect, edit_schematic, verify_circuit, run_code.
Inspect the tool input schema in your MCP client before calling it. Use a small known input, check the result and any reported errors, then expand to the intended workload.