Skip to main content
Glama
zesun33
by zesun33

@zesun33/mcp-spice

Model Context Protocol (MCP) server for ngspice batch circuit simulation.

License: Apache-2.0 CI Protocol: MCP Runtime: Rootless Podman

mcp-spice lets AI coding agents and IDEs (Cursor, Windsurf, GitHub Copilot / OpenAI Codex, Claude Code, Google Antigravity, OpenCode, Cline) run SPICE netlists with ngspice in batch mode and get .meas results back as JSON instead of plot windows or thousand-line logs.

One-step with the rest of the family:

npx @zesun33/create-hw-agent my-asic

Or this server alone after it is on npm:

npx -y @zesun33/mcp-spice

Tools Exposed

Tool

Parameters

Engine

Description

spice_run

netlist: string, cwd?: string, timeout_ms?: number

ngspice -b

Batch simulate a .cir/.sp file. Parses .meas assignments. Does not plot.

spice_toolchain_info

none

Probe

ngspice version and active runtime/image.

// Tool Call: spice_run {"netlist": "rc_lowpass.cir"}
{
  "success": true,
  "measurements": [{ "name": "vmid", "value": 0.63 }]
}

Related MCP server: ltspice-mcp

Execution Runtime

mcp-spice runs inside the zesun33/spice rootless Podman image.

Public install (recommended — anyone can pull):

podman pull ghcr.io/zesun33/spice:latest
export MCP_SPICE_IMAGE=ghcr.io/zesun33/spice

Local builds still work as localhost/zesun33/spice (the default). Override with MCP_SPICE_IMAGE. To force host binaries: export MCP_SPICE_RUNTIME=host.


Universal Client & AI IDE Setup

Environment

Setup Location

AI IDEs

.cursor/mcp.json or .windsurf/mcp.json

CLI Agents

Claude Code / OpenCode MCP config

Desktop

claude_desktop_config.json

{
  "mcpServers": {
    "spice": {
      "command": "npx",
      "args": ["-y", "@zesun33/mcp-spice"],
      "env": { "MCP_SPICE_IMAGE": "ghcr.io/zesun33/spice" }
    }
  }
}

Until the package is on npm, point command at node and args at this repo's dist/index.js.


Verification & Testing

./scripts/verify.sh          # full, needs podman + spice image
./scripts/verify.sh --quick  # CI

Available Tools

2 tools
spice_runA

Runs a SPICE netlist in ngspice batch mode (-b) and returns parsed .meas results plus a short log tail. Does not plot. Use spice_toolchain_info to probe the engine.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNoOptional working directory.
netlistYesPath to the .cir / .sp netlist.
timeout_msNoMaximum task time in milliseconds (default: 60000).

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full transparency burden. It clearly states the execution mode (batch), the return value (parsed .meas + log tail), and what it does not do (plot). This is transparent about its behavior, though it does not mention potential side effects like file writes or environment changes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences with no redundant information. It front-loads the core action and includes the key caveat about plotting and the sibling tool, making it efficient and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description gives a reasonable sense of the output (parsed .meas results and short log tail) and points to the alternative for engine probing. While it does not elaborate on the format of .meas results or the contents of the log tail, it is sufficient for an agent to gauge whether this tool is appropriate without being overly verbose.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already provides descriptions for all three parameters (cwd, netlist, timeout_ms), so the description adds little beyond reinforcing that netlist is a .cir/.sp path and timeout is in milliseconds. This is baseline coverage; the description does not significantly enhance parameter understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool runs a SPICE netlist in ngspice batch mode and returns parsed .meas results plus a log tail, with a specific verb and resource. It also distinguishes itself by explicitly noting it does not plot, which helps disambiguate from other tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly mentions the alternative tool spice_toolchain_info for probing the engine, and states what this tool does not do (plot). This gives the agent a clear cue on when to use this tool versus the sibling, though it could be more explicit about scenario-based selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

spice_toolchain_infoA

Returns active container/host runtime and the ngspice version string.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the full burden of disclosing behavior. It states that the tool returns runtime and version information, implying a read-only, non-destructive operation, but it does not explicitly confirm the absence of side effects or describe any potential errors or edge cases.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence with no redundant or extraneous information. It directly states what is returned, making it efficient and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple parameterless tool, the description covers the core need: it specifies what the tool returns (runtime and version). It does not detail the exact output format, but given the lack of input parameters and the straightforward nature of the tool, this is sufficient for most use cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and the description correctly includes no parameter details. Since there are no parameters to document, the baseline score of 4 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function with a specific verb ('Returns') and identifies the exact resources ('active container/host runtime' and 'ngspice version string'). It also implicitly distinguishes itself from the sibling tool 'spice_run' by being informational rather than execution-oriented.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explicitly state when to use this tool versus alternatives, nor does it mention any prerequisites or situations where it should be avoided. The purpose is clear, but usage guidance is indirect at best.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv0.1.0
    • First observedspice_run
    • First observedspice_toolchain_info

TDQS

A4/5.0
Disambiguation5/5

spice_run executes a simulation and returns results, while spice_toolchain_info reports environment/version details. Their purposes are completely distinct with no functional overlap.

Naming Consistency4/5

Both tools share the spice_ prefix and snake_case style, but spice_run uses a verb while spice_toolchain_info is more noun-like. This is a minor inconsistency rather than a chaotic naming scheme.

Tool Count4/5

With only two tools, the set is slightly below the typical 3-15 range, but it is still reasonable for a narrowly focused SPICE execution server. The small count matches the minimal scope.

Completeness4/5

The server covers the core run-and-inspect workflow with parsed .meas results and log tail access. It lacks raw output or full-log retrieval, but these are not obvious dead ends for the intended simple simulation use case.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    A thin MCP server that wraps spicelib for circuit simulation. Exposes tools for running AC, transient, DC op, and parameter sweep analyses, enabling behavioral model fitting through iterative simulation and measurement comparison.
    4
    7
    GPL 3.0
  • F
    license
    C
    quality
    C
    maintenance
    MCP server for automating LTspice on macOS, enabling simulation, schematic generation, data extraction, verification, and rendering via natural language or agents.
    71
    18
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    Generates, simulates, and inspects LTspice circuits via MCP tools and resources, providing structured JSON interfaces for AI agents.
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables MCP-compatible agents to generate Qucs circuit schematics, run simulations, and parse results programmatically.
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zesun33/mcp-spice'

If you have feedback or need assistance with the MCP directory API, please join our Discord server