PalmSens Potentiostat

io.github.K-Dense-AI由 GitHub 帳號 K-Dense-AI 發布v0.1.3更新於 Oct 24, 2026

MCP server for PalmSens potentiostats running MethodSCRIPT (EmStat Pico, EmStat4, Sensit, Nexus).

已驗證STDIO僅桌面開發者工具資料與分析

概覽

AI 產生的概覽

本機 MCP 伺服器,讓 AI 助理在支援 MethodSCRIPT 的 PalmSens 電化學分析儀上執行量測,並取回資料、峰值與 CSV 檔案。

可以做什麼
  • 執行循環伏安、線性掃描伏安、差分脈衝伏安與計時電流法,並回傳峰值與電流摘要
  • 執行原始 MethodSCRIPT 腳本,回傳原始輸出與解碼後的資料封包
  • 讀取儀器資訊:型號、韌體、序號、電位窗、PGStat 模式與電流量程
  • 查看連線狀態、唯讀模式與目前安全限值,並檢視原始指令日誌
  • 中止進行中的量測、斷電後重新連線,並將結果存成 CSV 檔案
適用情境
適合需要助理直接操作 PalmSens 分析儀的實驗情境:例行 CV、LSV、DPV 或計時電流法量測、掃描速率研究、峰值與電量彙整,或自訂 MethodSCRIPT 實驗。內建模擬器可在沒有硬體時先試用流程。
執行需求
以本機 Python 套件(labmcp-palmsens,通常透過 uvx 啟動)經 stdio 執行。需要一台可經 USB 序列埠或 UART 存取的支援機型,位址由 LABMCP_ADDRESS 指定;序列埠必須閒置,因此需關閉 PSTrace 或 MultiTrace。可選變數 LABMCP_LIMITS、LABMCP_READ_ONLY、LABMCP_SIMULATE 可調整限值、唯讀模式與模擬。
安裝前請注意
量測類工具會對電化學槽施加電位,屬於對真實硬體的實體操作;請讓 LABMCP_LIMITS 保持保守,若只需裝置資訊可啟用 LABMCP_READ_ONLY。原始腳本僅部分檢查,執行時計算出的數值不會被驗證。此伺服器只在模擬器上測試,尚未在硬體上驗證。CSV 輸出不會覆寫既有檔案。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 PalmSens Potentiostat,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

PalmSens Potentiostat — MCP Server

Let an AI agent run cyclic voltammetry, linear sweep voltammetry, differential pulse voltammetry and chronoamperometry on PalmSens potentiostats that speak MethodSCRIPT, and get back downsampled data, peak summaries and optional full-resolution CSV files.

Packagelabmcp-palmsens
InstrumentsEmStat Pico (module and development board), EmStat4 LR/HR (EmStat4S, EmStat4M, EmStat4X), Sensit Wearable / Sensit BT, Nexus
InterfacesUSB (virtual COM port), UART
ProtocolMethodSCRIPT v1.x (MethodSCRIPT manual v1.8) over the PalmSens online communication protocol (EmStat Pico v1.6, EmStat4 v1.3); cross-checked against PalmSens/MethodSCRIPT_Examples
Status🧪 simulated: tested against a wire-level simulator, not yet verified on hardware. Report a hardware test

Try it without hardware

bash
uvx labmcp-palmsens --simulate --check

The simulator is an EmStat Pico with a 3 mm disk electrode in 1 mM of a reversible one-electron redox couple (E° = +0.20 V, like ferro/ferricyanide vs Ag/AgCl). It interprets the scripts the server sends and streams correctly encoded data packages, so you get a proper CV "duck", DPV peaks and Cottrell decays. Simulated time runs 10× faster than real time; change that with --option sim_speed=1 (real time) or =100.

