Skip to main content
Glama
ltspice-mcp

ltspice-mcp

by ossenna-hq

저장소 출처: 이 공개 통합 포크는 업스트림 cognitohazard/ltspice-mcp 태그 v0.5.0(커밋 4dc456000e1a436ef37a585c23ab35954a8caf04e)을 기반으로 합니다. 이 브랜치의 추가 사항은 설치와 무관한 배포 예제와 문서를 제공합니다. 업스트림 서버 소스는 수정되지 않았습니다.

ltspice-mcp

작업 진행 중. 핵심 기능은 사용할 수 있지만 미숙한 부분과 호환성이 깨지는 변경이 있을 수 있습니다.

LLM 어시스턴트(Claude 및 기타 모든 MCP 클라이언트)를 실제 회로 시뮬레이션에 연결하는 MCP 서버입니다: LTspice와 ngspice, 그리고 LTspice .asc 스키매틱의 직접 편집을 지원합니다. 시뮬레이션 결과는 구조화된 숫자로 반환됩니다 — 차단 주파수, 오버슈트, 위상 여유, 상승 시간, 그리고 이름으로 읽어오는 소자별 소신호 동작점 파라미터(gm, gds, vth, …) — 따라서 어시스턴트는 rawfile을 직접 파싱할 필요 없이 LTspice에서 여는 것과 동일한 파일에서 회로를 설계, 검증, 반복할 수 있습니다. spicelib 기반으로 구축되었습니다.

빠른 시작

Claude Code에서 플러그인을 설치합니다:

/plugin marketplace add cognitohazard/ltspice-mcp
/plugin install ltspice-mcp

또한 호스트에 LTspice 또는 ngspice가 필요합니다(Windows, Linux, macOS에서 자동 감지됨; WSL에서는 LTspice 경로를 명시적으로 설정 — WSL 참고). 회로 편집은 시뮬레이터 없이도 작동합니다. uv가 필요하며, 서버 자체는 첫 사용 시 PyPI에서 가져옵니다.

수동 설치(모든 MCP 클라이언트)

서버를 설치한 다음 클라이언트가 이를 가리키도록 설정합니다:

uv tool install ltspice-mcp     # or: pip install ltspice-mcp / pipx install ltspice-mcp

Claude Code — 한 줄 명령(-s project를 빼면 전역으로 설치):

claude mcp add -s project ltspice -- ltspice-mcp

기타 클라이언트 — Claude Desktop, Cursor, Windsurf, Gemini CLI, Continue, Cline, Zed 등 — 클라이언트의 MCP 구성 파일에 다음 mcpServers 스탠자를 추가합니다(각 클라이언트가 자체 경로를 문서화함):

{
  "mcpServers": {
    "ltspice": { "command": "ltspice-mcp", "args": [] }
  }
}

Python 3.11+ 필요. ltspice-mcp --help로 확인하세요. 동일한 서버는 circuit-mcp 및 ngspice-mcp라는 두 개의 별칭 이름으로도 게시되므로, uvx circuit-mcp / uvx ngspice-mcp는 uvx ltspice-mcp의 대체 명령으로 사용할 수 있습니다. 더 알아보기 쉬운 이름이 있다면 그 중 하나를 사용하세요.

웹 클라이언트(claude.ai, ChatGPT)는 mcp-proxy와 같은 stdio→HTTP 브리지가 필요합니다 — 이 서버는 allowed_paths 내에서 파일을 쓰고 프로세스를 생성하므로 완전히 통제하는 네트워크에서만 노출하세요.

Claude Desktop 확장도 제공됩니다: packaging/mcpb/에서 .mcpb를 빌드하여 Claude Desktop에 끌어다 놓으면 회로 디렉토리를 선택하는 기본 폴더 선택기와 함께 원클릭 설치가 가능합니다. 플러그인과 마찬가지로 PyPI 패키지를 래핑하며 호스트에 uv와 시뮬레이터가 필요합니다(LTspice나 ngspice를 번들하지 않음).

Related MCP server: ltspice-mcp

사용 방법

연결되면 일반 언어로 회로 작업을 요청합니다. 어시스턴트가 회로를 설계하고 측정할 항목을 결정합니다; 서버는 시뮬레이터를 실행하고, 바이너리 출력을 파싱하여 숫자를 반환합니다. 실행 결과와 시뮬레이터 자체의 경고를 보고하며, 결과가 좋은지 여부에 대한 판단은 사용자와 어시스턴트에게 맡깁니다.

"이 NMOS 공통 소스 단을 목표 드레인 전류에서 포화 영역으로 바이어스하고 gm/ID를 보고하세요."

어시스턴트는 넷리스트를 작성하고, LTspice에서 바이어스 포인트를 해석하고, 소자의 동작점을 이름으로 읽어옵니다 — 드레인 전류, gm, gds, 포화 여부를 확인하기 위한 VDS 대 VDSAT, 그리고 아날로그 설계자가 크기를 정할 때 사용하는 gm/ID. 바이어스가 맞지 않으면 게이트 기준 전압이나 W/L을 조정하고 다시 실행하며, 패스당 몇 초가 걸립니다.

같은 방식으로 작동하는 다른 요청:

  • "이 레귤레이터의 스텝 응답에서 오버슈트와 정착 시간은 얼마인가요?" — 과도 해석을 실행하고 파형에서 둘 다 측정하며, 상승 시간, 링잉 주파수, 최종 값도 측정합니다.

  • "5% 저항으로 200회 몬테카를로를 실행하고 출력 분포를 알려주세요." — 실행마다 부품을 변동시키고, 배치를 시뮬레이션하고, 측정값별 평균, 시그마, 최악의 경우 값을 보고합니다.

  • "부하를 100 Ω에서 10 kΩ으로 스윕하고 효율이 떨어지는 지점을 찾으세요." — 실행별 결과가 포함된 파라미터 스윕.

  • "이 NMOS를 특성화하세요: VGS에 따른 gm과 gm/ID." — .save @m1[gm] @m1[id]가 포함된 .dc Vgs 덱을 작성하고, ngspice에서 실행하고, gm/ID 테이블을 단일 CSV로 반환합니다(.control 블록이나 rawfile 파싱 없음).

  • "로우사이드 스위치용 N채널 파워 MOSFET을 찾고 온 상태 전압 강하를 측정하세요." — 로드된 라이브러리에서 부품을 검색하고(find_model), 펄스 게이트 과도 해석에 넣고, .meas 결과에서 Vds(on)과 부하 전류를 읽어옵니다.

  • "이 차동 쌍을 LTspice에서 열 수 있는 스키매틱으로 만들어 주세요." — 직교 라우팅과 핀 충돌 검사로 실제 .asc에 부품을 배치하고 배선합니다.

  • "이 루프는 안정적인가요?" — 루프 이득의 AC 해석; 첫 번째 크로스오버뿐만 아니라 모든 크로스오버에서 위상 및 이득 여유를 보고합니다.

  • "이 직렬 RLC의 공진 주파수와 Q는 얼마인가요?" — AC 스윕을 실행하고 각 피크의 중심 주파수, Q, −3 dB 대역폭을 보고합니다.

