Close
0%
0%

SPICEBridge

AI-Powered Circuit Design That Actually Verifies Itself

Similar projects worth following
An MCP server that connects language models to ngspice simulation. Describe what you want in English, the AI designs it, the simulator verifies the physics, and the AI iterates until specs are met. Open source, pip installable.

What is SPICEBridge?

LLMs give terrible circuit advice. They'll confidently hand you component values that don't work, topologies that won't oscillate, filters that roll off at the wrong frequency. They can't do physics. They just pattern-match on training data and hope for the best.

Simulators are the opposite problem. ngspice will give you exact answers, but it speaks SPICE netlists, not English. You have to know what you're building before you can simulate it.

SPICEBridge connects the two. It's a Model Context Protocol (MCP) server that gives AI models direct access to ngspice. The AI translates your intent into a circuit, ngspice simulates the physics, structured metrics come back, and the AI iterates until the design actually meets your specifications. Closed-loop design — not guessing.

How it works

You say "build me a 1 kHz lowpass filter." The AI picks a topology, calculates component values using deterministic math (not AI guessing — actual equations with E-series standard values), writes the SPICE netlist, runs the simulation, measures the -3dB point, checks it against your spec, and tells you the result. If it's off, it adjusts and re-simulates.

28 MCP tools handle everything: circuit creation, AC/transient/DC simulation, bandwidth and gain measurement, spec verification, Monte Carlo tolerance analysis, KiCad export, schematic generation, and multi-stage circuit composition. 11 built-in templates cover common topologies. A datasheet-to-model wizard lets you create SPICE models from component datasheets.

The design equation solver handles 12 circuit topologies. It doesn't ask the AI to guess resistor values — it computes them from your specs, snaps to standard E-series values, and hands the AI a working circuit. Infrastructure carries the AI.

Two modes

Cloud mode (Claude.ai or Claude Code): Collaborative design partner. Describe what you need, brainstorm topologies, iterate on designs together. Works through Anthropic's MCP integration — no local install needed for cloud mode.

Local mode (Claude Code or any MCP client): Full control on your machine. ngspice runs locally, everything stays on your hardware. Pair with local AI models through Ollama for completely offline circuit design.

Quick start

###b class="inline-flex items-center justify-center relative shrink-0 can-focus select-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none disabled:drop-shadow-none border-transparent transition font-base duration-300 ease-[cubic-bezier(0.165,0.85,0.45,1)] h-8 w-8 rounded-md active:scale-95 backdrop-blur-md Button_ghost__BUAoh" type="button" aria-label="Copy to clipboard" data-state="closed"###

pip install spicebridge

For cloud use with Claude.ai, add the hosted server URL in Claude's MCP settings: https://mcp.clanker-lover.work/mcp

For local use, install ngspice (apt install ngspice) and configure your MCP client to use the SPICEBridge server.

Requirements

  • Python 3.10+
  • ngspice (for local simulation — cloud mode uses the hosted server)

Links

  • LLMs Can't Do Circuit Physics. So I Built a Bridge.

    Brandon6 hours ago 0 comments

    I'm not a programmer. I'm not a trained electrical engineer either — I'm self-taught, I think in block diagrams and signal flows, and I use tools for the math. When I need a filter at a specific frequency, I don't derive transfer functions by hand. I look it up, plug in the values, and verify it works.

    That's exactly what LLMs can't do. They'll tell you to use a 10kΩ resistor and a 100nF cap for your lowpass filter, and it sounds confident, but nobody checked the math. There's no simulation. No verification. Just vibes. And if you're building something real, vibes don't cut it.

    I kept thinking: the AI is actually good at the translation part. It understands what I want when I say "build me a bandpass filter centered at 440 Hz." It can pick a topology. It can even write a SPICE netlist. The part it can't do is verify that the netlist actually works. That's what simulators are for — and nobody had connected the two.

    So I built SPICEBridge. It's an MCP server — basically a bridge between language models and ngspice. The AI handles the English-to-circuit translation, ngspice handles the physics, and a structured tool layer handles everything in between. 28 tools covering simulation, measurement, design equations, tolerance analysis, schematic generation, and KiCad export.

    The key design decision: don't trust the AI with math. The design equation solver computes component values deterministically from your specifications and snaps them to standard E-series values. The AI orchestrates the workflow — it doesn't calculate resistor values. Same philosophy as choosing a 555 timer over an Arduino for a simple timing circuit. Use the right tool for each job.

    I built the initial system in under 24 hours using the same multi-AI workflow I used for CodeDocent: one Claude instance for thinking and planning, other AI models for adversarial code review, and Claude Code for implementation. Then I spent another two days on a full security audit — 8 automated scanners plus reviews by ChatGPT, Gemini, DeepSeek, Grok, and Kimi. 56 findings across 8 fix batches. 771 automated tests.

    It's GPL v3, pip installable, and the hosted server is live if you want to try it from Claude.ai without installing anything. Point it at a circuit problem and let the AI actually verify its own work for once.

View project log

Enjoy this project?

Share

Discussions

Does this project spark your interest?

Become a member to follow this project and never miss any updates