Skip to content

AI access

LabOrchestra has an MCP endpoint. An AI client such as Claude Code or Claude Desktop can use it to look at devices and states, read logs, history and recordings, and (only if you allow it) call actions, run procedures and start recordings. The tools are the same on every client: see the list of tools.

The AI access panel on the Devices page, with the mode Off, Read-only or Control and buttons to set up Claude Code and Claude Desktop.The AI access panel on the Devices page, with the mode Off, Read-only or Control and buttons to set up Claude Code and Claude Desktop.

AI access is Off by default. On the Devices page, AI access, choose:

  • Read-only: Claude can look but not touch.
  • Control: Claude can also call actions, run and abort procedures, record and take notes.

Every connection has its own token and its own mode; the lower of that and the global one applies. Each action is recorded in the event log with the caller mcp:<name of the token>, which is your audit log. You can revoke a token at any time.

Click Set up Claude Code or Set up Claude Desktop. This makes a token, sets up the client and switches AI access on, to the mode you chose, if it was off. Restart the client afterwards.

Your AI client is usually on your laptop, not on the lab PC. Turn on network access, then click Create connection. The token is shown once, with three commands to copy:

A newly created connection: the token is shown once, with the commands to set up Claude Code and Claude Desktop on the other computer.A newly created connection: the token is shown once, with the commands to set up Claude Code and Claude Desktop on the other computer.
  • uvx --from laborchestra laborchestra mcp install --url <address> --token <token> --bridge uvx sets up Claude Code and Claude Desktop where it finds them.
  • claude mcp add --transport http … connects Claude Code directly to the endpoint.
  • A .mcp.json snippet, with the token read from an environment variable, for a project.

Claude Desktop only starts local programs, so it connects through a small bridge, laborchestra mcp serve, which forwards everything to the server with your token. Claude Code can talk to the server directly. In both cases the server decides what is allowed.

Let an AI write devices, procedures and widgets

Section titled “Let an AI write devices, procedures and widgets”

Most labs use the AI to write what is specific to them: the driver for an instrument, a scan, a widget. LabOrchestra brings the knowledge an assistant needs, so it does not have to guess:

  • In the workspace, by itself. A few seconds after the server starts, it writes into your workspace a skill for each kind of file (.claude/skills/laborchestra-device/, -service, -procedure, -widget, -script, and laborchestra with the rules for names, values and files) and, if they do not exist, an AGENTS.md and a CLAUDE.md that imports it. Claude Code reads them when you ask it to write such a file. A new version of LabOrchestra brings newer skills the next time it starts. A skill you edited by hand (remove the first comment line to say so) is left alone, and so is AGENTS.md, which is yours: write down what is specific to your lab, such as which instruments must never be moved without asking. Update AI guides now on the Devices page (AI access) does the same at once. To switch all of this off, set workspace_files to false in the server settings.
  • Through MCP. The tool get_docs gives the same texts to a client that has no access to your files, such as Claude Desktop. Such a client can explain, inspect and operate, but it cannot create or change files in your workspace: MCP has no tool for that on purpose (a token that may write code could run anything on the lab computer). For writing code, use Claude Code or an editor in the workspace folder; a client with MCP only hands the code over for you to save.
  • The feedback loop. An assistant that is connected through MCP can see whether its code works: get_problems, get_logs and describe_device show errors and the schema it produced; get_problems also lists channels whose status is not ok and devices that still run old code (needs_restart), and restart_device starts such a device again. list_widgets shows whether a widget was built. get_problems says ok only when no device is failing and no error is current: a device’s errors count until it is started again, so a repair ends them. A crash is one log entry with its whole traceback. Without MCP, laborchestra dev runs a device in your own terminal or debugger.

New devices start simulated. Switching to real hardware is your decision.