Connect your instrument

  1. Close PSTrace / MultiTrace. Only one program can hold the serial port.
  2. Find the port: uvx labmcp ports. An EmStat Pico development board or Sensit shows up as a USB serial port (FTDI). An EmStat4 or Nexus shows up as a virtual COM port named after the device.
  3. Test the connection:
    bash
    uvx labmcp-palmsens --address /dev/ttyUSB0 --check            # EmStat Pico / Sensit (Linux)uvx labmcp-palmsens --address /dev/tty.usbmodemXXXX --check   # EmStat4 (macOS)uvx labmcp-palmsens --address COM7 --check                    # Windows
    Defaults are the EmStat Pico's: 230400 baud, 8N1, XON/XOFF, LF line endings. Over USB the EmStat4 and Nexus ignore the baud rate. For an EmStat4 UART connection use serial://COM7?baudrate=921600&rtscts=true&xonxoff=false.
  4. --check sends the firmware-version (t) and serial-number (i) commands and prints the model, firmware and serial.

Add to your MCP client

Claude Code

bash
claude mcp add potentiostat -- uvx labmcp-palmsens --address /dev/ttyUSB0

Claude Desktop / Cursor / Windsurf (claude_desktop_config.json, .cursor/mcp.json, …)

json
{  "mcpServers": {    "potentiostat": {      "command": "uvx",      "args": ["labmcp-palmsens", "--address", "/dev/ttyUSB0"]    }  }}

Add --read-only to allow device information only: every measurement tool applies potential and is hidden.

Tools

ToolKindDescription
abort_measurement🛑 safetyAbort the running measurement or script immediately (communication command Z) and make sure the cell is switched off. Safe to call when nothing is running.
get_command_log👁 readReturn the most recent raw commands sent to / replies received from the instrument (newest last). Useful for debugging and for recording what was done.
get_connection_info👁 readReport which instrument is connected (identity, address, simulated or real), whether the server is read-only, and the active safety limits. Call this first.
get_device_info👁 readIdentify the potentiostat (model, firmware, serial number) and list its potential window, PGStat modes and current ranges, so measurement parameters can be chosen within them.
reconnect🛑 safetyClose and re-open the connection to the instrument (e.g. after it was power cycled or a cable was re-plugged).
run_chronoamperometry⚠️ hazardHold the cell at potential_v for run_time_s and record the current every interval_s. Returns the data (time from the instrument timer) plus first/last/mean current and the charge. Applies potential to the cell.
run_cyclic_voltammetry⚠️ hazardRun a cyclic voltammogram: begin -> vertex 1 -> vertex 2 -> begin, n_scans times, and return potential/current/time data with the anodic and cathodic peaks of every scan. Applies potential to the cell for the whole scan; the cell is switched off at the end.
run_differential_pulse_voltammetry⚠️ hazardRun differential pulse voltammetry (current = forward - reverse, per step) from begin to end potential and return the data with the peak current and peak potential. The scan rate must be below step / pulse_time / 2. Applies potential to the cell.
run_linear_sweep_voltammetry⚠️ hazardRun a linear sweep voltammogram from begin_potential_v to end_potential_v and return the data with the largest/smallest current and where they occur. Applies potential to the cell.
run_methodscript⚠️ hazardAdvanced: run a raw MethodSCRIPT and return its raw output and decoded data packages. Literal potentials of set_e / set_range_minmax da and the CV, LSV, DPV, SWV, NPV, ACV, CA, PAD, EIS and fast CV/CA techniques are checked against max_potential_v, and literal set_range ba / set_autoranging ba currents against max_current_range_a; values computed at run time are not. Aborted after timeout_s; add on_finished: + cell_off to your script so the cell is switched off after an abort. After a runtime error, a timeout or abort_measurement the server switches the cell off itself.

Safety limits

LimitDefaultMeaning
max_potential_v2.0 VLargest absolute potential vs RE any technique (or literal in a raw script) may apply, including DPV pulses
max_current_range_a0.01 AHighest current range an agent may select (with autorange, the instrument never goes above current_range_a); in raw scripts, literal set_range ba / set_autoranging ba values
max_duration_s600 sLongest measurement (including equilibration) or raw-script timeout

