Allows installation of the CircuitMCP package directly from GitHub using UVX
Supports running the CircuitMCP server on Linux systems with automated setup scripts and package installation
Supports running the CircuitMCP server on macOS with automated setup scripts and package installation through Homebrew
References NGSpice downloads from SourceForge for Windows users who need to install the required simulation dependency
Provides specific installation instructions for the NGSpice dependency on Ubuntu systems using apt-get
CircuitMCP
Circuit simulation capabilities exposed through Anthropic's Model Context Protocol (MCP).
Overview
This project implements an MCP server for circuit simulation, allowing AI assistants to create, modify, and simulate electronic circuits. It uses PySpice for simulation and SchemDraw for generating schematic diagrams.
Features
Circuit Creation: Create circuits with various electronic components
Component Management: Add, remove, and update components
Circuit Simulation: Run operating point, DC, AC, and transient analyses
Schematic Generation: Generate visual representations of circuits
UVX Components: Support for Universal Verification Xcomponents (op-amps, etc.)
Installation
Quick Setup (Recommended)
We provide setup scripts that handle all installation steps automatically:
Linux/macOS:
./setup_circuitmcp.sh
Windows (CMD):
setup_circuitmcp.bat
Windows (PowerShell):
.\setup_circuitmcp.ps1
These scripts will:
Install required dependencies
Install NGSpice (or guide you through installation)
Set up a virtual environment (if desired)
Install CircuitMCP
Configure UVX for Cursor and Claude Desktop integration (if available)
Using UVX in Cursor or Claude Desktop
The easiest way to install CircuitMCP is using UVX directly in Cursor or Claude Desktop:
Claude Desktop Integration
To use CircuitMCP with Claude Desktop:
Install the UVX package:
uvx install circuitmcpCreate an MCP configuration file (
mcp_config.json
):{ "servers": [ { "name": "Circuit Simulator", "command": ["circuitmcp-server", "--host", "127.0.0.1", "--port", "8000"] } ] }Start Claude Desktop with MCP configuration:
claude-desktop --mcp-config=mcp_config.jsonIn Claude Desktop, you can now use circuit simulation capabilities:
Please create a simple voltage divider circuit with a 9V source and two 10kΩ resistors.
Manual Installation
You can also install manually:
Clone the repository:
git clone https://github.com/amzsaint/circuitmcp.git cd circuitmcpInstall Python dependencies:
pip install -r requirements.txtInstall the package in development mode:
pip install -e .Install NGSpice (required for simulation):
macOS:
brew install ngspice
Ubuntu:
apt-get install ngspice
Windows: Download from the NGSpice website
Usage
Running the Server
Or in Python:
Client Example
Cursor Integration
When installed via UVX, CircuitMCP can be used directly in Cursor:
Open Cursor and type
/install circuitmcp
or/install git+https://github.com/amzsaint/circuitmcp.git
Use the package in your Python code:
from circuitmcp import mcp, CircuitRun the server with
/run circuitmcp-server
Testing
Run the test script to verify functionality:
Project Structure
circuitmcp/
: Main packagemcp_server.py
: MCP server implementationcircuit.py
: Circuit class implementationmock_mcp.py
: Mock MCP SDK implementationtest_mcp.py
: Test script
examples/
: Example client and usageschematics/
: Generated circuit schematics
License
MIT
Note on NGSpice
This project requires NGSpice to be installed on your system for simulation capabilities. The schematic generation will work without NGSpice, but simulation features will be unavailable.
This server cannot be installed
An MCP server that allows AI assistants to create, modify, and simulate electronic circuits with features for circuit creation, component management, simulation analyses, and schematic generation.
Related MCP Servers
- -securityAlicense-qualityAn enhanced MCP server that grants AI assistants the ability to execute terminal commands on a user's system with improved security controls, designed for use in controlled environments.Last updated -MIT License
- AsecurityFlicenseAqualityAn MCP server that allows AI models to execute system commands on local machines or remote hosts via SSH, supporting persistent sessions and environment variables.Last updated -12924
- -securityAlicense-qualityAn MCP server that bridges AI agents with GUI automation capabilities, allowing them to control mouse, keyboard, windows, and take screenshots to interact with desktop applications.Last updated -9MIT License
- AsecurityFlicenseAqualityAn MCP server that supercharges AI assistants with powerful tools for software development, enabling research, planning, code generation, and project scaffolding through natural language interaction.Last updated -113978