Schemdraw MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Schemdraw MCP Server Create an RC circuit with a 1kΩ resistor and 100µF capacitor"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Schemdraw MCP Server
回路図描画ライブラリ schemdraw のための Model Context Protocol (MCP) サーバーです。Claude や他の AI アシスタントが電子回路図を作成・編集できるようになります。
🌟 機能
回路図作成: 基本的な電子回路素子(抵抗、コンデンサ、ダイオード等)の配置
自動レイアウト: コンポーネント間の接続と最適な配置
多様な出力形式: PNG、SVG、PDF 形式での回路図出力
柔軟な構成: シンプルな回路からループ回路まで対応
リアルタイム編集: 回路の動的な変更と更新
Related MCP server: code-mcp
📋 必要条件
Python 3.10+
uv (推奨) または pip
🚀 インストール
uv を使用(推奨)
# プロジェクトのクローン
git clone https://github.com/fukayatti/schemdraw-mcp-server.git
cd schemdraw-mcp-server
# 依存関係のインストール
uv sync
# 開発用依存関係も含める場合
uv sync --all-extraspip を使用
# プロジェクトのクローン
git clone https://github.com/fukayatti/schemdraw-mcp-server.git
cd schemdraw-mcp-server
# インストール
pip install -e .
# 開発用依存関係も含める場合
pip install -e ".[dev]"🔧 使用方法
1. MCP サーバーとして起動
# 標準入出力で MCP サーバーを起動
uv run python server.py
# または JSON-RPC over stdio で起動
python server.py --stdio2. Claude Desktop での設定
claude_desktop_config.json ファイルに以下を追加:
{
"mcpServers": {
"schemdraw": {
"command": "uv",
"args": ["run", "python", "/path/to/schemdraw-mcp-server/server.py"],
"cwd": "/path/to/schemdraw-mcp-server"
}
}
}3. 基本的な使用例
Claude で以下のようにリクエストできます:
抵抗とコンデンサと LED を使ったシンプルな回路図を作成してください
🛠️ 開発
開発環境セットアップ
# 開発用依存関係のインストール
uv sync --all-extras
# コードフォーマット
uv run black .
uv run isort .
# リントチェック
uv run flake8 .
uv run mypy .
# テスト実行
uv run pytest📚 サポートされる回路素子
基本素子
resistor- 抵抗器capacitor- コンデンサinductor- インダクタdiode- ダイオード
電源
voltage_source- 電圧源current_source- 電流源battery- バッテリー
半導体
bjt_npn- NPN バイポーラトランジスタbjt_pnp- PNP バイポーラトランジスタmosfet_n- N-ch MOSFETmosfet_p- P-ch MOSFET
演算増幅器
opamp- オペアンプ
ロジックゲート
and_gate- AND ゲートor_gate- OR ゲートnot_gate- NOT ゲートnand_gate- NAND ゲートnor_gate- NOR ゲートxor_gate- XOR ゲート
その他
ground- グラウンドvdd- 電源vss- 負電源label- ラベル
🔌 提供される MCP ツール
create_circuit
新しい回路図を作成します。
パラメータ:
title(オプション): 回路図のタイトルsize(オプション): [幅, 高さ] の配列
add_component
回路に素子を追加します。
パラメータ:
component_type(必須): 素子のタイプcomponent_id(必須): 素子の識別子label(オプション): 素子のラベルvalue(オプション): 素子の値direction(オプション): 配置方向 (right,left,up,down)position(オプション): [x, y] 座標
connect_components
素子間を接続します。
パラメータ:
from_component(必須): 接続元の素子 IDto_component(必須): 接続先の素子 IDconnection_type(オプション): 接続タイプ (wire,dot)
create_loop_circuit
ループ回路を作成します。
パラメータ:
components(必須): コンポーネントのリストsize(オプション): 回路の一辺の長さ
save_circuit
回路図を保存します。
パラメータ:
filename(必須): 保存ファイル名format(オプション): 出力形式 (png,svg,pdf)dpi(オプション): 解像度
get_circuit_info
現在の回路図の情報を取得します。
list_available_components
利用可能な素子タイプの一覧を取得します。
add_spacer
コンポーネント間にスペースを追加します。
optimize_layout
回路図のレイアウトを最適化します。
📸 使用例
シンプルな RC 回路
Claude への指示例:
抵抗(1kΩ)とコンデンサ(100µF)を直列に接続した RC 回路を作成してください
この指示により、以下のような回路図が生成されます:
[電源] ――[R1: 1kΩ]――[C1: 100µF]――[GND]⚙️ 設定
環境変数
SCHEMDRAW_DPI: デフォルトの出力解像度 (デフォルト: 150)SCHEMDRAW_FORMAT: デフォルトの出力形式 (デフォルト: svg)
🤝 コントリビューション
このリポジトリをフォーク
フィーチャーブランチを作成 (
git checkout -b feature/amazing-feature)変更をコミット (
git commit -m 'Add some amazing feature')ブランチにプッシュ (
git push origin feature/amazing-feature)プルリクエストを作成
📝 ライセンス
このプロジェクトは MIT ライセンスの下で公開されています。詳細は LICENSE ファイルを参照してください。
🙏 謝辞
schemdraw - 優れた回路図描画ライブラリ
Model Context Protocol - AI との統合を可能にするプロトコル
📞 サポート
問題や質問がある場合は、Issues でお知らせください。
Available Tools
9 toolsadd_componentC
回路図にコンポーネントを追加
Inputs: component_id (required), component_type (required), label, value, +2 more.
add_spacerC
コンポーネント間にスペースを追加して文字の重複を防ぐ
Inputs: length, direction.
connect_componentsC
コンポーネント間を接続
Inputs: to_component (required), from_component (required), connection_type.
create_circuitC
新しい回路図を作成
Inputs: size, title.
create_loop_circuitB
指定されたコンポーネントで四角形の閉回路を作成
Inputs: components (required), size.
get_circuit_infoC
現在の回路図の情報を取得
Inputs: no named parameters.
list_available_componentsA
利用可能なコンポーネントタイプの一覧を取得
Inputs: no named parameters.
optimize_layoutA
回路図のレイアウトを最適化して文字の重複を防ぐ
Inputs: no named parameters.
save_circuitB
回路図を画像ファイルとして保存
Inputs: filename (required), dpi, format.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool has a clearly distinct purpose: adding components, spacing, connecting, creating circuits, loops, info, listing components, optimization, and saving. No overlap.
All tool names follow a consistent verb_noun snake_case pattern (e.g., add_component, connect_components, optimize_layout).
9 tools is well-scoped for a circuit schematic server, covering creation, editing, layout, and saving without being excessive or insufficient.
Core operations are present, but missing essential features like deleting components, disconnecting, or editing properties, which limits the tool's completeness for a full circuit editor.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Draw architecture diagrams, UML, planning boards and clickable wireframes from your AI assistant.
CAD in ChatGPT and Claude: editable parts, STEP/STL/drawings, in-chat 3D, automatic checks.
Turn datasheets into source-backed JSON contracts, pinout matrices, and KiCad CAD for AI agents.
Related MCP Servers
- AlicenseBqualityBmaintenanceEnables AI agents to programmatically create, modify, and analyze Draw.io diagrams through the Model Context Protocol. Supports generating architectural diagrams, flowcharts, and visualizations with bidirectional communication between AI systems and Draw.io.131,500MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude AI to run terminal commands, perform file operations, and manage git in a project directory via the Model Context Protocol.38MIT
- AlicenseNot gradedqualityFmaintenanceEnables language-model agents to create, modify, analyze, and persist process-engineering diagrams (P\&IDs and flowsheets) in machine-readable formats via the Model Context Protocol.5MIT
- AlicenseCqualityDmaintenanceEnables AI models to create and manage various types of diagrams (flowcharts, UML, network diagrams, etc.) via the Model Context Protocol.266MIT