BLTSpice MCP Server
About
Create ltspice circuits with LLMs. Convert netlist to LTSpice .asc
Details
- Author
- brosnanyuen
- Categories
- Design
Jump to
Setup
Install BLTSpice MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/brosnanyuen/bltspice_mcp
Follow the installation instructions in the repository README, then restart your MCP client.
Converts ltspice netlist .net to ltspice .asc file format!
REALTIME LTSpice simulation and export to .csv!
- src/bltspice_mcp/server source code
- tests/unit/unit tests
- tests/integration/integration tests
- testfiles/copied example assets (.asc/.log/.raw/.asy/.txt/.net)
- examples/codex/andexamples/opencode/MCP call recipes for LLM agents
- config.jsonserver configuration
- bltspice_mcp_for_LLM.mdLLM tool-calling reference
- Python 3.11+
- LTspice installed
- Linux/macOS with Wine for Windows LTspice binary
python3 -m venv .venv . .venv/bin/activate pip install -U pip pip install "PyLTSpice>=6.0.1" "fastmcp>=3.4.4" "electronics-design>=0.1.9" pytest pytest-asyncio pip install -e .
{ "mcp_server_name": "My PyLTSpice MCP Server", "mcp_server_url": "http://localhost:7543", "wine_path": "/usr/bin/wine", "ltspice_path": "/home/brosnan/.wine/drive_c/Program Files/ADI/LTspice/LTspice.exe", "enable_extra_tools": true, "timeout": 600, "convert_settings": { "ltspice_windows_path": "C:\\users\\brosnan\\AppData\\Local\\LTspice\\", "ltspice_wine_path": "~/.wine/drive_c/users/brosnan/AppData/Local/LTspice/", "custom_search_paths": ["./valid_asy/"], "minimum_dist": 32, "wire_pin_out_dist": 16, "grid_size": 16, "autoplace_iter": 12, "ltspice_version": 4.1, "voltage_must_have_dc": true } }
convert_settingsis optional. Each setting is optional and receives a default when omitted. Relativecustom_search_pathsare resolved from the server project root; Windows paths remain in Windows syntax for Wine-based conversion.
mcp_server_urlsupportshttp://,https://, andstdio://.
. .venv/bin/activate python -m bltspice_mcp --config /home/brosnan/bltspice_mcp/bltspice_mcp/config.json
{ "mcpServers": { "bltspice_mcp": { "command": "/home/brosnan/bltspice_mcp/bltspice_mcp/.venv/bin/python", "args": [ "-m", "bltspice_mcp", "--config", "/home/brosnan/bltspice_mcp/bltspice_mcp/config.json" ] } } }
{ "mcpServers": { "bltspice_mcp": { "command": "/home/brosnan/bltspice_mcp/bltspice_mcp/.venv/bin/python", "args": [ "-m", "bltspice_mcp", "--config", "/home/brosnan/bltspice_mcp/bltspice_mcp/config.json" ] } } }
{ "mcp_servers": { "bltspice_mcp": { "command": "/home/brosnan/bltspice_mcp/bltspice_mcp/.venv/bin/python", "args": [ "-m", "bltspice_mcp", "--config", "/home/brosnan/bltspice_mcp/bltspice_mcp/config.json" ] } } }
- performing LTspice operation in progress
- LTspice operation completed!
- invalid input!
- file not found!
- unsupported file type!
- simulator not configured!
- simulation failed!
- parser failed!
- LTspice operation timed out!
- internal error
Each payload includesoperation. Successful responses includeoutput, and optionallyoutput_obj_name.
Each MCP session owns a dedicated OS worker process group containing its dispatcher registry, PyLTSpiceRunTaskthreads, simulator subprocesses, and callback children.stop_resetinterrupts that session immediately withSIGKILL, clears operations that were already queued for it, and discards its object registry. It does not signal worker groups belonging to other MCP sessions. Because operating systems applySIGKILLto processes rather than individual threads, killing the session worker process terminates all of its threads atomically.
The immediate response is the normal in-progress payload. Pollexecute_statusuntil bothstatusis complete andoperationisstop_reset. Its output includesworker_process_killed,processes_killed,threads_terminated_with_processes, andqueued_operations_killed. Work submitted after the reset call waits until the reset completes and runs in a fresh session worker.
Convert selected traces from a loadedRawReadobject into one CSV per wave/step.
- object_name: name of a storedRawReadobject
- trace_refs: array of trace names (any length), for example["V(opamp_input)", "V(opamp_output)"]
- output_files:
- string prefix/path, example./sim_wave_-> writes./sim_wave_0.csv,./sim_wave_1.csv, ...
- or array of explicit.csvpaths with one entry per wave
{"tool":"execute","arguments":{"api_name":"traces_to_csv","inputs":{"object_name":"raw","trace_refs":["V(opamp_input)","V(opamp_output)"],"output_files":"./sim_wave_"}}}
LTspice schematic conversion viaexecute
The followingelectronics-designAPIs are available throughexecute:is_valid_ltspice_netlist_fileandltspice_netlist_to_asc.
ltspice_netlist_to_ascreceives the configuredconvert_settingsautomatically. A request may include aninputs.convert_settingsobject to override individual values for that call.is_valid_ltspice_netlist_fileonly requires its filepath.voltage_must_have_dcmust be a JSON boolean and is passed toltspice_netlist_to_ascinsideconvert_settings.
run_ltspice_to_csv.pyEquivalent MCP Flow
Equivalent artifacts are included for the op-amp example workflow:
- netlist fixture:/home/brosnan/bltspice_mcp/bltspice_mcp/testfiles/opampdouble.net
- Codex recipe:/home/brosnan/bltspice_mcp/bltspice_mcp/examples/codex/run_ltspice_to_csv.md
- OpenCode recipe:/home/brosnan/bltspice_mcp/bltspice_mcp/examples/opencode/run_ltspice_to_csv.md
- integration test:/home/brosnan/bltspice_mcp/bltspice_mcp/tests/integration/test_run_ltspice_to_csv_via_mcp.py
- Core MCP flow test (runtime_info,execute,execute_status,stop_reset)
- Mapping coverage for the checked-in PyLTSpice example-name manifest (tests/fixtures/pyltspice_example_manifest.json)
- Mapping coverage for the checked-in README example-name list in that manifest
- End-to-endrun_ltspice_to_csv.pystyle MCP workflow foropampdouble.net
. .venv/bin/activate pytest -q tests/unit/test_responses.py pytest -q tests/unit/test_config.py pytest -q tests/unit/test_dispatcher.py pytest -q tests/unit/test_session.py pytest -q tests/integration/test_mcp_server_integration.py pytest -q tests/integration/test_examples_via_mcp.py pytest -q tests/integration/test_readme_examples_via_mcp.py pytest -q tests/integration/test_run_ltspice_to_csv_via_mcp.py
- runtime_infois immediate and does not requireexecute_statuspolling.
- Server queuesexecutein FIFO per MCP session;stop_resetinterrupts only that session's worker process group and clears its existing queue.
- execute_statuspolls the latest status for queued operations.
- Completion/error notifications are emitted through MCP notification channel.
A lightweight MCP (Model Context Protocol) server for Blender. It offers a natural language interface with Blender’s Python API, improving access to documentation, and allowing users to explore and understand complex setups.
The Lottie Creator MCP brings your AI assistant directly into your animation workflow — giving it full access to LottieFiles Creator so it can build and edit Lottie animations on your behalf through natural language.
AI Video, Image & Audio Generation with over 150 models
Rive MCP let AI handle repetitive tasks, like creating complex View Models, State Machines with hundreds of states/layers, Layouts, Shapes, and more.
Create, edit, and export SVGator animations (SVG, Lottie, GIF, video) from your AI assistant, and keep an editable project you can open in the editor anytime.
You're agent can Chain 60+ AI image and video models on one workflow canvas
Real interaction references and motion recipes for AI coding agents.
Search 1,145 real website designs by style, font, colour, section and measured design tokens.
Render, verify, describe, and safely edit Mermaid diagrams through MCP.
MCP bridge between an AI agent and a live Aseprite session, same machine or agent-in-a-VM
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.