Override at launch, e.g. --limit max_potential_v=1.0 --limit max_duration_s=1800. Whatever the limits say, a single tool call is capped at one hour.

Example prompts

  • "Run a CV of my ferrocyanide sample from −0.2 V to +0.6 V and back at 50 mV/s, three cycles, and tell me E½ and the peak separation."
  • "Do a scan-rate study: CVs at 25, 50, 100 and 200 mV/s between −0.1 and 0.5 V, save each as CSV, and check whether the peak current scales with √v."
  • "Run DPV from 0 to 0.6 V with 50 mV pulses and report the peak potential and height."
  • "Hold 0.5 V for 60 s, record the current every 0.2 s, and give me the total charge passed."
  • "Which potential window and current ranges does this potentiostat support?"
  • "Abort the measurement."

Notes

  • What the server sends. Each technique is one MethodSCRIPT modelled on PalmSens' measurement-loop examples: set_pgstat_chan 0, set_pgstat_mode, set_max_bandwidth, set_range_minmax da, set_range ba, set_autoranging ba, set_e, cell_on, optional wait, then meas_loop_cv / lsv / dpv / ca with pck_add of the set potential and current, and on_finished: cell_off. So the cell is switched off after completion and after an abort. A runtime error skips on_finished: (MethodSCRIPT manual §10.1), so after one the server sends a separate cell_off script. The exact script is in get_command_log.
  • PGStat mode and bandwidth. Max bandwidth is 6× the data rate (the ratio PalmSens' examples use). On the EmStat Pico and Sensit, the server picks low speed (−1.25 to 2.0 V, 2.2 V window, ≤ 100 Hz), then max range (−1.7 to 2.0 V, 2.6 V window), then high speed (1.214 V window) to fit your potentials. If none fits, it says why before anything is sent. EmStat4 and Nexus use low speed mode; per the manual, the modes do not differ on those instruments.
  • Current sign and units. Anodic (oxidation) current is positive; potentials are the set potentials vs RE; time_s comes from the instrument timer for chronoamperometry and from step/scan rate for sweeps.
  • Summaries. CV peaks are the raw maximum and minimum current of each scan (no baseline correction). ΔEp and the midpoint are estimates. Staircase sampling makes ΔEp somewhat larger than the ideal 59 mV at large steps.
  • Raw scripts. run_methodscript checks literal potentials (and store_var literals) of set_e, set_range_minmax da and the CV/LSV/DPV/SWV/NPV/ACV/CA/PAD/EIS loops and meas_fast_cv/meas_fast_ca against max_potential_v (DPV pulse and 2x SWV amplitude included). Literal current ranges of set_range ba / set_autoranging ba are checked against max_current_range_a. Values computed inside the script are not checked. The script is aborted at timeout_s and a cell_off script is run.
  • Abort. abort_measurement sends the communication-protocol Z command. A running technique returns the data measured so far with aborted: true. Afterwards (and when nothing was running) the server runs a one-line cell_off script, so the cell is also switched off after a raw script without on_finished:. If the output of a running script cannot be read (e.g. a USB glitch), the server aborts the script and switches the cell off before reporting the error; a single corrupted data line is skipped with a warning instead.
  • Saving data. save_path must end in .csv; missing folders are created and an existing file is never overwritten (choose a new name). The path is checked before the measurement starts. Points with a nan value are left out (with a warning).
  • Not covered: galvanostatic techniques, EIS, SWV/NPV/PAD, multiplexers, bipotentiostat mode, multi-channel MultiEmStat4 systems and the CRC16 protocol extension. Use run_methodscript for single-channel scripts beyond the built-in techniques.

Hardware verification

ModelFirmwareInterfaceVerified byDate
none yet: be the first

來源:servers/chemistry/palmsens-potentiostat/README.md,提交 46545ea

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

2
  1. v0.1.3最新Sep 27, 2026
  2. v0.1.1Sep 26, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分