
SRS Lock-in Amplifier
io.github.K-Dense-AI由 GitHub 帳號 K-Dense-AI 發布v0.1.3更新於 Oct 27, 2026
MCP server for Stanford Research Systems lock-in amplifiers (SR810/SR830, SR860/SR865A).
概覽
本機 MCP 伺服器,讓助理讀取與設定 Stanford Research Systems 鎖相放大器(SR810/SR830、SR860/SR865A)並執行頻率掃描。
- 可以做什麼
- 讀取輸出與設定:X/Y/R/θ 快照、參考、正弦輸出、靈敏度、時間常數、連線資訊與原始指令日誌
- 設定參考:來源、內部頻率、諧波與相位偏移
- 設定訊號輸入:A/A-B/電流、AC 或 DC 耦合、屏蔽、電壓檔位
- 設定靈敏度與輸出濾波時間常數、斜率及同步濾波器
- 執行自動相位、自動增益與自動檔位
- 在頻率範圍內掃描內部參考,並把 X/Y/R/θ 記錄到新的 CSV 檔案
- 適用情境
- 適合需要助理操作實驗室實體 SRS 鎖相放大器的情境,例如建立量測、讀取解調輸出,或透過頻率掃描量測共振與轉移函數。也可用內建模擬器在沒有硬體時試用。
- 執行需求
- 以 Python 套件(uvx labmcp-srs-lockin)在本機透過 stdio 執行。需透過 GPIB(VISA 後端)、RS-232,或 SR86x 的 USB/乙太網路連接儀器,由 LABMCP_ADDRESS 或 --address 指定。選用環境變數 LABMCP_LIMITS、LABMCP_READ_ONLY、LABMCP_SIMULATE。僅限桌面。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 SRS Lock-in Amplifier,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
SRS Lock-in Amplifier — MCP Server
Let an AI agent read X/Y/R/θ, set the reference frequency, harmonic and phase, drive level, sensitivity and time constant, run auto phase/gain, and record bounded frequency sweeps on Stanford Research Systems DSP lock-in amplifiers, both the classic SR810/SR830 and the current SR860/SR865A.
Try it without hardware
The simulated sample is a resonator (10 kHz, Q = 50) driven by the sine output, so a frequency_sweep from 9 to 11 kHz shows a resonance peak.
Connect your lock-in
The model is detected from *IDN? (override with --option model=sr830|sr810|sr860|sr865a).
- GPIB (all models): set the GPIB address in the setup menu (SR830 factory default 8). Install
labmcp[visa](included) and a VISA backend (pyvisa-py works with most USB-GPIB adapters; NI-VISA with?backend=@ivi). - RS-232: set baud rate and parity on the instrument (SR830 default 9600 baud, no parity; the word length is always 8 bits). The SR830 only answers on the interface selected by
OUTX; the server sendsOUTX 0automatically on serial connections andOUTX 1on GPIB. The SR830 ends RS-232 replies with CR. For an SR86x on RS-232, pass--option model=sr860(replies end with LF) or set the SR86x transmit terminator to CR. - SR86x USB / Ethernet: use the USBTMC or VXI-11 VISA resource (
TCPIP0::<ip>::inst0::INSTR; enable VXI-11 and add your PC to the trusted IP range in the system menu). - Test the connection:
Use
--option interface=gpibif you reach an SR830's GPIB port through a raw TCP adapter.
Add to your MCP client
Claude Code
Claude Desktop / Cursor / Windsurf (claude_desktop_config.json, .cursor/mcp.json, …)
Add --read-only to allow reading outputs and settings but block every setting change and the sine-output drive. For other clients, generate the snippet with uvx labmcp config srs-lockin --address GPIB0::8::INSTR --client vscode (also cursor, codex, claude-code).
Tools
get_connection_info, get_command_log and reconnect are built into every LabMCP server.
Safety limits
Override at launch: --limit max_amplitude_v=0.1 --limit max_sweep_duration_s=1800.
Example prompts
- "Set the lock-in to 13.7 Hz internal reference, 100 mV drive, 1 s time constant at 24 dB/oct, and tell me X and Y once it has settled."
- "Auto-phase, then read R and θ ten times and give me the mean and standard deviation of R."
- "Sweep the drive from 30 to 34 kHz in 201 log-spaced steps at 10 mV and find the resonance frequency and Q of my tuning fork."
- "Switch to the current input with 100 MΩ gain, DC coupling, and pick the sensitivity automatically."
- "We're done - turn the sine output down to the minimum."
Notes
- The sine output is the hazard. It drives your sample (heating, electromigration, piezo stress).
set_amplitudechecksmax_amplitude_v;set_amplitude_minimumis the closest thing to "output off": the SR810/SR830 cannot go below 4 mV rms, so disconnect the cable if the sample must see no drive. On the SR86x it sets 1 nV rms and a 0 V DC level (SOFF). The SR830 powers up and resets (*RST) to 1.000 V rms. - Every set command is followed by
*ESR?; if the lock-in flags an execution error (parameter out of range, e.g.FREQin external-reference mode) or an illegal command, the tool reports it instead of silently continuing. set_sensitivitypicks the smallest range that is at least the requested full scale (never a smaller one, which would overload).set_time_constantpicks the nearest available value; the SR830 may raise it to the minimum allowed for the slope/reserve, and the returned settings show the value actually used.read_outputsreturnsunit= V for voltage inputs and A for the current input (1 V ↔ 1 µA sensitivity mapping from the manuals). The SR830 manual (SR530-compatibilityQX/QYcommands, ch. 5) states that outputs are returned in amps when the current input is selected; the SR86x manual does not say explicitly — please report what your instrument returns.overloadscomes fromLIAS?, whose bits are latched since the last read; the first reading after a transient may show an overload that has already cleared.frequency_sweepwaits the manual's 99 % settling time at each point (5/7/9/10 time constants for 6/12/18/24 dB/oct) unlesssettle_time_constantsis given, and restores the starting frequency afterwards. Callingset_amplitude_minimumstops a running sweep at the next point (also one that is still reading its settings). One sweep can take at most 3640 s (the tool's timeout minus a margin) whatevermax_sweep_duration_sis: longer estimates are refused, and a sweep running slower than estimated stops early and returns the points measured so far (completed: false).save_pathmust end in.csvand must not exist yet (an existing file is never overwritten); it is checked before the sweep starts.set_amplitude_minimumtries both the amplitude and (SR86x) the DC level even if one of them fails, then reports every failure.auto_gainmaps toAGAN(SR830) orASCL(SR86x);auto_rangemaps toARSV(SR830 auto reserve) orARNG(SR86x auto input range). SR830AGANdoes nothing when the time constant is above 1 s.- Data-buffer, streaming and FFT functions are not exposed. The SR850, SR844 (RF) and SR865 (non-A) are not included because they were not verified; an explicit
--option model=...lets you try a compatible model at your own risk.
Hardware verification
來源:servers/physics/srs-lockin/README.md,提交 46545ea
工具
0版本歷史
2- v0.1.3最新Sep 27, 2026
- v0.1.1Sep 26, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分