circuitjs-mcp
Click on "Install 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., "@circuitjs-mcpBuild a 1kΩ/1µF RC low-pass and simulate its response to a 1kHz square wave for 5ms"
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.
circuitjs-mcp
An MCP server that lets AI agents operate the Falstad CircuitJS1 circuit simulator. Since it is a standard stdio MCP server, it works with any MCP-compatible client, including Claude Code, Codex CLI, Claude Desktop, and Cursor.
CircuitJS1 is the name of the HTML5/JavaScript version of Paul Falstad's circuit simulator—long familiar as the Java applet version, "Circuit Simulator Applet", and now running in the browser at falstad.com/circuit. When browsers discontinued Java applet support, Iain Sharp ported it to JavaScript with GWT; both the simulation engine and the circuit text format are shared with the applet version (circuit files from the applet era can be loaded as-is). The JavaScript interface this server uses is a feature added in CircuitJS1 and is not present in the applet version.
The server launches the compiled CircuitJS1 web app (bundled in webapp/, works offline) inside headless Chromium (Playwright) and exposes its JavaScript interface as MCP tools. Simulator state persists across tool calls, so you can interactively load a circuit → run it → take measurements → rewrite the circuit.
Setup
Prerequisites: Node.js 18 or later.
cd circuitjs-mcp
npm install # postinstall で Playwright の Chromium も入ります
npm test # スモークテスト(RC回路の過渡応答が理論値と一致するか等を検証)If playwright install chromium is difficult in your environment, you can use an existing Chrome/Chromium:
export CIRCUITJS_CHROMIUM="/usr/bin/google-chrome" # 例Related MCP server: circuit-sim-mcp
Registering with MCP cliients
The launch command is the same for every client: node /絶対パス/circuitjs-mcp/server.mjs
Adding the environment variable CIRCUITJS_HEADFUL=1 displays the browser window, allowing a human to operate the same simulator directly alongside the agent (collaboration mode). All examples below include this variable; remove it if not needed.
Claude Code:
claude mcp add circuitjs -e CIRCUITJS_HEADFUL=1 -- node /絶対パス/circuitjs-mcp/server.mjsCodex CLI:
codex mcp add circuitjs --env CIRCUITJS_HEADFUL=1 -- node /絶対パス/circuitjs-mcp/server.mjsClients that use config files (Claude Desktop's claude_desktop_config.json, Cursor's mcp.json, etc.):
{
"mcpServers": {
"circuitjs": {
"command": "node",
"args": ["/絶対パス/circuitjs-mcp/server.mjs"],
"env": { "CIRCUITJS_HEADFUL": "1" }
}
}
}The screenshot tool returns a PNG as MCP image content. On clients that do not support image display, save it to a file with the save_path argument instead.
List of tools
Tool | Description |
| Loads a circuit in Falstad text format (with validation). Returns the element list |
| Gets the time, voltage differences / currents / terminal voltages of all elements, and voltages of labeled nodes |
| Runs for the specified simulation time and returns sampled time series from probes (node voltages, element current/voltage/power) |
| run / stop / reset / status, maximum timestep setting, and value setting for external voltage sources |
| Exports the circuit in Falstad text or SVG |
| Generates a URL ( |
| PNG screenshot of the current schematic (returned as an image; can also be saved to a file) |
| Escape hatch for operations not covered above. Executes arbitrary JS on the |
Usage examples (sample instructions for an agent)
"Build an RC low-pass filter with 1kΩ and 1µF, feed it a 1kHz square wave, and capture the output waveform for 5ms."
"Load this circuit (paste the text) and list the power dissipation of each resistor."
"Show me a screenshot of the circuit."
To measure a point of interest, place a labeled node (element type 207, e.g. 207 336 128 400 128 4 out); the voltage can then be read with a {"node":"out"} probe or via circuit_state's nodes. For per-element current and voltage, use the index returned by circuit_load / circuit_state.
Direct use from scripts
If you want to call the tools from a script without going through an MCP client, use drive.mjs. It starts the server as a child process, executes the JSON files placed in the command directory (cmd-1.json, cmd-2.json, ...) in order, and writes the results to res-N.json:
node drive.mjs /tmp/cjs-commands
# 別プロセスから: echo '{"tool":"circuit_state","args":{}}' > /tmp/cjs-commands/cmd-1.jsonWrite files under a temporary name and then rename them into place (to avoid reading them mid-write).
Environment variables
Variable | Description |
| Path to the Chrome/Chromium executable to use (default: Playwright-managed Chromium; falls back to system Chrome if it fails) |
| URL of a CircuitJS1 web app to load instead of the bundled one (e.g., |
| Set to |
Limitations
The simulation speed of
run_transientdepends on the simulation speed setting in the circuit's$line and on the CPU. If it takes too long in wall-clock time, it is cut off bywallTimeoutMsand partial data is returned (distinguishable via thereasonfield)."Editing" a circuit basically means rewriting the Falstad text and calling
circuit_loadagain (importing resets the time).Transient analysis only (CircuitJS1 itself does not have AC small-signal analysis, etc.). Frequency response can be obtained by sweeping the frequency and repeating
run_transient.
License
This entire repository is provided under GPL-2.0-or-later (COPYING.txt).
CircuitJS1 is GPLv2+ software by Paul Falstad / Iain Sharp.
webapp/is its compiled build (unmodified); the corresponding source code is available at pfalstad/circuitjs1 (the original) and thepagesbranch of code4fukui/circuitjs1 (where this build was obtained).Server code (
server.mjs,drive.mjs,test-client.mjs) © 2026 Suzu(涼鈴), GPL-2.0-or-later.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Create and manage Mermaid.js flowcharts and diagrams with AI agents via MCP.
MCP tools for AI agents: render URLs to image/PDF, check link health, convert HTML/CSV/JSON.
Build, validate, and manage API simulations in WireMock Cloud from MCP-compatible AI agents.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceGenerates, simulates, and inspects LTspice circuits via MCP tools and resources, providing structured JSON interfaces for AI agents.MIT
- FlicenseNot gradedqualityFmaintenanceProvides circuit simulation capabilities via MCP, enabling creation, simulation (DC, AC, transient), and analysis of electronic circuits using PySpice.
- AlicenseNot gradedqualityBmaintenanceEnables MCP-compatible agents to generate Qucs circuit schematics, run simulations, and parse results programmatically.MIT
- AlicenseAqualityBmaintenanceMCP server for Micro-Cap 12 SPICE simulator enabling LLM agents to run analog circuit simulations, including analyses, sweeps, and retrieval of curve data and plots.201MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Suzu-Gears/circuitjs-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server