경고는 영향을 주는 숫자와 함께 전달됩니다. ngspice와 같은 시뮬레이터는 열어보지 않을 로그 깊숙한 곳에 "singular matrix"를 한 번 출력한 다음, 실행을 마치고 그럴듯한 숫자를 그대로 쓸 수 있습니다 — 직접 읽어보면 아무 문제가 없어 보입니다. 서버에 그 숫자 중 하나를 요청하면 묻혀 있던 줄이 값 바로 옆의 observations 필드에 첨부되어 반환되므로, 실패는 지나치기 쉬운 곳이 아니라 이미 보고 있는 곳에서 드러납니다.

동일한 파일에서의 공동 설계

모든 작업은 일반 LTspice 및 SPICE 파일에서 이루어지므로, 작업이 채팅 안에 갇히지 않고 사용자와 어시스턴트 사이를 오갑니다:

  • LTspice에서 스키매틱을 스케치한 다음 넘겨주세요: "바이어스 포인트가 어떻게 되나요?", "출력이 왜 움직이지 않나요?", "보상을 추가하고 위상 여유를 확인해 주세요."

  • 또는 반대로: 어시스턴트가 회로를 설계하고 검증한 다음 .asc를 작성합니다; 사용자는 LTspice에서 열어 검사하고 직접 수정합니다. 수동 편집은 단순히 파일의 새 상태가 되며, 어시스턴트는 다음 요청에서 그 상태부터 이어갑니다.

  • 설계 중간에 변경 사항이 어느 방향으로든 흐를 수 있습니다: GUI에서 값을 조정하고 재검증을 요청하거나, 확정하기 전에 고려 중인 변경 사항을 어시스턴트가 스윕하도록 할 수 있습니다.

기능

시뮬레이션 및 측정. LTspice 또는 ngspice를 실행하고 바이너리 출력을 직접 파싱합니다. 측정값은 서버 측에서 계산되어 숫자로 반환됩니다: 시간 영역(상승/하강, 오버슈트, 정착, 지연, 주기/듀티/지터, RMS, THD), 주파수 영역(필터 차단 주파수와 롤오프, 임의 주파수에서의 이득과 위상, 안정성 여유, Q를 포함한 공진 피크, 통합 노이즈), DC 동작점, 그리고 실패한 것을 포함한 .MEAS 지시문 결과. 소자별 소신호 동작점 파라미터(gm, gds, vth, …)는 두 시뮬레이터 모두에서 이름으로 반환됩니다 — LTspice는 로그에 자동 추가된 .options logopinfo 블록을 통해, ngspice는 .save @dev[param] 트레이스를 통해. .dc 스윕 전체에서 export_waveform으로 gm/ID 테이블로 읽거나, operating_point로 단일 바이어스 포인트를 읽을 수 있습니다(m1.gm / @m1[gm]으로 지정, rawfile 파싱 없음).

스키매틱 및 넷리스트 편집. 실제 LTspice .asc 파일을 생성하고 편집합니다 — 부품 배치, 핀 배선, 넷 레이블 — 쓰기 전에 검증이 수행됩니다: 핀과 충돌하거나, 접합과 겹치거나, 대각선으로 흐르는 배선은 거부되며, 모든 편집은 플로팅 핀이나 매달린 레이블에 대한 경고를 반환합니다. 세션의 편집 내용은 되돌릴 수 있습니다. 일반 넷리스트(.cir/.net)도 텍스트 수준에서 동일한 작업을 지원하며, 시뮬레이션을 소모하기 전에 잘못된 카드를 잡아내는 정적 검증 패스를 추가로 제공합니다.

스윕 및 몬테카를로. 다차원 파라미터 스윕과 부품별 공차, .MODEL 공정 변동, Pelgrom W·L 소자 불일치를 포함한 몬테카를로. 측정별 통계가 실행 전체에서 집계되며, 개별 실행을 꺼내 독립 실행 시뮬레이션처럼 분석할 수 있습니다.

작업 및 신뢰. 시뮬레이션은 타임아웃과 동시성 상한이 있는 취소 가능한 작업으로 실행됩니다; 긴 실행은 즉시 작업 ID를 반환하며 작업 상태는 서버 재시작 후에도 유지됩니다. 결과는 사실을 보고하지 판단을 내리지 않습니다: 완료된 실행에는 시뮬레이터 자체의 경고, 결과를 생성하지 못한 측정값, 극단적인 노드 값이 구조화된 관찰로 포함됩니다. 결과의 신뢰성 판단은 이를 읽는 모델에게 맡겨집니다.

지원되는 시뮬레이터

시뮬레이터

상태

LTspice

기본. Windows 네이티브, WSL2(interop을 통한 Windows LTspice.exe), Wine을 통한 Linux. .asc 스키매틱 편집에 필요(.asy 심볼 라이브러리 필요).

ngspice

일급 지원: 시뮬레이션, 파싱, 진단, 분석. LTspice 설치가 필요 없는 오픈소스 경로.

QSPICE, Xyce

지원되지만 보조적.

구성

기본값으로 바로 작동합니다. 사용자 지정하려면 ltspice-mcp.example.toml을 ltspice-mcp.toml로 복사하세요; 모든 설정은 LTSPICE_MCP_ 접두사가 붙은 환경 변수로 재정의할 수 있으며, --config PATH 또는 LTSPICE_MCP_CONFIG로 파일을 선택합니다. 주요 옵션:

[simulator]
default = "ltspice"      # ltspice, ngspice, qspice, xyce (null = auto-detect)
path = ""                # explicit executable path (required on WSL)
ngbehavior = "hsa"       # ngspice compat mode; unset = spicelib default, "hsa" fixes sectioned .lib corner select

[security]
allowed_paths = ["."]    # sandbox: only these directories are accessible

[simulation]
max_parallel = 4
timeout = 300.0          # seconds

[tools]
profile = "full"         # or "agentic"

[state]
persist_jobs = true

전체 옵션 목록은 src/ltspice_mcp/config.py를 참조하세요([analysis], [schematic], [logging], ...).

WSL에서 LTspice.exe는 Windows interop을 통해 실행되며(Wine 아님), spicelib는 WSL 경계를 넘어 자동 감지할 수 없습니다. Windows 쪽 경로를 명시적으로 설정하세요:

[simulator]
path = "/mnt/c/Program Files/ADI/LTspice/LTspice.exe"

시뮬레이션 출력은 자동으로 Windows 임시 디렉토리로 리디렉션됩니다: LTspice의 .MEAS 결과는 UNC 경로(\\wsl.localhost\...)에서 실패하는 SQLite .db 파일을 거치며, 리디렉션이 없으면 측정 데이터가 로그에서 조용히 사라집니다.

.asc 편집용 .asy 심볼 경로는 Windows와 WSL에서 자동 감지됩니다; [schematic] symbol_paths 또는 LTSPICE_MCP_SYMBOL_PATHS로 재정의하세요.

도구 프로필

프로필

도구

사용 사례

full(기본)

49

모든 MCP 클라이언트, 자동화, 비에이전트 LLM

agentic

41

네이티브 파일 액세스(읽기/편집/쓰기)가 있는 LLM 에이전트

