CL

clanker-lover/spicebridge

API 开发

本页由 AI 翻译,技术细节请以原文为准。 查看原文

43 stars 10 forks 质量 65 趋势 12GPL-3.0

MCP服务器为AI助手提供直接访问ngspice电路仿真的平台——通过自然语言设计、模拟和验证电路

概览

通过仿真实现AI驱动的电路设计——一个MCP服务器,通过ngspice让语言模型直接访问SPICE电路仿真。用通俗易懂的英语描述电路,让AI负责网表生成、仿真、测量和规格验证。 - 覆盖完整的电路设计工作流程 - 配备自动元件值计算(E24系列) - :交流扫描、瞬态、直流工作点 - :带宽、增益、直流电平、瞬态指标、功率 - 在元件公差范围内 - — 通过自动端口映射连接电路级 - — 从数据手册参数生成SPICE .lib模型 - — 输出.kicad_sch原理图 - — 浏览器中的交互式原理图查看器 - — Cloudflare隧道(spicebridge setup-cloud)一命令部署 - — 将结果与设计目标进行比较 - Python 3.10+ - ngspice 已安装并运行在 PATH 上 一个命令是从本地安装到公共 MCP 端点: 向导负责完整的部署流水线: 1.

概述(AI 翻译)

通过仿真实现AI驱动的电路设计——一个MCP服务器,通过ngspice让语言模型直接访问SPICE电路仿真。用通俗易懂的英语描述电路,让AI负责网表生成、仿真、测量和规格验证。

特色

  • 28个工具涵盖完整的电路设计工作流程
  • 11个内置模板,带自动元件值计算(E24系列)
  • 模拟:交流扫频、瞬态、直流操作点
  • 测量:带宽、增益、直流电平、瞬态指标、功率
  • 蒙特卡洛及最坏情况分析在元件公差下
  • 多级组合 — 通过自动端口映射连接电路级
  • 模型向导 — 从数据手册参数生成SPICE .lib模型
  • KiCad导出 — 输出.kicad_sch原理图
  • Web viewer — 浏览器中的交互式示意图查看器
  • 云设置向导 — 一命令部署,使用Cloudflare隧道(spicebridge setup-cloud)
  • 规范验证 — 将结果与设计目标进行比较

安装

要求

  • Python 3.10+
  • ngspice 安装并运行在 PATH 上

快速启动

本地(Claude Code / stdio)

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

SPICEBridge

AI-powered circuit design through simulation — an MCP server that gives language models direct access to SPICE circuit simulation via ngspice. Describe a circuit in plain English and let the AI handle netlist generation, simulation, measurement, and spec verification.

Features

  • 28 tools covering the full circuit design workflow
  • 11 built-in templates with automatic component value calculation (E24 series)
  • Simulation: AC sweep, transient, DC operating point
  • Measurement: bandwidth, gain, DC levels, transient metrics, power
  • Monte Carlo & worst-case analysis under component tolerances
  • Multi-stage composition — connect circuit stages with automatic port mapping
  • Model wizard — generate SPICE .lib models from datasheet parameters
  • KiCad export — output .kicad_sch schematics
  • Web viewer — interactive schematic viewer in the browser
  • Cloud setup wizard — one-command deployment with Cloudflare tunnels (spicebridge setup-cloud)
  • Spec verification — compare results against design targets

Install

pip install spicebridge

Requirements

  • Python 3.10+
  • ngspice installed and on PATH

Quick Start

Local (Claude Code / stdio)

Add to your .mcp.json:

{
  "mcpServers": {
    "spicebridge": {
      "command": "spicebridge"
    }
  }
}

Cloud (Streamable HTTP)

spicebridge --transport streamable-http --port 8000

Cloud Setup Wizard

One command to go from a local install to a public MCP endpoint:

spicebridge setup-cloud          # interactive (named tunnel, permanent URL)
spicebridge setup-cloud --quick  # quick tunnel (temporary URL, no account needed)

The wizard handles the full deployment pipeline:

  1. Installs cloudflared automatically (macOS via Homebrew, Linux via APT) if not found
  2. Authenticates with Cloudflare (browser-based OAuth, named tunnel mode only)
  3. Creates or reuses a tunnel — prompts to pick an existing one or make a new one
  4. Configures DNS routing for your custom domain (named tunnel mode)
  5. Generates an API key for authentication
  6. Starts the SPICEBridge server and tunnel together
  7. Prints connection info with a ready-to-paste JSON config for Claude.ai

Quick tunnels give you a temporary trycloudflare.com URL instantly — no Cloudflare account required. Named tunnels give you a permanent custom domain (e.g. spicebridge.example.com).

Additional options:

spicebridge setup-cloud --domain mcp.example.com  # specify custom domain
spicebridge setup-cloud --port 9000                # custom port
spicebridge setup-cloud --no-install               # skip cloudflared installation

Example

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "spicebridge": { "command": "spicebridge" } } }