Qucs-S MCP Server
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.
qucs-s-mcp
AIエージェントから回路シミュレーター Qucs-S(計算エンジン: ngspice)を操作するための MCP サーバーです。 回路図(.sch)の作成・編集、自動配線、レイアウト検査と整頓、スナップショット撮影、ngspice シミュレーション、結果グラフ、報告用レポート画像の作成までを MCP ツールとして提供します。

特長
Qucs-S 本来の見た目でスナップショット —
qucs-s --printの SVG 出力を座標校正し、白背景・高解像度 PNG に描き直します。生成した PNG は MCP の画像コンテンツとして返るので、AI の Vision にそのまま渡せます。推論用のオーバーレイ: 10/50 単位グリッドと座標ルーラー、ネットの色分けと名前タグ、ピン位置、問題箇所の番号付きマーカー、ハイライト、領域/部品へのズーム
ユーザー報告用:
grid=false, rulers=falseのクリーン画像、回路図+グラフをまとめたcreate_report
整頓のための道具一式
connect: シンボルを避け、他ネットと重ならない直交配線を A* で自動生成(曲がり・交差を最小化)check_layout: 未接続ピン、見た目は繋がっているが Qucs-S では接続されない「配線の途中に乗ったピン」、部品の重なり、シンボルを貫く配線、文字と配線・部品の重なり、グリッド外れ、斜め配線などを検出し、配線長・曲がり数・交差数のメトリクスも返しますtidy_schematic: グリッド吸着、配線の結合・重複削除、部品ラベル/ネットラベルの空き位置への再配置、シミュレーションブロックの整列、全配線の引き直しmove_components: 部品を動かすと接続配線を自動で引き直します
部品データベース — インストール済み Qucs-S から 220 種のコンポーネント(プロパティ名・既定値・説明、ピン座標、シンボル外形)を自動抽出。ピン座標はネットリスト生成による実測で、回転・ミラーも Qucs と一致することを確認済み。ライブラリ部品(
Lib)とサブ回路(Sub)はピンを動的に計測します。ngspice シミュレーション — Qucs-S 自身にネットリストを生成させ (
qucs-s -n --ngspice)、ngspice をバッチ実行。OP/DC スイープ/AC/過渡/パラメータスイープなどの結果(ASCII/バイナリ raw)を解析し、要約・補間値・表・Bode 線図などで返します。パラメータスイープは各ステップにパラメータ値が付き、plot_results("tr1")で全ステップを1枚に重ねて描けます。export_resultsで全点を CSV / JSON に書き出せます(複素数はreal_imag/mag_phase/db_phaseから選択)。
Related MCP server: multisim-mcp
必要環境
Windows / Linux(Windows 11 + Qucs-S 26.1.1 + ngspice 45.2 で確認)
Qucs-S —
C:\Program Files\Qucs-Sか PATH 上。別の場所なら環境変数QUCS_S_PATHngspice —
ngspice_conを PATH、C:\Spice64\bin、または Qucs-S 同梱のものを自動検出。指定はNGSPICE_PATHuv(Python 3.12+)
セットアップ
git clone <このリポジトリのURL> qucs-s-mcp
cd qucs-s-mcp
uv syncClaude Code
このリポジトリには .mcp.json が含まれているので、このフォルダで Claude Code を開けば qucs-s サーバーが使えます。別のプロジェクトから使う場合:
claude mcp add qucs-s -- uv --directory <qucs-s-mcp のパス> run qucs-s-mcpClaude Desktop など
{
"mcpServers": {
"qucs-s": {
"command": "uv",
"args": ["--directory", "<qucs-s-mcp のパス>", "run", "qucs-s-mcp"],
"env": { "QUCS_MCP_WORKDIR": "<回路図の保存先フォルダ>" }
}
}
}QUCS_MCP_WORKDIR は相対パスで new_schematic したときの保存先です(既定はカレントの qucs_mcp_work/)。
ツール一覧
分類 | ツール |
ファイル |
|
部品 |
|
編集 |
|
配線 |
|
シミュレーション |
|
見る・整える |
|
座標系は Qucs と同じ(x 右向き、y 下向き、10 単位グリッド)。ピンは "R1.1", "Q1.B", "OP1.OUT", "V1.+" のように指定します。編集は即座に .sch に保存されるので、open_in_qucs_s で Qucs-S の GUI にそのまま開けます。
推奨ワークフロー(エージェント向け)
new_schematic→add_components(信号は左→右、電源は上、GND は下、縦置きはrotation: 90)connectで自動配線、観測したいノードにadd_net_label(結果ではv(<label>))add_simulation(tran/ac/dc/sweep/noise…)snapshot(nets=true, issues=true)で画像を見て確認 →tidy_schematic/move_components/reroute_wires→ 再度snapshotrun_simulation→get_results(要約・指定点の値)/export_results(全点を CSV/JSON)/plot_resultscreate_reportでユーザー向けのまとめ画像
仕組みのメモ
Qucs-S の CLI 印刷モードは Qucsator 用の部品しか読めないため、
SpicePar/NutmegEqなどの SPICE 専用ブロックは、印刷時のみ同じ文字列を表示する式ブロックに差し替えて描画します(保存ファイルは変更しません)。スナップショットの座標は、印刷前に既知座標へ校正用の線を一時的に挿入し、SVG 内での位置からアフィン変換を求めて対応させています。返却メタデータの
coordinate_mappingでピクセル⇔回路座標を変換できます。部品 DB は
uv run python tools/build_component_db.pyで再生成できます(Qucs-S を更新したとき。約 3〜4 分)。
テスト
uv run pytest -q tests/test_core.py
uv run python tests/e2e_inverting_amp.py # 回路を一から組んで整頓・シミュレーション・レポートまで
uv run python tests/test_stdio_client.py # 実際の MCP クライアントとして stdio 経由で呼び出しライセンス
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.
Turn datasheets into source-backed JSON contracts, pinout matrices, and KiCad CAD for 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.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables MCP-compatible agents to generate Qucs circuit schematics, run simulations, and parse results programmatically.2MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to automatically generate Multisim circuits, run simulations, extract experimental data, and export circuit diagrams, CSV, waveforms, and lab reports.44MIT
- FlicenseBqualityCmaintenanceEnables AI agents to create and edit real KiCad schematics and projects, run ERC/DRC validation, generate BOMs, and produce schematic/PCB/3D renders via kicad-cli, with SKiDL support and automatic backups.28-
- AlicenseNot gradedqualityCmaintenanceEnables agents to create, read, update, and validate editable analog/RF circuit schematic projects (including a five-transistor OTA template), wiring and moving components by pin name, running topology checks, exporting SVG or SPICE/Spectre netlists and normalized JSON, and opening the browser editor with a project loaded. It also exposes the component library's exact pins and defaults so drawings stay netlist-correct.MIT