multisim-spice-mcp
Runs circuit simulations with ngspice and converts results for NI Multisim: exports netlists as Arbitrary SPICE Block text and .cir files, cleans Multisim-style netlists (kΩ, µF, MΩ, GND), converts values between SPICE and Multisim notation, and on Windows with Multisim installed drives the Multisim Automation API to open designs, list components, read/change R/L/C values, save and export netlists.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
multisim-spice-mcp
Let your AI assistant design, simulate and measure circuits on any OS, without a Multisim license, and hand the result to NI Multisim.
English · 繁體中文
You: Design an RC low-pass with a 1 kHz cut-off, check it, and give me something I can paste into Multisim.
AI: get_template("rc_lowpass", {r: "1.6k", c: "100n"})
simulate(..., {"type": "ac"}) -> -3 dB at 995 Hz, phase -45° there
sweep_parameter(C1 = 68n, 100n, 150n) -> 1.46 kHz / 995 Hz / 663 Hz
monte_carlo(R ±5 %, C ±10 %) -> 995 Hz ± 38 Hz (1σ), 99 % inside 900 Hz–1.1 kHz
plot(...) -> Bode plot image with the -3 dB point marked
to_multisim(...) -> Arbitrary SPICE Block text + .cir fileMost Multisim MCP servers drive the Multisim GUI, so they only work on Windows with a licensed Multisim 14 installed. This one runs the circuit in ngspice, the open-source SPICE engine, so it works on a Mac, on Linux, in CI or on a school laptop. When you want the circuit in Multisim, it hands you a netlist Multisim accepts. On Windows with Multisim installed, it can also open .ms14 designs, change values and pull the netlist back out.
Simulate what SPICE can: operating point, DC sweep, AC (Bode) and transient. Results come back as a short summary the model can reason about, not 10,000 raw samples.
Measure like a lab bench: RMS, peak-to-peak, rise/fall time, overshoot, settling time, frequency, -3 dB bandwidth, gain/phase at a frequency, unity-gain frequency, phase margin.
Catch mistakes before simulating: missing ground, floating nodes, nodes with no DC path, missing
.model/.subckt, duplicate names, parallel voltage sources, and the classic "first line is the title" trap.13 lab-ready templates with textbook hand calculations to compare against: divider, RC/RLC filters, op-amp amplifiers, rectifiers, Zener regulator, LED driver, BJT common-emitter, relaxation oscillator.
Parameter sweeps: "what happens to the bandwidth if C1 is 10n, 100n, 1µ?" in one call, for a component or a
.param.Tolerance (Monte Carlo) analysis: vary every resistor ±5 % and capacitor ±10 % and get the mean, spread, percentiles and yield against a spec.
Pictures, not just numbers: waveform plots and Bode plots with the -3 dB points marked, returned as images the assistant can show you.
Multisim in and out: values like
4.7kΩ,10µFand1MΩare converted correctly (SPICE reads1Mas one milliohm),GNDbecomes node 0, and netlists are prepared for Multisim's Arbitrary SPICE Block.Safe by default:
.controlblocks in netlists are dropped, because they can run shell commands.
Not affiliated with or endorsed by NI. Multisim is a trademark of National Instruments.
Install
Install ngspice (free):
OS
Command
macOS
brew install ngspiceDebian / Ubuntu
sudo apt install ngspiceFedora
sudo dnf install ngspiceWindows
Download
ngspice-*_64.7zfrom ngspice.sourceforge.io and unzip it toC:\Spice64(found automatically), or setNGSPICE_PATHtongspice_con.exeAdd the server to your MCP client. With uv nothing else needs installing.
Claude Code
claude mcp add multisim-spice -- uvx --from git+https://github.com/Sharkeeeeeee/multisim-spice-mcp multisim-spice-mcpClaude Desktop, Cursor, Windsurf (
claude_desktop_config.json,~/.cursor/mcp.json, ...){ "mcpServers": { "multisim-spice": { "command": "uvx", "args": ["--from", "git+https://github.com/Sharkeeeeeee/multisim-spice-mcp", "multisim-spice-mcp"] } } }VS Code (
.vscode/mcp.json){ "servers": { "multisim-spice": { "command": "uvx", "args": ["--from", "git+https://github.com/Sharkeeeeeee/multisim-spice-mcp", "multisim-spice-mcp"] } } }For plots, add the
plotextra:uvx --from "multisim-spice-mcp[plot] @ git+https://github.com/Sharkeeeeeee/multisim-spice-mcp" multisim-spice-mcp.Or with pip:
pip install "multisim-spice-mcp[plot] @ git+https://github.com/Sharkeeeeeee/multisim-spice-mcp", then usemultisim-spice-mcpas the command. On Windows, add thewindowsextra for the Multisim tools:pip install "multisim-spice-mcp[windows] @ git+https://github.com/Sharkeeeeeee/multisim-spice-mcp".Ask your assistant to run
backend_statusto check that ngspice was found.
Related MCP server: multisim-mcp
Tools
Tool | What it does |
| Which simulators are available (ngspice path and version, Multisim COM). |
| Example circuits with parameters, a suggested analysis and the textbook hand calculation. |
| Finds the mistakes that make SPICE fail, with a plain-language fix for each. |
| Elements, nodes, models and analyses as JSON. |
| Netlist from a JSON list of components (names are numbered for you). |
| Runs |
| Exact measurements on a stored result (see below). |
| Re-simulates over a list of values for one component or |
| Component-tolerance analysis: mean, standard deviation, min/max, 5th/95th percentiles, yield against a spec and the worst cases. |
| Waveform (tran/dc) or Bode plot (ac) as a PNG image, optionally saved as PNG/SVG. Needs the |
| Full-resolution data as CSV, returned or written to a file. |
| Text for Multisim's Arbitrary SPICE Block, a complete |
| Cleans Multisim-style netlists ( |
| Reads a value in SPICE or Multisim notation ( |
| Windows + Multisim only, experimental. Drive Multisim through NI's Automation API. Registered only on Windows. |
Measurements: max, min, peak_to_peak, average, rms, value_at, cross, rise_time, fall_time, frequency, overshoot, settling_time, and for AC results gain_db_at, phase_at, bandwidth_3db, unity_gain_frequency, phase_margin. All accept a start/stop window.
Analyses are given as a dict or as a SPICE card:
{"type": "op"}
{"type": "dc", "source": "V1", "start": 0, "stop": 5, "step": 0.1}
{"type": "ac", "sweep": "dec", "points": 20, "fstart": 10, "fstop": "1meg"}
{"type": "tran", "stop": "5m", "step": "1u"}
".tran 1u 5m"
".tf v(out) V1" (small-signal gain, input and output resistance)
".noise v(out) V1 dec 10 10 100k" (integrated output and input-referred noise)Before running, simulate also checks the analysis itself: a DC sweep of a source that does not exist, or an AC analysis with no AC source, is reported instead of returning meaningless zeros.
Templates
Name | Circuit | Default analysis |
| Two-resistor divider | op |
| First-order RC filters | ac |
| Series RLC band-pass | ac |
| Capacitor charging | tran |
| Op-amp stages (single-pole macromodel, 1 MHz GBW) | ac |
| Diode rectifiers with smoothing capacitor | tran |
| Zener shunt regulator | dc sweep |
| LED with current-limiting resistor | op |
| Voltage-divider-biased NPN amplifier | ac |
| Op-amp relaxation oscillator | tran |
The tests simulate every template, and the key ones are checked against theory: cut-off frequency and phase, resonance, RC time constant, amplifier gain and oscillation frequency.
Working with Multisim
SPICE → Multisim. to_multisim returns two things:
arbitrary_spice_block: paste it into an Arbitrary SPICE Block component (Place › Component, group Basic, family BASIC_VIRTUAL, or search for it). Multisim simulates the netlist with its own engine; pick the analysis under Simulate › Analyses and simulation.cir_file: a complete SPICE file to keep next to the design or open in any other SPICE tool.
Multisim → SPICE. Give from_multisim a netlist exported from Multisim, or one written with Multisim-style values. It lists every change it made:
R1: value '1MΩ' -> '1meg' (SPICE would have read 1M as 1 mΩ)
C1: value '10µF' -> '10u'
V1: ground node 'GND' -> 0Driving Multisim itself (Windows, experimental). With Multisim and pywin32 installed, the multisim_* tools use NI's Automation API (MultisimInterface.MultisimApp) to open a design, list components, read and change R/L/C values, save, and export the netlist, which can be simulated with ngspice in the same call. NI's API covers simulation only and does not publish Python signatures, so these tools follow NI's member list and community examples. They are tested against a mock, not a real Multisim install. Reports from Multisim users are very welcome.
SPICE gotchas the server handles for you
Mis milli,MEGis mega.1Min SPICE is 0.001.convert_valueandfrom_multisimmake this explicit.The first line is always the title. A netlist that starts with
R1 in out 1ksilently loses R1;validate_netlistwarns about it.Every node needs a DC path to ground. A node joined only through capacitors makes the operating point fail; the validator names the node and suggests a 100 MΩ resistor.
Simulator failures come with hints. "singular matrix", "timestep too small" and missing models are explained in plain language, along with the tail of the ngspice log.
Configuration
Variable | Default | Meaning |
| auto | Path to the ngspice executable ( |
|
| Seconds before a simulation is stopped. |
| unset | Set to |
.include and .lib lines are passed to ngspice; relative paths are resolved against the workdir argument of simulate. Only include files you trust.
Development
git clone https://github.com/Sharkeeeeeee/multisim-spice-mcp
cd multisim-spice-mcp
pip install -e ".[dev]"
pytest # tests that need ngspice are skipped when it is missing
ruff check src testsCI runs the tests on Linux, macOS and Windows with Python 3.10 and 3.13, against both mcp 1.x and 2.x, including an end-to-end session over stdio.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Design circuits, simulate and verify embedded firmware, and lay out PCBs with AI agents.
Design, route, check, review and export manufacturable PCBs from plain language; KiCad import.
EasyGerber brings AI printed circuit board (PCB) design, layout, and routing to MCP-compatible assistants. Describe a circuit or start from firmware pin assignments, search published electronic components, and build schematics using catalog parts with their footprints and available 3D models. Create and revise boards, generate layouts with automatic component placement and routing, inspect previews, and check saved layouts for blocking design issues. Export manufacturing ZIPs containing Gerber and drill files, a bill of materials, and component placement data, or download an editable EasyGerber (.egb) file. Start without signing up. Your agent uses one private board reference to create and continue a board, including catalog access, edits, layout, checks, previews, and exports, without a separate guest setup step or token to manage. To keep the board in your account or work with permitted saved personal or organization boards, complete EasyGerber sign-in and OAuth consent, then resume the same task. Account permissions, plan limits, and generation billing apply; support depends on your MCP client and installed integration.
Turn datasheets into source-backed JSON contracts, pinout matrices, and KiCad CAD for AI agents.
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.28110 PyPI48GPL 3.0
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to automatically generate Multisim circuits, run simulations, extract experimental data, and export circuit diagrams, CSV, waveforms, and lab reports.44MIT
- AlicenseAqualityBmaintenanceExposes Cadence EDA tools such as OrCAD Capture, Allegro PCB Designer, and PSpice to AI assistants, enabling them to browse PCB files, generate schematics and netlists, and run circuit simulations through a license-free, cross-platform interface.132MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to design and edit PCBs through natural language, including project setup, schematic editing, component placement, custom symbol and footprint generation, routing, DRC/ERC checks, and production file export. It also integrates JLCPCB parts catalog data, Freerouting automation, and visual snapshots for cross-platform Windows, Linux, and macOS workflows.61 npmMIT