activepieces
An open-source Zapier alternative; every integration is also available as an MCP server.
ACactivepieces/activepieces26k119 new stars in the last 7 days
MCP server for Thorlabs optical power meters (PM100 family, PM400, PM101, PM5020) over SCPI.
Let an AI agent read laser power, log stability and warm-up drift, set the wavelength correction, averaging and range, and dark-zero the sensor on Thorlabs optical power meters through their documented SCPI command set over USB (USBTMC / VISA).
| Package | labmcp-thorlabs-pm |
| Instruments | PM100D, PM100A, PM100USB, PM400 consoles with C-series photodiode and thermal sensors. PM101 and PM5020 use the same documented commands but are unverified (see Notes) |
| Interfaces | USB (USBTMC, via VISA) |
| Protocol | SCPI: PM100D Operation Manual 17654-D02 §6.4, PM100USB Operation Manual 19570-D02 §6.3, PM400 Operating Manual v1.1 §5.5, and Thorlabs' per-model SCPI command references |
| Status | 🧪 simulated: tested against a wire-level SCPI simulator, not yet verified on hardware. Report a hardware test |
uvx labmcp-thorlabs-pm --simulate --check
uvx labmcp-thorlabs-pm --simulate --option sim_sensor=S302C --check # thermal sensor head
The simulator is a PM100D with an S120C photodiode (or S302C thermopile) looking at a 1.234 mW, 632.8 nm HeNe laser. Setting the wrong wavelength on the photodiode gives a proportionally wrong reading, as on the real bench.
0x1313.
?backend=@ivi (see below). This is the route Thorlabs documents for PyVISA./etc/udev/rules.d/99-thorlabs-pm.rules:
SUBSYSTEM=="usb", ATTR{idVendor}=="1313", MODE="0666"
then sudo udevadm control --reload-rules and re-plug the meter. NI-VISA also works (?backend=@ivi).brew install libusb); NI-VISA is an alternative.uvx labmcp ports (or python -m pyvisa info). It looks like USB0::0x1313::0x8078::P0012345::INSTR (the product ID depends on the model: PM100D 0x8078, PM100USB 0x8072).uvx labmcp-thorlabs-pm --address USB0::0x1313::0x8078::P0012345::INSTR --check
uvx labmcp-thorlabs-pm --address "visa://USB0::0x1313::0x8078::P0012345::INSTR?backend=@ivi" --check # NI-VISA
For the second input of a PM5020 add --option channel=2.Claude Code
claude mcp add power-meter -- uvx labmcp-thorlabs-pm --address USB0::0x1313::0x8078::P0012345::INSTR
Claude Desktop / Cursor / Windsurf (claude_desktop_config.json, .cursor/mcp.json, …)
{
"mcpServers": {
"power-meter": {
"command": "uvx",
"args": ["labmcp-thorlabs-pm", "--address", "USB0::0x1313::0x8078::P0012345::INSTR"]
}
}
}
Add --read-only to allow readings but block wavelength, averaging, range and zero changes. For other clients, generate the snippet with uvx labmcp config thorlabs-pm --address <resource> --client vscode (also cursor, codex, claude-code).
| Tool | Kind | Description |
|---|---|---|
get_command_log | 👁 read | Return 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 | 👁 read | Report 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 | 👁 read | Identify the meter console and the attached sensor head (model, serial, type, wavelength range, power ranges), and report the present wavelength, averaging, range and zero value. |
log_power_series | 👁 read | Log a series of power readings to characterise laser stability, warm-up or drift. Returns mean, stdev, min/max, RMS and peak-to-peak stability (%) and drift (%/min), plus the readings (downsampled to max_points; use save_path, a new .csv file, to keep all of them). |
read_power | 👁 read | Read the optical power once (in W, plus dBm and a formatted string). The reading uses the configured correction wavelength and averaging; set the wavelength first. |
read_sensor_temperature | 👁 read | Read the sensor head temperature in °C (thermal sensors and other heads with a built-in temperature sensor only). |
reconnect | 🛑 safety | Close and re-open the connection to the instrument (e.g. after it was power cycled or a cable was re-plugged). |
set_averaging | 🎛 control | Set how many samples the meter averages for each reading. More averaging lowers noise but slows each reading (PM100 series: ~3 ms per sample; PM400/PM101/PM5020: 1 ms). |
set_range | 🎛 control | Select auto-ranging, or a fixed power range that fits range_w (the meter picks the most sensitive range that can hold that power). A fixed range reports over-range if exceeded. |
set_wavelength | 🎛 control | Set the correction wavelength (nm) the meter uses to convert sensor signal to power. Must be within the sensor's calibrated range (see get_device_info); sent as a whole number of nm. |
zero_sensor | 🎛 control | Dark-zero the sensor (removes dark current / thermal offset). BEFORE calling, ask the user to block the beam and cover the sensor aperture completely, and wait for them to confirm: zeroing with light on the sensor corrupts all later readings. Takes a few seconds. |
get_connection_info, get_command_log and reconnect are built into every LabMCP server.
A power meter only measures, so this server has no hazard tools. Your laser is the hazard: wear the right eyewear and never exceed the sensor's rated power or power density.
| Limit | Default | Meaning |
|---|---|---|
max_series_duration_s | 600 s | Longest power-logging series an agent may start, estimated as count × max(interval, reading time), where a reading takes averaging × 3 ms plus ~10 ms |
Override at launch: --limit max_series_duration_s=3600. One call can log at most 3640 s (the tool's timeout minus a margin): longer estimates are refused, and a series that runs slower than estimated stops early and returns what it measured (completed: false). save_path must end in .csv and must not exist yet (an existing file is never overwritten); it is checked before logging starts.
MEAS:POW? answers in the meter's configured unit (W or dBm). The driver reads SENS:POW:UNIT? first and always returns watts, so a front-panel unit change can't mislead the agent.SENS:CORR:COLL:ZERO) runs in the background. The server polls …:ZERO:STAT?, checks the error queue, and returns the zero value (…:ZERO:MAGN?). Zero values are lost when the meter reboots.SENS:AVER:COUN. One sample takes ~3 ms on the PM100 series and 1 ms on the PM400/PM101/PM5020. The reply timeout scales with the averaging count.SENS2, MEAS2, SYST:SENS2:IDN?), selected with --option channel=2. Neither has been tested yet, and PM5020 LAN/serial connections have not been tried. The PM100D's Windows TLPM DLL driver is not used; this server speaks SCPI only.-222,"Data out of range") use the standard SCPI code. The Thorlabs documents only list -113,"Undefined header" explicitly.| Model | Firmware | Interface | Verified by | Date |
|---|---|---|---|---|
| none yet: be the first |
An open-source Zapier alternative; every integration is also available as an MCP server.
ACactivepieces/activepieces26k119 new stars in the last 7 days
Gives your agent docs for 2,900+ n8n nodes so it can build workflows for you.
CZczlonkowski/n8n-mcp23k29 new stars in the last 7 days
Control real Android and iOS devices with LLM agents — tap, swipe, type, automate flows.
DRdroidrun/mobilerun10k66 new stars in the last 7 days
Build effective agents using Model Context Protocol and simple workflow patterns
LAlastmile-ai/mcp-agent8.6k
A Model Context Protocol (MCP) server that provides structured spec-driven development workflow tools for AI-assisted software development, featuring a real-time web dashboard and VSCode extension for monitoring and managing your project's progress directly in your development environment.
PIPimzino/spec-workflow-mcp4.3k1 new stars in the last 7 days