agentic 프로필은 넷리스트 편집 래퍼와 라이브러리 세션 관리를 제거합니다 — 유능한 에이전트가 직접 파일 편집으로 수행하는 작업 — 그리고 시뮬레이션 수명 주기, 바이너리 .raw 파싱, 배치 오케스트레이션, .asc 지오메트리 도구를 유지합니다. skills/ 디렉토리(skills/ltspice/SKILL.md, skills/ngspice/SKILL.md)에는 이와 함께 사용되는 도메인 지식이 포함되어 있습니다: 해당 스킬을 클라이언트의 영구 지시사항 위치에 복사하세요.

실행 위치. 서버는 로컬 LTspice/ngspice를 호출하고 디스크에서 회로 파일을 읽으므로, 시뮬레이터와 파일이 있는 곳에서 실행되어야 합니다. 두 가지 구성이 가능합니다: 자신의 머신에서 실행되는 로컬 MCP 호스트(Claude Desktop, Claude Code, Cursor, Gemini CLI, Codex 등), 또는 샌드박스에 ngspice를 설치하고 서버를 등록할 수 있는 브라우저 기반 클라우드 에이전트(Claude로 검증됨)입니다. LTspice는 로컬 전용(Windows 앱)이며, ngspice는 오픈소스로 두 환경 모두에서 작동합니다. 샌드박스가 없는 일반 웹 채팅에는 시뮬레이터도 파일 접근도 없으므로 이 서버를 직접 실행할 수 없습니다. 해당 UI를 사용하려면 직접 제어하는 머신에 연결(예: mcp-proxy)하세요.

내부 동작: 도구 수준 루프

어시스턴트가 "1 kHz RC 저역 통과 필터를 설계하고 검증"하기 위해 실제로 수행하는 작업입니다. 넷리스트를 작성합니다(R=1k, C=159.155n → fc = 1 kHz):

* rc.cir — RC low-pass
V1 in 0 AC 1
R1 in out 1k
C1 out 0 159.155n
.ac dec 50 1 1Meg
.end

그런 다음 세 가지 도구를 구동합니다:

validate_netlist(path="rc.cir")
  → OK: directives valid, element arities check out — safe to simulate

run_simulation(netlist="rc.cir")
  → {"job_id": "sim_a3f1", "status": "completed", "raw_file": ".../rc.raw", ...}

bode_metrics(raw_file=".../rc.raw", signal="V(out)", mode="filter")

그리고 플롯이 아닌 스칼라 값을 반환받습니다:

{
  "signal": "V(out)",
  "filter_type": "lowpass",
  "passband_gain_db": 0.0,
  "passband_ripple_db": 0.02,
  "cutoff_low_hz": null,
  "cutoff_high_hz": 1000.4,
  "stopband_rejection_db": 59.97,
  "rolloff_slope_db_per_decade": -19.9,
  "estimated_order": 1,
  "warnings": []
}

(요약본 — 전체 응답에는 통과 대역 경계와 천이 대역폭도 포함됩니다)

