Sponsored by Deepsite.site

analog-circuit-simulate-mcp-server

Created By
abelzhao7 months ago
the mcp server to run circuit simulation with ngspice
Content

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.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
CursorThe AI Code Editor
ChatWiseThe second fastest AI chatbot™
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Playwright McpPlaywright MCP server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Amap Maps高德地图官方 MCP Server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
DeepChatYour AI Partner on Desktop
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Tavily Mcp
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
WindsurfThe new purpose-built IDE to harness magic
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Serper MCP ServerA Serper MCP Server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code