spicelib-mcp
A thin MCP server that wraps spicelib for circuit simulation. The heavy lifting, such as simulator invocation, .raw file parsing, and multi-simulator abstraction, is done by spicelib, which deserves most of the credit. This project is purely a transport layer that exposes spicelib's functionality as MCP tools for use with Claude Code (and other coding agents).
Primary use case: behavioral model fitting — run simulations, compare against real measurements, iterate on SPICE models.
Tools
run_ac_analysis— AC frequency sweep, returns magnitude/phase datarun_transient— transient simulation, returns time-domain waveformsrun_dc_op— DC operating point analysisrun_sweep— run multiple simulations in parallel, sweeping component values
Results are saved as .npz files alongside the netlist for further analysis and plotting.
Supported simulators
| Simulator | SPICE_SIMULATOR value |
Install |
|---|---|---|
| ngspice | ngspice (default) |
sudo apt install ngspice |
| LTspice | ltspice |
Download from Analog Devices |
| Qspice | qspice |
Download from Qorvo |
Set the SPICE_PATH environment variable to override the simulator binary location.
Setup
Copy .mcp.json.template to .mcp.json in your project directory and adjust SPICE_SIMULATOR if needed:
{
"mcpServers": {
"spicelib": {
"type": "stdio",
"command": "uvx",
"args": ["spicelib-mcp"],
"env": {
"SPICE_SIMULATOR": "ngspice"
}
}
}
}
Requirements
- Python 3.10+
- A supported simulator installed and on PATH
License
GPL-3.0-or-later
Release files for spicelib-mcp 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| spicelib_mcp-0.1.5.tar.gz | 136.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spicelib_mcp-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 156.7 kB
Release files / spicelib_mcp-0.1.5.tar.gz
| Download URL | spicelib_mcp-0.1.5.tar.gz |
|---|---|
| Size | 136.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20ba789614dbc0205ccc87c14f92555b782a39c9e2567f71a3e33eef7da0713a
|
|
BLAKE2b-256 checksum How to use checksums |
d24a42dc2b08f8044f71fcef631b62ace44c833c662592af4ee7aa693961035d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 15, 2026.
Transparency logRelease files / spicelib_mcp-0.1.5-py3-none-any.whl
| Download URL | spicelib_mcp-0.1.5-py3-none-any.whl |
|---|---|
| Size | 19.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3df59ebad545d4d6afda9e82b4d7867817932e47d5266f07cfe39c0ca002211e
|
|
BLAKE2b-256 checksum How to use checksums |
b1db18f394198028c17b4e455cf6f0b713f62c6c8a5078568c7123f6ed924236
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 15, 2026.
Transparency log