목표에서 벗어나면 → set_component_value, 재실행, 재측정. 긴 시뮬레이션은 차단 대신 작업 ID를 반환하며, check_job/cancel_job이 이를 관리합니다. 작업 메타데이터는 회로별 사이드카({dir}/.ltspice-mcp/jobs/ — .gitignore에 .ltspice-mcp/를 추가하세요)에 유지되며, MCP 리소스(spice://results/..., spice://netlists/..., spice://config)는 작업, 신호, 측정값, 구성을 탐색할 수 있게 노출합니다.

모든 도구는 MCP 어노테이션(readOnlyHint, destructiveHint, idempotentHint, openWorldHint)을 선언하며, 데이터를 반환하는 도구는 structuredContent 인트로스펙션을 위한 outputSchema를 선언합니다.

Tool

설명

create_netlist

콘텐츠 문자열에서 새 넷리스트 생성

create_schematic

증분 편집에 사용할 빈 .asc 생성

read_circuit

회로 파일 읽기(.cir의 경우 넷리스트 텍스트, .asc의 경우 회로도 레이아웃)

list_components

컴포넌트 나열(선택적 접두사 필터) 또는 참조로 하나 조회

set_component_value

컴포넌트 값 하나 설정 또는 values 딕셔너리를 통한 일괄 설정

parameter

모든 .PARAM 값 읽기 또는 하나 설정

edit_directive

SPICE 지시문 추가/제거(.tran, .ac, .lib, ...)

add_component

컴포넌트 추가; 핀 위치, 경계 상자, 겹침 경고 반환

connect

웨이포인트 라우팅으로 두 핀을 참조로 연결; 핀 충돌, 접합, 대각선 검증

symbol_info

심볼 핀 위치, 방향, 경계 상자, 설명

component_info

배치된 컴포넌트 핀 위치, 경계 상자, 속성

export_netlist

LTspice를 통해 .asc를 .net으로 내보내기(이전 내보내기와의 diff 포함)

validate_netlist

시뮬레이션 전 넷리스트 또는 회로도에 대한 정적 사전 점검

trace_net

핀/라벨/와이어가 있는 모든 핀/net:NAME/(x,y); 우발적 단락 플래그

reset_schematic

.asc를 이 세션의 사전 편집 스냅샷으로 되돌리기

diff_circuit

두 회로 파일 간 구조적 diff

apply_schematic_ops

한 트랜잭션에서 많은 .asc 편집 적용; ack 전용 변형 연산(move_component, remove_component, set_component_attribute, add_net_label, remove_net_label, remove_wire)의 홈

run_simulation

시뮬레이션 실행 — 짧은 실행은 동기, 긴 실행은 비동기(작업 ID); 배치 플래그 설정, ngspice 헤더리스-raw 방언 처리, raw/로그 아티팩트 라우팅, 수렴/시간 초과 오류 표면화(rawfile 수동 파싱 없음)

check_job

ID로 작업 상태 확인 또는 모든 작업 나열

cancel_job

실행 중인 시뮬레이션 또는 배치 취소; 시뮬레이터 프로세스 종료

signal_stats

최소, 최대, 평균, RMS, 피크-투-피크(AC의 경우 dB/위상)

get_waveform

창에 걸친 신호의 데시메이션된 최소/최대 통계 엔벨로프 — 형태를 본 다음 더 좁은 창을 다시 요청하여 확대

export_waveform

하나 이상의 신호를 디스크로 전체 정밀도 CSV 내보내기(모든 분석 유형; .step의 경우 tidy/long); 장치 동작점 매개변수(m1.gm/@m1[gm]) 허용 — .dc 스윕에서 이는 gm/ID-테이블 읽기; 직접 계산할 경로 반환

plot_waveform

대화형 HTML 차트(과도 / DC / Bode 이중 패널 ac_structure 코너 + 비최소 위상 마커 / 노이즈 / .step 오버레이) 회로 옆에 작성되고 브라우저에서 열림; 측정이 아닌 형태 확인용

query_value

특정 시간/주파수에서의 신호 값(또는 장치 동작점 매개변수, m1.gm/@m1[gm]); step_axis+step_value는 .step 실행 선택

operating_point

DC 동작점: 모든 노드 전압, 분기 전류, 장치별 동작점 매개변수(gm/gds/vth/…) LTspice(자동 .options logopinfo) 및 ngspice에서 m1.gm/@m1[gm]로 주소 지정 가능; device=는 하나의 장치로 범위 지정

simulation_summary

전체 요약: 시뮬레이션 유형, 신호, 측정, 경고

edge_metrics

하나의 과도 엣지에 대한 상승/하강 시간 및 슬루율

pulse_response

스텝 응답에 대한 오버슈트, 언더슈트, 정착 시간

timing_between

두 과도 신호 사이의 전파 지연

periodic_metrics

진동 신호의 주기, 주파수, 듀티 사이클, 지터

thd

FFT를 통한 주기적 과도 신호의 총 고조파 왜곡(THD/THD+N); 정확한 결과를 위한 코히어런트 샘플링; 모든 조건 표면화

measurement_stats

스윕 또는 몬테카를로 실행에 걸친 집계 .MEAS 스칼라

bode_metrics

mode에 의한 AC/Bode 분석: filter, slope, point, crossing; all_steps=true는 단계별 결과

stability_metrics

루프 이득 안정성: 모든 단위 이득 / -180° 교차점과 교차별 마진

resonance

AC 피크와 Q 계수 및 피크당 -3 dB 대역폭

ac_structure

AC 응답의 극/영점 구조: 순차, 코너 범위 + Q, 비최소위상 / RHP-영점, 전송 지연(인간 검토용 사실)

noise_integral

.noise 스펙트럼 밀도를 대역에 걸쳐 총 RMS로 적분(sqrt(∫ density² df)); 대역 및 샘플 수 보고

configure_sweep

다중 매개변수 스윕(선형 또는 로그) 구성

run_sweep

구성된 스윕 실행(비동기, 작업 ID 반환)

configure_montecarlo

몬테카를로 구성: 허용 오차, .MODEL 변형, Pelgrom 불일치

run_montecarlo

구성된 몬테카를로 분석 실행(비동기, 작업 ID 반환)

batch_results

스윕/MC 작업 진행, 신호별 통계 또는 실행별 데이터

find_model

이름으로 모델 후보 찾기(기본 퍼지, exact=true는 정확)

load_library

.lib/.mod 파일 또는 라이브러리 디렉토리 로드

unload_library

이전에 로드된 라이브러리 언로드

list_libraries

로드된 라이브러리 나열, 선택적으로 모델 이름 포함

server_status

감지된 시뮬레이터, 구성, 샌드박스 경로, 런타임 상태

recent

영구 인덱스에서 최근 사용된 회로 및 작업

개발

uv sync                        # install runtime + dev dependencies
uv run pytest tests/ -v        # tests
uv run pyright                 # type checking
uv run ruff check src/ tests/  # lint
uv run ltspice-mcp             # run the server (stdio)

더 보기: docs/DESIGN.md (범위, 아키텍처, 비목표) 및 docs/spice_lex.md (SPICE 파서 내부).

라이선스

GPL-3.0

Available Tools

49 tools
ac_structureA
Read-onlyIdempotent

Read the pole/zero STRUCTURE of an .AC response — net order, corner frequencies (as ranges) with Q, out-of-phase zeros, and transport delay — to support design reasoning (where the poles/zeros roughly are, damping, out-of-phase zeros). It first tries a rational fit and uses its poles/zeros when the fit is clean; otherwise it falls back to asymptotic Bode reading (slope breakpoints + joint gain-phase + group delay + a gain-phase consistency residual).

Returns FACTS, not a verdict — bring your own control/design knowledge. The most design-critical fact is the non_minimum_phase flag: an out-of-phase zero or a transport delay adds phase lag the magnitude plot cannot show, and caps achievable loop bandwidth; do not close a loop on magnitude alone when it is flagged.

IMPORTANT — these are read from a finite sweep, so HAVE A HUMAN REVIEW them against the Bode plot (use plot_waveform on the same signal) and the circuit before acting. Closely-spaced corners merge into one range (merged: true) rather than being resolved individually, and exact pole/zero COUNTS are not guaranteed — for exact poles/zeros run a .pz analysis on ngspice. Requires a .AC run. Siblings: bode_metrics (margins / cutoffs / point queries), resonance (peaks + Q), stability_metrics (loop margins).

Inputs: signal (required), step, format, job_id, +2 more. Returns: method, signal, corners, net_order, +7 more

add_componentA

Add a new component to an .asc schematic at a specified grid position.

Inputs: x (required), y (required), path (required), symbol (required), +5 more. Returns: pins, symbol, position, rotation, +3 more

apply_schematic_opsA
Destructive

Apply many .asc edits in one transaction. Loads the schematic once, runs each op against the in-memory editor in order, and saves once at the end. Cuts the typical 25+ tool calls to build a real circuit (add_component × N + connect × N + add_net_label × N + edit_directive × N) down to a single round-trip. This is also the home for the ack-only schematic mutations that have no standalone tool — they return no geometry to act on, so they live here rather than each costing a separate tool slot.

Supported ops (each tagged via the op field): add_component, set_component_value, set_component_attribute, remove_component, move_component, add_net_label, remove_net_label, remove_wire, connect, add_directive, remove_directive.

By default, the first op that raises aborts the whole transaction and nothing is written to disk. Set stop_on_error=false to run every op and persist whatever subset succeeded — useful when each op is independent and partial progress is acceptable. Errors are recorded under each op's error field; successes carry the per-op result keys (e.g. wire_count).

Inputs: ops (required), path (required), format, dry_run, +1 more. Returns: path, saved, dry_run, results, +3 more

batch_resultsA
Read-onlyIdempotent

Query a batch simulation job (sweep or Monte Carlo). Without signal: returns job status and progress. With signal: returns aggregate statistics or per-run data for that signal.

Inputs: job_id (required), at, raw, limit, +4 more. Returns: mode, runs, stats, job_id, +12 more

bode_metricsA
Read-onlyIdempotent

AC / Bode-plot analysis in one tool, selected by mode. The response shape depends on the mode: mode='filter' — filter type, cutoffs (at ref_db below passband), passband gain/ripple, stopband rejection, transition BW, pole-order, and an auto-estimated asymptotic roll-off slope (dB/decade) — covers cutoff AND slope in one call. mode='slope' — magnitude slope (dB/decade + dB/octave) between f_low and f_high; pick endpoints ≥1 decade past any knee. Use when you need a custom window or dB/octave ('filter' already reports an auto-estimated asymptotic dB/decade slope). mode='point' — magnitude (dB + linear) and phase at each of frequencies (log-axis interpolation; out-of-range clamps + warns). mode='crossing' — every frequency where quantity crosses level (phase is UNWRAPPED first); the escape hatch for custom queries like unity-gain (0 dB) or phase-margin (-180°) frequencies.

Pass all_steps=true to compute the chosen mode for every step of a .step sweep in one call (returns a steps list instead of a single result) — e.g. the -3 dB cutoff at every value of a stepped component.

To analyze a run of a completed sweep/MC job, pass job_id + run_index instead of raw_file (combine with all_steps to also sweep the .step axis within that run).

For loop-gain stability margins use stability_metrics; for resonant peaks & Q use resonance.

Inputs: mode (required), signal (required), step, f_end, +19 more. Returns: mode, level, steps, params, +31 more

cancel_jobA
DestructiveIdempotent

Cancel a running simulation job (single run, or a sweep/Monte-Carlo batch). Kills the simulator process(es) and marks the job as cancelled.

Inputs: job_id (required).

check_jobA
Read-onlyIdempotent

Check status of a simulation job by ID, or list all jobs. Without job_id: lists active jobs (filter with status param). With job_id: returns detailed status or completion results.

Inputs: format, job_id, status. Returns: jobs, count, error, range, +23 more

component_infoA
Read-onlyIdempotent

Get a placed component's pin positions, bounding box, value, and attributes from an .asc schematic.

Inputs: path (required), reference (required), format. Returns: pins, value, symbol, position, +4 more

configure_montecarloA
Idempotent

Configure a Monte Carlo analysis with component tolerances and return a config_id for later execution.

Inputs: netlist (required), seed, mismatch, num_runs, +3 more.

configure_sweepA
Idempotent

Configure a multi-parameter sweep for a netlist and return a config_id for later execution. Dimensions combine as a full cross-product, so this also covers deterministic worst-case corner analysis (give each component a two-value [low, high] set — N parts yields 2^N corners that bound the true extremes, which random Monte Carlo cannot guarantee) and sensitivity analysis (sweep one part at a time across its tolerance to rank impact). Use configure_montecarlo instead for statistical yield/spread. NOT for a bias sweep: a native .dc Vds Vgs (e.g. a gm/ID characterization) goes in one deck + run_simulation + export_waveform, not here — this is for per-value SEPARATE runs (corners, L/W, .lib model swaps).

Inputs: netlist (required), parameters (required).

connectA

Connect two component pins with wire(s). Resolves pin positions automatically. Waypoints define the wire route through intermediate points. For a straight horizontal or vertical connection, waypoints can be omitted.

Inputs: path (required), to_pin (required), from_pin (required), waypoints. Returns: to, from, points, warnings, +2 more

create_netlistA
Destructive

Create a new SPICE netlist file from content string. Automatically appends .END if missing.

Inputs: name (required), content (required), overwrite.

create_schematicA
Destructive

Create an empty .asc schematic ready for incremental editing via add_component / connect / add_net_label. Tip: prefer create_netlist + .cir for design iteration; use this only when a visual schematic is the deliverable. Prefer apply_schematic_ops for multi-step builds (one transaction); wire signal nets with connect; label grounds — and any net a .meas/B-source references by name — via add_net_label flags at pins. Don't hand-edit the .asc. Full layout guidance: the spice://guide resource.

Inputs: name (required), width, format, height, +1 more. Returns: path, width, height

diff_circuitA
Read-onlyIdempotent

Structural diff between two circuit files: reports added/removed components, components whose value or attributes (Value2/SpiceLine/SpiceModel) changed, and added/removed .PARAM/.MEAS/.MODEL directives. Use after set_component_value, set_component_attribute or edit_directive to confirm that the intended change actually landed.

Inputs: path_a (required), path_b (required), format.

edge_metricsA
Read-onlyIdempotent

Use when you need to quantify HOW FAST one transition happened: rise time, fall time, slew rate. Inputs a transient .raw plus a time window around the edge of interest.

Returns: transition_time (10→90% by default, configurable via low_pct/high_pct), slew_rate (V/s or A/s), detected low/high levels, and the three crossing times.

Levels are auto-estimated from the first/last 10% of the window — NOT global min/max — so overshoot/undershoot doesn't poison the level estimate. Crossings are sub-sample-accurate via linear interpolation. Rejects AC analysis.

PICK THE WINDOW. If the transient has startup glitches or multiple edges, set t_start/t_end tightly around the edge you care about — otherwise you get the first edge in the full waveform, which is often the power-up artifact. Use edge_index only when multiple edges in the window are intentional.

For settling/overshoot after the edge, use pulse_response. For delay between two signals' edges, use timing_between.

Inputs: signal (required), edge, step, t_end, +10 more. Returns: signal, low_pct, high_pct, warnings, +10 more

edit_directiveA

Add or remove a SPICE directive or .asc free-text comment. Set kind=comment for annotation text; default is a SPICE directive. Works on .cir/.net and .asc; kind=comment is .asc-only. remove matches against directives AND comments, so callers can delete either kind without knowing which it is. Adding a .param is not supported here — use the 'parameter' tool to set .PARAM values.

Inputs: path (required), action (required), instruction (required), x, +3 more.

export_netlistA
DestructiveIdempotent

Export an .asc schematic to a SPICE netlist (.net) using LTspice.

Inputs: path (required).

export_waveformA

Full-fidelity waveform egress: write every sample of one or more signals to a CSV file on disk and return its path — for when you want to compute on the raw data yourself (FFT, custom metrics, cross-correlation) rather than read a scalar or a decimated envelope.

Lossless within the chosen window (no decimation — that is get_waveform's job). Works on transient (.tran), DC sweep (.dc), AC (.ac), and noise (.noise). Complex AC traces are written as magnitude(dB)+phase(deg) by default (complex_format selects re/im or both); phase is the wrapped np.angle — run np.unwrap yourself for a continuous curve. A stepped (.step / Monte-Carlo) run is written tidy/long: one row per (step, sample) with leading step_index/step_value columns, because each transient step has its own time vector. The observations list surfaces FACTS (rows written, window coverage, non-finite samples KEPT, the complex format used) — not verdicts.

Returns the CSV path plus row/column counts; read the file with your own tools. Sibling egress, don't confuse: get_waveform returns a DECIMATED envelope as numbers in your context (no file); plot_waveform renders an interactive PICTURE for a human. For a single scalar use signal_stats/query_value.

Inputs: t_end, format, job_id, out_dir, +5 more. Returns: path, columns, n_steps, signals, +6 more

find_modelA
Read-onlyIdempotent

Find model/subcircuit candidates across loaded (and optionally built-in) libraries. Default is fuzzy matching — finds typos, case variants, and near-neighbour part numbers (e.g., '2N3905' → '2N3904'); pass exact=true to only return the exact case-insensitive match. Returns ranked candidates with similarity score and an include_directive emitted in the simulator's native path form (on WSL this is the Windows path LTspice.exe expects, not the /mnt/c Linux path). Each candidate carries ports (the .SUBCKT port list, empty for .MODEL) and params (default parameter values from the body / params: clause). For .MODEL devices it also carries device_type (the SPICE device token: NPN, PNP, D, NMOS, VDMOS, NJF …) and, for recognised tokens, a usage connection-order string (e.g. Qxxx C B E <name>) — a .MODEL gives parameters but not node order, and wiring the part in the wrong order simulates silently wrong.

Inputs: name (required), full, exact, limit, +3 more. Returns: exact, query, cutoff, results, +1 more

get_waveformA
Read-onlyIdempotent

Decimated numeric egress FOR THE MODEL: returns a min/max-preserving stat-envelope of one real-valued signal as DATA in your context (numbers, not a picture) over a time/sweep/frequency window — for when a scalar isn't enough and you need the SHAPE (switching nodes, amplifier internal nodes, startup transients).

Splits the window into equal-time buckets; each bucket reports the raw sample min/max (a narrow spike or ringing peak is never averaged away), time-weighted trapezoidal mean/rms (correct on SPICE's adaptive timestep), pk_pk, and crest_factor (peak/rms — high = impulsive/spiky). Scalar-guided zoom: read the envelope, then re-request a narrower [t_start, t_end] to resolve a region at higher resolution (same call, tighter window). The observations list surfaces FACTS, not verdicts (decimation coverage, dropped non-finite samples, which bucket has the largest pk-to-pk) — you decide what the shape means.

Works on transient (.tran), DC sweep (.dc), and noise (.noise) results. Sibling egress, don't confuse: export_waveform writes EVERY sample to a CSV FILE for your own code; plot_waveform renders an interactive PICTURE for a human to look at. For complex AC data use bode_metrics; for a single scalar use signal_stats; for one point value use query_value.

Inputs: signal (required), step, t_end, format, +5 more. Returns: signal, buckets, axis_unit, decimated, +7 more

list_componentsA
Read-onlyIdempotent

List components in a circuit file, optionally filtered by type prefix, or return a single component value by reference.

Inputs: path (required), limit, format, offset, +2 more. Returns: components, pagination

list_librariesD
Read-onlyIdempotent

List loaded libraries. With detail=true, also shows the .SUBCKT and .MODEL names defined in each library (so foundry .bjt/.mod files with hundreds of .MODEL cards are discoverable without guessing), and names encrypted vendor files whose bodies can't be parsed.

Inputs: path, limit, detail, format, +1 more. Returns: libraries, pagination

load_libraryA

Load a SPICE library file (.lib, .mod) or directory of library files into the session.

Inputs: path (required).

measurement_statsA
Read-onlyIdempotent

Use to AGGREGATE .MEAS scalar results across a .step sweep or Monte Carlo run. Answers questions like 'across 100 MC trials, what's the worst-case rise time?' or 'how does gain vary as R sweeps 1k..10k?'. Inputs the .log file produced by the run.

Returns per-measurement: min, max, mean, median, std, p10, p90, min_step_index (argmin) and max_step_index (argmax), failure count, and an optional histogram (set histogram_bins=0 to skip).

Accepts any job id: a sweep/MC batch aggregates across its runs; a single-simulation job aggregates its own log (one value per step for a .step run). WHEN-style .MEAS (constant level, varying crossing) is detected the same way on both paths and swaps to aggregating the 'at' (crossing) field; the aggregated_field output says which was used. On a plain single run, stats collapse to n=1 (one value per measurement): the headline stats are the value the simulator printed — for a WHEN that's the trigger level — and any AT/crossing time is returned separately in the entry's 'at' field, so a single-run WHEN/AT read isn't lost. (simulation_summary also just reads the raw scalars.)

Works with .MEAS from any analysis type (.tran/.ac/.dc/.op) — the measurement directives themselves embed the analysis context. Pass measurement=NAME to aggregate just one; otherwise returns all .MEAS in the log.

Inputs: format, job_id, log_file, measurement, +1 more. Returns: stats, per_run

noise_integralA
Read-onlyIdempotent

Integrate a .noise spectral density to a total RMS noise over a band. SPICE stores amplitude density (V/√Hz or A/√Hz) for both LTspice and ngspice, so total = sqrt(∫ density² df) — the same value LTspice shows when you Ctrl-click a V(onoise) label. Reports the band actually integrated and the sample count. Noise figure / SNR are left to you (they need the source resistance and a reference level).

Inputs: step, f_end, format, job_id, +4 more. Returns: unit, signal, n_points, warnings, +4 more

operating_pointA
Read-onlyIdempotent

Read DC operating point data: all node voltages, branch currents, and each semiconductor's small-signal params (gm/gds/vth/vdsat/caps) — from LTspice's log (run_simulation auto-adds '.options logopinfo' on .op runs) or ngspice's @dev[param] traces, surfaced uniformly by name. Each value carries its SI unit where the simulator declared the type (see units). Pass device='M1' to get just one device's params + terminal currents in a single call.

A run-level solve failure (singular matrix / non-convergence) taints every value here; that simulator line is relayed into warnings — read it before trusting the bias point.

Inputs: at, step, device, format, +3 more. Returns: step, units, device, currents, +5 more

parameterA
Idempotent

Read, write, or delete .PARAM directive values in a circuit file. Pass delete=true with name to remove a parameter (the inverse of setting one).

Inputs: path (required), name, value, delete, +1 more. Returns: parameters

periodic_metricsA
Read-onlyIdempotent

Use for an oscillating transient signal (clock, oscillator output, switching waveform) when you need period, frequency, duty cycle, pulse widths, and period-to-period jitter.

Returns: period (mean across measured periods), frequency (1/period), jitter_rms (std-dev of period lengths — timing jitter, NOT signal amplitude variance), duty_cycle_pct, mean high/low pulse widths, edge counts. duty_cycle_pct / pulse_widths are null if no full periods could be paired. A period is the span between consecutive rising crossings, so num_periods_measured = num_rising_edges - 1 (you need N+1 edges to measure N periods).

Uses threshold crossings; threshold defaults to the midpoint of window min/max. For a signal with DC drift, set an explicit threshold — the auto midpoint moves with the drift and the edge detection gets unstable. min_periods guards against accidentally running on 1-edge windows.

Skip the startup transient via t_start/t_end; the first cycle is often wider than steady state. Rejects AC analysis. For a single edge (not periodic), use edge_metrics.

Inputs: signal (required), step, t_end, format, +6 more. Returns: period, signal, warnings, frequency, +8 more

plot_waveformA

Render an INTERACTIVE chart of one or more signals FOR A HUMAN to look at (zoom/pan/hover) — the co-design complement to the numeric tools. It returns NO data values to the model; it produces a picture.

Picks the chart from the run type: transient (V/I vs time), DC sweep, AC Bode (stacked magnitude-dB + phase-deg vs log frequency), noise (vs log frequency); a .step / Monte-Carlo run overlays every step as a labelled trace (or pass step for one). Full fidelity by default, with a min/max-preserving downsample above max_points (spikes survive; surfaced as a fact). Writes a self-contained HTML file and returns its path — into out_dir if given, else a '.ltspice-mcp/plots/' sidecar next to the circuit (for a job_id) or next to the raw (for a raw_file); on a host that supports MCP Apps the chart is also embedded as an interactive in-chat widget, otherwise it opens in your local browser.

Sibling egress, don't confuse: for numbers in your context use get_waveform (decimated); for every sample on disk use export_waveform (CSV); for a scalar use signal_stats/bode_metrics. This tool is for looking, not measuring.

Inputs: open, step, t_end, format, +8 more. Returns: path, opened, opener, panels, +11 more

pulse_responseA
Read-onlyIdempotent

Use when you need step-response quality metrics: overshoot %, undershoot %, settling time, peak value and peak time. Inputs a transient .raw covering ONE step transition — ideally with the stimulus edge near t_start and enough tail to see settling.

Returns: direction (rising/falling), initial/steady-state values, peak (absolute and pct), settling_time (to within settling_tolerance_pct band). settling_time is null in three cases, kept distinct in the text and quality flags: 'never (within window)', 'undefined (full-pulse window)', and 'unknown' when the trailing window is too noisy to trust the final value (still ringing) — pass final_value there.

Definitions: overshoot is excursion BEYOND final in the step direction; undershoot is excursion beyond initial opposite the step direction. overshoot_pct = 0 means MEASURED overdamped, not missing data. settling_tolerance_pct defaults to 2% of |final - initial|; 1% and 5% are also common.

If the auto-detected initial/final (mean of first/last 10% of window) is contaminated by ringing, pass explicit initial_value/final_value. Rejects AC analysis.

For just rise/fall time without overshoot, use edge_metrics.

Inputs: signal (required), step, t_end, format, +7 more. Returns: signal, quality, warnings, direction, +8 more

query_valueA
Read-onlyIdempotent

Look up the value of a signal at a specific time point (transient) or frequency (AC). Returns the nearest data point without interpolation.

To pick a step of a .step/.DC sweep by its axis VALUE (rather than a raw step index), pass step_axis + step_value (e.g. step_axis='temp', step_value='27'); at then selects the inner-axis point within that step (optional). AC samples also return magnitude_linear alongside magnitude_db/phase_deg.

To query a run of a completed sweep/MC job, pass job_id + run_index instead of raw_file — the run is analyzed like any standalone raw.

This is one signal at one point (signal=). For many signals, or a whole waveform over a window, use export_waveform (signals=).

If the run hit a run-level solve failure (singular matrix / non-convergence), that simulator line is relayed into warnings — the value is still returned, but the whole solve is suspect, so read it.

Inputs: signal (required), at, step, format, +5 more. Returns: axis, unit, value, signal, +12 more

read_circuitA
Read-onlyIdempotent

Read and parse a circuit file (.cir/.net or .asc). For netlists: returns content and component values. For schematics: returns layout and directives.

Inputs: path (required), format. Returns: file, type, wires, labels, +4 more

recentA
Read-onlyIdempotent

Call on session start to find circuits the user was last working with, including jobs that were still running when the server stopped. Needs no inputs.

Returns a list of recent circuits, each with its absolute path, whether the file still exists, last-touched timestamp, total persisted job count, status_counts (completed/failed/interrupted/etc.), and the IDs of any interrupted jobs.

'interrupted' means a simulation was in flight when the server stopped — recovery path is check_job(job_id) to see whether results are recoverable or the run needs to be re-kicked. Does NOT start or cancel anything; purely read-only.

Inputs: format. Returns: count, circuits

reset_schematicA
DestructiveIdempotent

Revert an .asc schematic to the state it had BEFORE the first edit this session — a recovery escape hatch for when a sequence of edits went wrong. The server snapshots each .asc file's bytes just before its first in-session mutation (add_component, set_component_value, move_component, connect, apply_schematic_ops, etc.); this restores that snapshot exactly and drops it (so a later edit establishes a fresh restore point). Because add_component is a trigger, the first add_component on a freshly created schematic snapshots the empty file — so reset can revert all the way back to the empty post-create state, dropping every component added this session. Returns reverted=false (not an error) when the file has no recorded in-session edits. Note: the snapshot lives only for the current server session — it does not persist across restarts, and it is not a substitute for version control.

Inputs: path (required), format. Returns: path, bytes, reverted

resonanceA
Read-onlyIdempotent

Detect magnitude peaks in an AC sweep and estimate Q factor + -3 dB bandwidth for each. Useful for RLC resonators, crystal oscillators, peaking amps, or any response with distinct resonant modes.

Q = f_peak / Δf(-3 dB from peak). Q is returned as null for peaks without two flanking -3 dB crossings inside the swept range — widen the sweep if you need Q for a boundary peak.

min_prominence_db=3 rejects the gentle hump of a filter's passband (which isn't a resonance). Tight resonances (Q > 30) need dense sampling near f_peak — log sweeps with <50 pts/decade will under-sample the peak and give inflated Q/bandwidth.

For overall filter characterization use bode_metrics(mode='filter'); for stability margins use stability_metrics.

Inputs: signal (required), step, format, job_id, +5 more. Returns: peaks, signal, warnings, num_peaks_detected

run_montecarloA

Execute a previously configured Monte Carlo analysis asynchronously and return a job_id immediately.

Inputs: config_id (required), max_parallel.

run_simulationA

Run a SPICE simulation on a netlist file. Sets the right batch flags, handles the ngspice headerless-raw dialect, routes the raw/log artifacts, and parses the results — so you never hand-parse a rawfile. Automatically runs synchronously for short simulations (<=30s timeout) or asynchronously for longer ones. Use wait=true to force synchronous execution. Returns raw/log file paths and simulation summary on completion, or a job ID for async tracking.

Inputs: netlist (required), wait, format, timeout. Returns: error, range, errors, job_id, +16 more

run_sweepA

Execute a previously configured parameter sweep asynchronously and return a job_id immediately.

Inputs: config_id (required), max_parallel.

server_statusA
Read-onlyIdempotent

Get comprehensive server status including detected simulators, configuration settings, security sandbox paths, and runtime state. Use this to check what capabilities are available before attempting operations.

Inputs: format. Returns: runtime, simulators, tool_count, diagnostics, +6 more

set_component_valueA
Idempotent

Set component value(s) in a circuit file (single or batch mode), or rewrite one component's node connectivity ('nodes', single mode, .cir/.net only). A no-op value write is reported as unchanged.

Inputs: path (required), nodes, value, values, +1 more.

signal_statsA
Read-onlyIdempotent

Scalar summary of one signal in a .raw result. Use this when you need a single number per metric (average, RMS, peak, etc.) — not a waveform or a trend.

Transient: time-weighted mean, RMS, std, abs-mean, and min/max/pk-pk using trapezoidal integration (RMS = sqrt(∫ y² dt / T)). This is correct on SPICE's adaptive timestep — simple np.mean(y) would overweight densely sampled regions. Optionally restrict to [t_start, t_end]; passing no window averages the whole waveform including any startup transient, which is usually wrong for RMS/mean.

DC: returns min/max/pk-pk and the simple/abs mean over the swept axis, plus sweep_start_used/sweep_end_used/sweep_span. RMS and std are deliberately omitted — they're meaningless on a non-time axis. Use t_start/t_end to restrict the sweep range.

AC: returns magnitude (dB) min/max/mean and phase (deg) min/max. t_start/t_end are rejected for AC — use query_value for a point at a specific frequency.

Noise: returns min/max/pk-pk of the noise spectral density over the frequency axis, plus freq_start_used/freq_end_used. Mean, RMS, std, and duration are omitted — a plain mean of spectral density is dominated by sample clustering and the sweep span, not the circuit; min/max is the useful worst-case reading. t_start/t_end are rejected — pass them via query_value at specific frequencies instead.

Related tools: for rise/fall times use edge_metrics; for overshoot/settling use pulse_response; for period/duty use periodic_metrics; to aggregate .MEAS values across a sweep use measurement_stats.

Inputs: signal (required), step, t_end, format, +4 more. Returns: max, min, rms, std, +20 more

simulation_summaryA
Read-onlyIdempotent

Get a comprehensive simulation summary including type, signal list, data size, .MEAS results, Fourier analysis, AC bandwidth metrics, and warnings.

Inputs: step, format, job_id, signal, +3 more. Returns: range, errors, fourier, signals, +9 more

stability_metricsA
Read-onlyIdempotent

Find EVERY unity-gain and -180° phase crossover in a loop-gain AC sweep, report phase margin at each unity-gain crossing and gain margin at each -180° crossing. Replaces the single-crossing approximation in simulation_summary, which returns wrong margins on conditionally-stable systems.

Run this on a LOOP-GAIN signal (typically a dedicated middlebrook probe or .AC of the open loop). Running on a closed-loop output gives meaningless margins — if the DC phase starts near ±180° (a closed-loop / inverting output rather than a loop probe, which starts near 0°), a warning says so in warnings.

Returns: dc_gain_db, high_freq_gain_db, stability classification (stable / unstable / conditional / unconditional / always_below_unity), all crossings, per-crossing margins, and the worst-case values.

Nuances:

  • Phase is UNWRAPPED first, so systems whose phase drops past -360° are handled correctly (otherwise the raw wrap hides the crossing).

  • If phase NEVER crosses -180°, gain margin is 'infinite' (returned as null with stability='unconditional'). That's stable, not an error.

  • If gain NEVER reaches unity, phase margin is undefined (returned as null with stability='always_below_unity').

  • Multiple crossovers trigger stability='conditional' and a warning — each one needs its own review.

For -3 dB filter cutoffs use bode_metrics(mode='filter'); for custom crossings use bode_metrics(mode='crossing').

Inputs: signal (required), step, format, job_id, +3 more. Returns: signal, warnings, stability, dc_gain_db, +7 more

symbol_infoA
Read-onlyIdempotent

Get symbol pin positions, bounding box, and description. Optionally compute absolute positions for a given placement and rotation.

Inputs: symbol (required), x, y, format, +1 more. Returns: name, pins, placement, bbox_width, +4 more

thdA
Read-onlyIdempotent

Total harmonic distortion (THD and THD+N) of a periodic transient signal via FFT — works on any .tran result without a .four directive in the deck, and on any simulator. Defaults to COHERENT sampling (record trimmed to whole fundamental cycles, rectangular window) so harmonics land exactly on bins and THD is exact; window='hann' is the approximate fallback. Surfaces every condition the number depends on: the fundamental (given vs auto-detected), window kind, cycles analyzed, FFT length, sample rate, and per-harmonic levels. For LTspice's own .four result instead, see simulation_summary's Fourier section.

Inputs: signal (required), step, t_end, format, +7 more. Returns: fs_hz, n_fft, signal, thd_db, +12 more

timing_betweenA
Read-onlyIdempotent

Use when you need propagation delay / skew between TWO signals — e.g. input-to-output delay, clock-to-Q, input-skew. Inputs one transient .raw containing both signals on a shared time axis.

Returns: signed delay = t_b - t_a where t_a and t_b are the FIRST threshold crossings of signal_a and signal_b in the window. Negative delay means signal_b leads signal_a.

Thresholds default to 50% of EACH signal's own min-max range in the window — intentional for asymmetric CMOS where V_in and V_out have different rails. Override per-signal via threshold_a / threshold_b if you need absolute thresholds (e.g. VIH/VIL at fixed voltages). Set direction_a / direction_b independently (e.g. rising input → falling output for an inverter).

Picks only the FIRST crossing of each signal in the window — if both signals have multiple edges, tighten t_start/t_end around the specific edge pair you want. Rejects AC analysis.

Inputs: signal_a (required), signal_b (required), step, t_end, +10 more. Returns: t_a, t_b, delay, signal_a, +8 more

trace_netA
Read-onlyIdempotent

Report everything electrically connected to a net: starting from a pin ('Ref.Pin'), a net label ('net:NAME'), or an (x,y) coordinate, return the net's labels and every component pin, FLAG, and wire vertex on it. Follows both wires (segment-aware — catches labels placed mid-wire) and same-name FLAGs (LTspice's name-based nets). Use it to answer 'what's on net X', to confirm a connect landed, or to spot an accidental short (a net carrying two different non-ground labels).

Inputs: path (required), x, y, pin, +1 more. Returns: pins, start, labels, is_shorted, +1 more

unload_libraryA
Idempotent

Unload a previously loaded library from the session.

Inputs: path (required).

validate_netlistA
Read-onlyIdempotent

Lint a netlist or schematic before simulation — the static circuit check gate. Catches: empty/whitespace-only netlist files, element arity (too few nodes, missing E/G/F/H/B value), dangling nodes in .cir/.net netlists (a node touching only one element terminal — warning, since deliberate fragments are legal), bias-topology degeneracies in .cir/.net netlists (a net with no DC path to ground — floating MOSFET gate, capacitive island, current-source-only node, or isolated domain — warning, since the operating point may still be defined by other means), duplicate/multiple analysis directives ('More than one analysis specified'), .MEAS whose analysis kind isn't present, known-bad .MEAS patterns (vdb()/phase()/group_delay()), and directives the LTspice runner is known to reject (set target_simulator='ngspice' to instead flag ngspice-only incompatibilities, e.g. a zero '.tran' step time). On .asc, also surfaces named-net shorts, floating pins, and dangling labels. Returns a structured issue list; an empty list means the file passes the static gate. Note: value tokens (e.g. a typo'd '1kk') and undefined model references are NOT checked — LTspice coerces or resolves those at run time.

