Skip to main content
MCP server CX Codex

Thorlabs Optical Power Meter — Claude Code MCP server: what it does

An MCP server for Thorlabs power meters. Your agent can take readings, log stability over time, and change wavelength, averaging and range over SCPI.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env LABMCP_ADDRESS=<LABMCP_ADDRESS> --env LABMCP_SIMULATE=<LABMCP_SIMULATE> --env LABMCP_READ_ONLY=<LABMCP_READ_ONLY> --env LABMCP_LIMITS=<LABMCP_LIMITS> --transport stdio thorlabs-power-meter -- uvx labmcp-thorlabs-pm
Open on GitHub

What Thorlabs Optical Power Meter does

The server talks to PM100D, PM100A, PM100USB and PM400 consoles over USB, using USBTMC through VISA, and speaks the documented SCPI command set. PM101 and PM5020 share those commands but have not been checked against hardware.

Its tools cover a single power reading, a logged series with mean, standard deviation and drift, sensor head temperature, plus control over correction wavelength, averaging, range and dark zeroing. Three tools come from the shared LabMCP base: get_connection_info, get_command_log and reconnect. Launch with --read-only and readings still work while wavelength, averaging, range and zero changes are blocked.

No meter on the bench? uvx labmcp-thorlabs-pm --simulate --check starts a PM100D simulator. On Windows PyVISA cannot see the Thorlabs driver, so you install the NI-VISA runtime and switch the meter over with Thorlabs Driver Switcher. On Linux the device needs a udev rule for vendor ID 1313. Zeroing only works with the beam blocked and the aperture covered, so the agent asks you to confirm first.

What it helps with

  • read laser power without typing SCPI commands by hand
  • log a run of readings and see warm-up drift
  • match the correction wavelength to the sensor head
  • dark-zero the sensor with the beam blocked
  • verify the connection before trusting a measurement

Example prompts for the agent

  • Connect to the power meter and show which console and sensor head you found
  • Log a series of power readings and report stability and drift
  • Set the correction wavelength to 632.8 nm and read the power

How to install Thorlabs Optical Power Meter

Platform CLI

claude mcp add --env LABMCP_ADDRESS=<LABMCP_ADDRESS> --env LABMCP_SIMULATE=<LABMCP_SIMULATE> --env LABMCP_READ_ONLY=<LABMCP_READ_ONLY> --env LABMCP_LIMITS=<LABMCP_LIMITS> --transport stdio thorlabs-power-meter -- uvx labmcp-thorlabs-pm

Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-thorlabs-pm <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Thorlabs Optical Power Meter

How do I install Thorlabs Optical Power Meter in Claude Code?

Run claude mcp add labmcp-thorlabs-pm -- uvx labmcp-thorlabs-pm. To pass environment variables instead, use `claude mcp add --env LABMCP_ADDRESS=<LABMCP_ADDRESS> --env LABMCP_SIMULATE=<LABMCP_SIMULATE> --env LABMCP_READ_ONLY=<LABMCP_READ_ONLY> --env LABMCP_LIMITS=<LABMCP_LIMITS> --transport stdio thorlabs-power-meter -- uvx labmcp-thorlabs-pm`.

What does Thorlabs Optical Power Meter do?

It lets an agent read power from Thorlabs meters, log a series of readings, and adjust instrument settings over SCPI: wavelength, averaging, range and sensor zeroing.

Can I try it without a power meter?

Yes. The --simulate flag starts a PM100D simulator with an S120C photodiode or S302C thermopile, and uvx labmcp-thorlabs-pm --simulate --check runs the check.

Similar MCP servers

Everything for Science and research →

From the same set7

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor