Track MCP LogoTrack MCP
Track MCP LogoTrack MCP

The world's largest repository of Model Context Protocol servers. Discover, explore, and submit MCP tools.

Product

  • Categories
  • Top MCP
  • New & Updated
  • Submit MCP

Company

  • About

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

© 2026 TrackMCP. All rights reserved.

Built with ❤️ by Krishna Goyal

    Ngspice Mcp

    An MCP server for interfacing with the ngspice circuit simulator

    2 stars
    D
    Updated May 2, 2025

    Table of Contents

    • Features
    • Requirements
    • Installation
    • Usage
    • Command Line Options
    • Available Tools
    • Circuit Loading
    • Simulation
    • Data Access
    • Resources
    • Development
    • Project Structure
    • Build Configurations
    • Testing
    • Technical Details
    • Architecture
    • Database System
    • License
    • Contributing

    Table of Contents

    • Features
    • Requirements
    • Installation
    • Usage
    • Command Line Options
    • Available Tools
    • Circuit Loading
    • Simulation
    • Data Access
    • Resources
    • Development
    • Project Structure
    • Build Configurations
    • Testing
    • Technical Details
    • Architecture
    • Database System
    • License
    • Contributing

    Documentation

    ngspice-mcp

    A Model Context Protocol (MCP) server that provides access to ngspice circuit simulation functionality through a standardized protocol interface. This server enables AI language models to interact with ngspice in a controlled and structured way.

    Features

    • 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

    Requirements

    • D compiler (DMD/LDC)
    • ngspice shared library
    • MCP server library (d-mcp-server)
    • D build system (dub)

    Installation

    1. Ensure system requirements are installed

    2. Clone the repository

    3. Build using dub:

    bash
    dub build --config=server

    Usage

    The server can be started with:

    bash
    ./ngspice-mcp [options]

    Command Line Options

    • --working-dir, -d: Set the working directory for circuit files (default: current directory)

    Available Tools

    Circuit Loading

    • loadCircuit: Load circuit netlists directly
    • loadNetlistFromFile: Load netlists from files

    Example netlist:

    spice
    RC Circuit
    R1 in out 1k
    C1 out 0 1u
    .end

    Simulation

    • runSimulation: Execute simulation commands

    Common commands:

    • op: DC operating point
    • dc source start stop step
    • ac dec points fstart fend
    • tran step tstop

    Data Access

    • getPlotNames: List available simulation plots
    • getVectorNames: List vectors in a specific plot
    • getVectorData: Retrieve vector data with options for:
    • Magnitude-phase representation
    • Rectangular (real-imaginary) representation
    • Both representations
    • Optional interval selection

    Resources

    • stdout://: Standard output stream from ngspice
    • stderr://: Error output stream from ngspice
    • usage://: Comprehensive usage guide

    Development

    Project Structure

    code
    ngspice-mcp/
    ├── source/
    │   ├── app.d           # Main application
    │   ├── bindings/       # ngspice C API bindings
    │   ├── database/       # SQLite database handling
    │   ├── parser/         # Netlist parsing
    │   └── server/         # MCP server implementation
    ├── resources/          # Resource files
    └── bin/               # Build outputs

    Build Configurations

    1. Server Mode

    bash
    dub build --config=server

    2. Library Mode

    bash
    dub build --config=library

    3. Unit Tests

    bash
    dub test --config=unittest

    Testing

    Run the test suite:

    bash
    dub test

    Tests cover:

    • ngspice bindings
    • Server functionality
    • Tool validation
    • Resource handling
    • Error cases

    Technical Details

    Architecture

    The server implements several key components:

    1. NgspiceServer: Core server implementation

    • Tool registration and handling
    • Resource management
    • Output stream capture
    • Vector data processing

    2. Output System

    • Stdout/stderr capture
    • Stream buffering
    • Resource notification

    3. Vector Processing

    • Complex number handling
    • Scientific notation formatting
    • Interval selection
    • Multiple representation formats

    Database System

    • Model parameter storage
    • Efficient indexing and querying
    • Transaction support
    • Concurrent access handling

    License

    MIT License - see dub.json for details.

    Copyright © 2024, Garret Noble

    Contributing

    Contributions are welcome! Please ensure:

    1. Code follows project style and standards

    2. Tests are included for new functionality

    3. Documentation is updated as needed

    4. Commit messages are clear and descriptive

    Similar MCP

    Based on tags & features

    • GL

      Glm Mcp Server

      TypeScript·
      3
    • NS

      Ns Private Access Mcp

      TypeScript·
      3
    • CH

      Chuk Mcp Linkedin

      Python00
    • MC

      Mcp Wave

      TypeScript00

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k
    View All MCP Servers

    Similar MCP

    Based on tags & features

    • GL

      Glm Mcp Server

      TypeScript·
      3
    • NS

      Ns Private Access Mcp

      TypeScript·
      3
    • CH

      Chuk Mcp Linkedin

      Python00
    • MC

      Mcp Wave

      TypeScript00

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k