Inputs: path (required), format, target_simulator. Returns: file, issues, issue_count

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 49 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes, with detailed cross-referencing that resolves potential confusion (e.g., get_waveform vs export_waveform vs plot_waveform). A few overlaps exist—such as run_sweep/run_montecarlo and the various AC analysis tools—but the descriptions explicitly delineate when each should be used.

    Naming Consistency4/5

    All tool names follow a snake_case convention with a mostly verb_noun pattern (run_simulation, list_components, set_component_value). A few names are nouns or adjectives (resonance, operating_point, recent, parameter), but the overall style is consistent and readable.

    Tool Count2/5

    49 tools is a very large surface for an MCP server, exceeding the 25+ threshold where coherence tends to degrade. While the domain is broad (simulation, analysis, schematic editing, libraries), the sheer number makes navigation and selection harder.

    Completeness5/5

    The tool set covers the full LTspice workflow: circuit creation/editing, netlist validation, simulation execution (single, sweep, Monte Carlo), job management, comprehensive signal analysis (time/frequency/AC/noise), and library management. There are no obvious dead ends; every core operation has a corresponding tool.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      AI-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.
      28
      107 PyPI
      51
      GPL 3.0
    • F
      license
      C
      quality
      C
      maintenance
      MCP server for automating LTspice on macOS, enabling simulation, schematic generation, data extraction, verification, and rendering via natural language or agents.
      71
      22
      -
    • A
      license
      A
      quality
      B
      maintenance
      An MCP server that connects LLM assistants to real circuit simulation: LTspice and ngspice, plus direct editing of LTspice .asc schematics. Simulation results come back as structured numbers so the assistant can design, verify, and iterate on circuits.
      48
      594 PyPI
      89
      GPL 3.0