Skip to main content

MCP server for running ngspice simulations via spicelib

Project description

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 data
  • run_transient — transient simulation, returns time-domain waveforms
  • run_dc_op — DC operating point analysis
  • run_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.

Requirements

  • Python 3.10+
  • A supported simulator installed and on PATH

License

GPL-3.0-or-later

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spicelib_mcp-0.1.4.tar.gz (136.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spicelib_mcp-0.1.4-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file spicelib_mcp-0.1.4.tar.gz.

File metadata

  • Download URL: spicelib_mcp-0.1.4.tar.gz
  • Upload date:
  • Size: 136.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for spicelib_mcp-0.1.4.tar.gz
Algorithm Hash digest
SHA256 3f4d8f2d3dee409cd7372cbfeb63aec866fd17328a5faf83d69918aa824219c5
MD5 233b747753b3c0815a0f875c3e775a84
BLAKE2b-256 d37b3199b485b6d23016675edc04983c6c1cf65e05f770c5e422ee7da12883ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for spicelib_mcp-0.1.4.tar.gz:

Publisher: release.yml on lucasgerads/spicelib-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spicelib_mcp-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: spicelib_mcp-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for spicelib_mcp-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 479c0efb53ca68cfea6e68aa7668dbe904c174a6a30ab5f4c568d00895f56b02
MD5 d15308ce46937a3e1f13956aa1d75706
BLAKE2b-256 d7aa613b14b3f6c7017afeeb9d669f261316a379fef55d5cf35bdc88789547d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for spicelib_mcp-0.1.4-py3-none-any.whl:

Publisher: release.yml on lucasgerads/spicelib-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page