AI Agent Integration (MCP)

The Zahner Lab can optionally connect to an AI agent, such as Claude, via a small companion programme called the MCP Server. Once connected, you can ask the agent questions about your own Zahner Lab setup in plain language and get answers that are grounded in your actual installation: your measurement methods, hardware settings, dashboards, custom experiments, the Custom Experiment Builder blocks, and even the complete Zahner documentation you are reading right now.

Claude using the zahnerlab MCP server to create a custom experiment in the Zahner Lab Custom Experiment Builder.

This page explains - also for readers without any programming background - what an MCP server is, what it can and cannot do, how to install it, and how to connect it to your AI client.

What Is an MCP Server?

AI agents (the chat-style helpers you may already know) normally only know what they were trained on: general, public knowledge from the internet. They do not know anything about your Zahner Lab - which potentiostat you configured, which dashboards you saved, or the exact parameters and units a given measurement method expects.

The Model Context Protocol (MCP) is an open, standardized way to give an AI agent a safe, well-defined window into a specific program on your computer. A helpful way to picture it: MCP is a universal adapter - a bit like a USB port - that lets the agent plug into Zahner Lab and look things up directly, instead of guessing from generic knowledge.

zahnerlab-mcp is the small program that provides this window. It is called the MCP server. It runs locally on your own computer and is started automatically by your AI client - there is no website to visit, no port to open by hand.

Note

Think of it as a knowledgeable agent sitting next to you in the Lab. It can look things up and explain them - which parameters a method needs, what a hardware field means, what a documentation page says, which blocks exist in the Custom Experiment Builder - and it can even open the right method in Zahner Lab and fill in the parameters for you. What it never does is press Start or touch the instrument itself.

What the Agent Can and Cannot Do

Most of what the server does is read, search and validate. On top of that it has a bounded set of write and GUI-control actions. In short:

  • It reads and explains:

    • Measurement methods. Their parameters and the units each field expects.

    • Builder blocks. The full Custom Experiment Builder block catalogue.

    • Your content. Your dashboards and custom experiments.

    • Documentation. The complete Zahner documentation you are reading now.

    • Validation and suggestions. It validates parameter sets and hardware settings, and proposes parameters for a stated goal.

  • It can make a few bounded changes:

    • Hardware settings. Save them to your stored configuration.

    • Custom experiments. Write new ones and edit existing ones - create, update or delete them, exactly as the corresponding Zahner Lab dialogs would.

  • It can drive a running Zahner Lab:

    • Open pages. Open a method, custom experiment or documentation page in the app.

    • Fill parameters. Fill a method’s parameter fields for you.

  • Two things it never does:

    • It never runs a measurement. It never arms, starts or stops anything.

    • It never contacts or configures a live device.

The MCP server helps you understand, plan, prepare and set up experiments - it can even lay them out in a running Zahner Lab. To actually start and automate measurements, use the APIs, which control the IM7 directly.

Under the hood, the server speaks MCP over stdio (newline-delimited JSON-RPC 2.0). The AI client launches the executable as a child process and communicates with it through standard input and output.

Caution

The AI agent itself may run as a cloud service. Any content the server reads on request - method metadata, hardware settings, dashboards, or custom experiments - is sent to the agent as context so it can answer. Keep this in mind when working with confidential configurations, and follow your organization’s data-handling policy for the AI client you use.

You choose which AI client and model to use - whether it runs locally on your own hardware or in the cloud - and you remain responsible for that choice and for the data the model processes. Zahner only provides the MCP tools: the local interface through which a model you connect can read your Zahner Lab content and, if you permit it, optionally control the Lab. Zahner neither selects nor operates the model, and the agent only ever acts on the requests you make.

Every AI and can make mistakes. Please double-check responses.

Your Documentation, Explained on Demand

A standout capability is that the agent can search and read the complete Zahner documentation - the very help you are reading now - and explain it to you in plain language.

Instead of scrolling through pages yourself, you can just ask. The agent runs a full-text search over the installed documentation, reads the relevant pages, and answers your question in context. If you like, it can then open that page directly in Zahner Lab’s built-in help browser.

Note

Try prompts such as “Search the Zahner Lab documentation for galvanostatic EIS and explain when to use it” or “How to connect an EL1002 with EXT?” You get a plain-language answer grounded in the official documentation - without leaving your agent.

