What is ngspice-mcp?
ngspice-mcp is a Model Context Protocol (MCP) server that provides access to the ngspice circuit simulation functionality through a standardized protocol interface, enabling AI language models to interact with ngspice in a controlled manner.
How to use ngspice-mcp?
To use ngspice-mcp, clone the repository, ensure all system requirements are met, and build the server using the D build system (dub). Start the server with command line options to set the working directory and load circuit files.
Key features of ngspice-mcp?
- Integration with ngspice's shared library interface
- Standardized MCP protocol implementation
- Synchronous operation with structured data access
- Comprehensive output capture and redirection
- Vector data handling with multiple representation formats
- Support for both server and library usage modes
- Built-in test suite
Use cases of ngspice-mcp?
- Interfacing AI models with circuit simulation tasks.
- Automating circuit analysis and simulation workflows.
- Providing a structured way to access simulation data for research and development.
FAQ from ngspice-mcp?
- What are the system requirements for ngspice-mcp?
You need a D compiler (DMD/LDC), ngspice shared library, MCP server library (d-mcp-server), and the D build system (dub).
- Can I use ngspice-mcp for both server and library modes?
Yes! ngspice-mcp supports both modes of operation.
- How do I run simulations using ngspice-mcp?
You can run simulations by using commands like
runSimulationwith various simulation commands such asop,dc, andtran.