实验室仪器自动化服务

Aperture 是一个通过 SCPI 控制电子测试设备的 REST API 和 MCP 服务器,用于实验室环境中模拟/混合信号电路的自动化测试与测量。

  • by blackforestdev
  • Python
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 blackforestdev/aperture

使用说明

Aperture

Lab instrument automation — REST API and MCP server for electronic test equipment via SCPI.

Overview

Aperture is a FastAPI service that controls bench instruments over SCPI/TCP on an isolated VLAN. It provides a REST API (144 routes) and an MCP server (70 tools) for automated test, measurement, and validation of analog/mixed-signal circuits.

Instruments

Instrument Model Capabilities
Oscilloscope Siglent SDS814X HD 4-ch 100 MHz, triggers, decode, FFT, math, mask test
Power Supply Siglent SPD3303X-E Triple-output linear (2x 32V/3.2A + 1x fixed)
Signal Generator Siglent SDG1032X Dual-ch 30 MHz AWG, modulation, sweep, burst
Multimeter Siglent SDM3055 5.5-digit, DCV/ACV/DCI/ACI/R/C/freq/temp/diode

Architecture

Claude / Client
      │
      ├── MCP (port 9100, Streamable HTTP)
      │       └── mcp_server/server.py → httpx → REST API
      │
      └── REST API (port 8080, FastAPI)
              ├── routers/   → 144 endpoints
              ├── drivers/   → SCPI instrument drivers (271 methods)
              └── services/  → discovery, safety, measurement
                      │
                  pyvisa-py (SCPI/TCP:5025)
                      │
              ┌───────┼───────┬───────┐
            scope    psu   siggen   dmm
          10.0.10.20  .21    .22    .23

Requirements

  • Python 3.13+
  • pyvisa-py (no NI-VISA needed)
  • Instruments on a reachable network (default: 10.0.10.0/24)

Quick Start

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

# Start the REST API
uvicorn lab_auto.main:app --host 0.0.0.0 --port 8080

# Start the MCP server (requires REST API running)
python -m mcp_server.server

Running Tests

python -m pytest tests/ -v

License

Copyright (c) 2026 Common Tuning LLC. All rights reserved.

This software is proprietary. No part of this software may be reproduced, distributed, or transmitted in any form without prior written permission. See LICENSE for details.