Installation

The server ships as the optional MCP Server component in the Zahner Lab installer. During installation, tick MCP Server on the component-selection page.

After installation the executable lives next to the main application:

Platform

Default path

Windows

C:\Program Files\Zahner\ZahnerLab\bin\zahnerlab-mcp.exe

Linux

/opt/Zahner/ZahnerLab/bin/zahnerlab-mcp

Note

These are the default installation locations. If you chose a different install directory during setup, substitute it in the examples below.

The server reads block definitions, method metadata, dashboards and custom experiments from the installed application. Most of this - the block definitions, the method schema, the parameter help - is compiled into the executable, so no extra files or source tree are required.

Connecting It to Your AI Client

The MCP server works with any MCP-capable client. The following sections show the most common ones. In every case you only point the client at the executable path - no arguments or environment variables are required.

Claude Desktop

Install the Zahner Lab extension for Claude Desktop. Open Settings → Extensions → Advanced settings → Install Extension, then select the .mcpb file.

The .mcpb file is located in the Zahner Lab installation directory, for example:

"C:\Program Files\Zahner\ZahnerLab\resources\claude\ZahnerLab-26.26.0-win32-x64.mcpb"

For more details, see the official Anthropic guide Getting started with local MCP servers on Claude Desktop.

Claude Code (CLI)

Register the server once with claude mcp add. Use user scope to make it available in every project, or project scope to share it with a repository via .mcp.json.

On Windows:

claude mcp add zahnerlab --scope user --command "C:\Program Files\Zahner\ZahnerLab\bin\zahnerlab-mcp.exe"

On Linux:

claude mcp add zahnerlab --scope user --command /opt/Zahner/ZahnerLab/bin/zahnerlab-mcp

Then restart Claude Code and verify the connection:

/mcp

You should see zahnerlab listed as connected, together with its tools and resources.

Codex CLI

Codex reads MCP servers from ~/.codex/config.toml (%USERPROFILE%\.codex\config.toml on Windows). Add an [mcp_servers.zahnerlab] table - on Windows:

[mcp_servers.zahnerlab]
command = "C:\\Program Files\\Zahner\\ZahnerLab\\bin\\zahnerlab-mcp.exe"

On Linux:

[mcp_servers.zahnerlab]
command = "/opt/Zahner/ZahnerLab/bin/zahnerlab-mcp"

Alternatively, register it from the command line. On Windows:

codex mcp add zahnerlab -- "C:\Program Files\Zahner\ZahnerLab\bin\zahnerlab-mcp.exe"

On Linux:

codex mcp add zahnerlab -- /opt/Zahner/ZahnerLab/bin/zahnerlab-mcp

Then list the configured servers to confirm it is registered:

codex mcp list

Other MCP Clients

Any stdio-capable MCP client works - point its command at the executable path. No arguments or environment variables are required.

Verifying the Connection

Ask your agent something simple that forces a tool call, for example:

“Use the zahnerlab server to list the available measurement methods.”

The agent should call list_methods and return techniques such as cv (cyclic voltammetry), geis, dpv, and so on.

Claude Code calling the zahnerlab MCP server's list_methods tool and returning the available Zahner Lab measurement methods.

Example Prompts

Once the server is connected, you can simply talk to your agent. A few examples to get started:

Read, search & explain

  • “Search the Zahner Lab documentation for galvanostatic EIS and explain when I should use it.”

  • “Show me the Blockly blocks related to impedance, and the full definition of the im7_ramp block.”

  • “List my dashboard presets and describe the first one.”

  • “Are these hardware settings valid for my configured potentiostat?”

  • “I want to run an EIS scan from 1 kHz to 100 kHz down to 100 mHz with 10 points per decade - suggest the parameters.” (The agent returns a proposed patch; it does not change anything.)

Write (to your stored configuration / files)

  • “Create a custom experiment based on the Chronoamperometry template with a 2 V step.” (Built from a validated Blockly workspace and written to a new .zcx file.)

  • “Delete my old test custom experiment.” (Irreversible - the agent should confirm first.)

GUI control (Zahner Lab must be running)

  • “Open potentiostatic EIS in Zahner Lab and fill in a 10 mV amplitude.” (Validates, then fills the parameter fields in the running GUI - it does not start the run.)