Getting Started

This guide walks you through downloading, installing, and configuring the Keysight MCP Server for Instrument Control with your AI client.

Prerequisites

  • Windows 10 or Windows 11 (64-bit)
  • Keysight IO Libraries Suite (IOLS) 2026 or later, required for VISA-based instrument communication over USB or GPIB. LAN instruments can connect directly by IP address or hostname without it.
  • Any MCP-compatible AI client. All MCP-compatible clients should work. We have tested primarily with Claude Code, Claude Desktop, and GitHub Copilot.

Step 1: Download and Install

Download the latest Keysight MCP Server for Instrument Control from the Keysight website:

  1. Open File Explorer and navigate to the download location.
  2. Run the MCP executable and follow the on-screen instructions to install it.
  3. After installation, the installed files are located under:
    C:\Program Files\Keysight\MCP\Instrument Control\

Step 2: Configure Your AI Client

Register the MCP server with your AI client so it can find and launch it. We provide tested, step-by-step setup below for Claude Code, Claude Desktop, and GitHub Copilot. If you use a different MCP-compatible client, consult that client's documentation for how to add an MCP server — the configuration follows the same general pattern.

Common Config File Locations

AI Client Config File
Claude Code / VS Code Extension <project>/.mcp.json
Claude Desktop %APPDATA%\Claude\claude_desktop_config.json
GitHub Copilot .vscode/mcp.json

Using a different MCP-compatible AI client? Consult that client's documentation for how to add an MCP server.

Configuration Settings

All MCP-compatible AI clients use a JSON configuration block in the same format. The command field must point to the exact filename you installed.

Argument Value Description
-transport stdio, http, or sse

Select one of the following communication transport methods:

  • stdio – For local AI clients.

  • http (endpoint: /mcp) – For HTTP-based connections.

  • sse (endpoint: /sse) – For Server-Sent Events (SSE) connections.

TLS is supported when a certificate and key are provided during startup.

-http-allowed-origins (empty) Applies to the http and sse transports. Sets the allowed value for the Origin header on incoming requests; the server rejects any request with a non-matching Origin header and returns HTTP 403. Omit this argument, or pass an empty string, to allow all origins — there is no "allow all" keyword; passing that or any other literal text is treated as the one allowed origin value, so real requests will be rejected (see Security).
-visa-provider ks

Selects the VISA provider. Use

  • ks for Keysight IO Libraries Suite,

  • ni for National Instruments VISA,

  • rs for Rohde & Schwarz VISA,

  • socket to connect to LAN instruments directly with no VISA library installed, or

  • mock for simulation without hardware.

If you omit this argument, the server uses ks. To use the generic IVI VISA router instead, set this argument to an empty string. If the driver for ks, ni, or rs isn't installed or fails to load, the server automatically falls back to the socket method.

-log-level warn Sets the log verbosity. Accepted values are debug, info, warn, and error.
-scpi-poll-instrument-errors true Controls when the server checks the instrument's error queue during a command sequence. True is the default: the server checks after each command and stops the sequence as soon as one fails. False: the server checks only once, at the end of the sequence, and keeps running even if a command fails. Pass this flag with an equals sign, for example -scpi-poll-instrument-errors=false. Passing the flag and value as two separate arguments does not work.
-file-transfer-local-base-dir (empty) When set, restricts file operations to this directory tree. Omitting local_path for capture_screenshot saves files into this directory instead of the OS temporary directory. For upload_file, download_file, and explicit local_path values in capture_screenshot, the server rejects any path that escapes this directory tree (see Security).

Example: Claude Code (CLI and VS Code Extension)

Create the file .mcp.json at the root of your project workspace if it does not already exist, and add the following. If the file already exists, for example because you have registered other MCP servers, add the keysight-instrument-control entry to its existing mcpServers object instead of replacing the file:

<your-project>/.mcp.json
{ "mcpServers": { "keysight-instrument-control": { "type": "stdio", "command": "C:\\Program Files\\Keysight\\MCP\\Instrument Control\\mcp-instrument-control.exe", "args": ["-transport", "stdio", "-visa-provider", "ks", "-log-level", "warn"] } } }

Restart Claude Code after saving. The MCP server appears automatically in the session.

Example: GitHub Copilot

Assuming Copilot is integrated with VS Code, create a .vscode folder at the root of your project workspace, then create mcp.json inside it:

<your-project>/.vscode/mcp.json
{ "servers": { "keysight-instrument-control": { "type": "stdio", "command": "C:\\Program Files\\Keysight\\MCP\\Instrument Control\\mcp-instrument-control.exe", "args": ["-transport", "stdio", "-visa-provider", "ks", "-log-level", "warn"] } } }

Restart VS Code after saving. The MCP server appears automatically for Copilot.

Step 3: Verify the Installation

After configuring your client, verify connectivity by asking the AI:

Verification Prompt
Discover available instruments.

The server should respond with a list of VISA resources on your system. If no instruments are found, check that:

  • Keysight IO Libraries Suite (IOLS) is installed and running.
  • Your instrument is powered on and connected (USB, LAN, or GPIB).
  • The VISA resource string is visible in Keysight Connection Expert.

For a LAN instrument, you can also connect directly by asking the AI to connect to the instrument's IP address or hostname, without IOLS or Connection Expert.

Troubleshooting

Symptom Likely Cause Fix
Server not listed in AI client Config file not saved or wrong path Re-check the JSON file path and restart the client.
Command not found error Executable path incorrect Verify the .exe exists at the configured path.
No instruments discovered IOLS not installed, instrument offline, or not registered in Connection Expert Install Keysight IO Libraries Suite and check Connection Expert, or connect directly using the instrument's IP address or hostname.
Permission denied Not running as administrator Run the AI client as Administrator, or move the executable to a non-admin path.