mcpField
A
analog-circuit-simulate-mcp-server

analog-circuit-simulate-mcp-server

Local
github.com/abelzhaoScience & Education0Updated 73w ago

About analog-circuit-simulate-mcp-server

analog-circuit-simulate-mcp-server is an MCP server for analog circuit simulation, aimed at users working with ngspice. It accepts parameterized simulations and returns results as JSON, with a REST API interface also available.

Key features

  1. 01Run analog circuit simulations
  2. 02Support parameterized simulations
  3. 03Return results in JSON
  4. 04Provide a REST API interface

Use cases

  1. 01Simulate an analog circuit from an MCP client
  2. 02Compare circuit behavior across parameter values

MCP support

The MCP server exposes tools to run analog circuit simulations and retrieve results. Simulation is powered by ngspice.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

analog-circuit-simulate-mcp-server

A Model Context Protocol (MCP) server for analog circuit simulation

Features

  • Provides MCP tools for running analog circuit simulations
  • REST API interface for simulation control
  • Supports parameterized circuit simulations
  • Returns simulation results in JSON format

Installation Guide (Linux only)

  1. Install ngspice (required for simulation backend):

    sudo apt-get install ngspice  # For Debian/Ubuntu systems
    
  2. Ensure Python 3.8+ is installed (see .python-version file) and install uv tool:

    pip install uv
    
  3. Create and activate virtual environment:

    uv venv .venv
    source .venv/bin/activate  # Linux/macOS
    
  4. Install dependencies using different methods:

    • Direct installation with uv:
      uv pip install -e .
      
    • Build with uv then install:
      uv build && pip install dist/analog_circuit_simulate_mcp_server-${version}-py3-none-any.whl
      # or uv build && pip install dist/analog_circuit_simulate_mcp_server-${version}.tar.gz
      
    • Traditional pip installation:
      pip install -e .
      

Usage

Starting the Server

Different ways to run the server:

  • Using uv run:
    uv run analog-circuit-simulate-mcp-server
    
  • Using uvx (requires uvx installation):
    uvx --from https://github.com/abelzhao/analog_circuit_simulate_mcp_server.git analog-circuit-simulate-mcp-server
    
NPX Configuration
{
  "mcpServers": {
    "ngspice-mcp-server": {
      "command": "uvx",
      "args": [
        "http://${server_ip}:4044/mcp/"
      ]
    }
  }
}
Configuration Options

Server configuration can be modified in .venv:

  • FASTMCP_PORT=4044
  • FASTMCP_JSON_RESPONSE=True

Development Guide

analog-circuit-simulate-mcp-server Project Structure

.
├── .gitignore
├── .python-version
├── high_pass_filter.cir         # Example circuit file
├── pyproject.toml              # Python project configuration
├── README.md                   # English documentation
├── README.zh-CN.md             # Chinese documentation
├── uv.lock                     # UV dependency lock file
├── build/                      # Build directory
└── src/                        # Source code directory
    └── analog_circuit_simulate_mcp_server/     # Main package source
        ├── __init__.py         # Package initialization
        ├── __main__.py         # CLI entry point
        ├── server.py           # MCP server implementation
        └── simulate.py         # Simulation logic

File Descriptions

  • high_pass_filter.cir: Example circuit file for circuit simulation demo
  • src/analog_circuit_simulate_mcp_server/server.py: Contains MCP server implementation and REST API interface
  • src/analog_circuit_simulate_mcp_server/simulate.py: Contains circuit simulation logic and result processing
  • pyproject.toml: Defines Python package metadata, dependencies and build configuration
NPX
{
  "mcpServers": {
    "analog-circuit-simulate-mcp-server": {
      "command": "uvx",
      "args": [
        "http://${server_ip}:4044/mcp/"
      ]
    }
  }
}
Testing

Run test suite:

pytest

License

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.