Security
Keysight MCP Server for Instrument Control applies the following restrictions to reduce risk when the MCP server writes local files and accepts network connections.
Origin Header Validation
When using the http or sse transport, the server checks the Origin header on incoming requests against the value of the -http-allowed-origins startup argument, and rejects any request with a non-matching Origin header with HTTP 403.
By default, -http-allowed-origins is empty and the server allows all origins. There is no "allow all" keyword — passing a literal value such as "allow all" sets that literal text as the one allowed origin, which causes every real request to be rejected. To allow all origins, omit the argument entirely or pass an empty string.
File Transfer Path Restrictions
By default, the server can read and write local files anywhere. When you set the -file-transfer-local-base-dir startup argument to a non-empty path (relative or absolute), the server constrains local file writes to that directory tree for the following tools:
capture_screenshot— when you omitlocal_path, the server saves the capture into the configured directory instead of the OS temporary directory.upload_file,download_file, andcapture_screenshotwith an explicitlocal_path— the server rejects any path that escapes the configured directory tree.
If a request targets a destination outside the configured directory tree, the server saves the file inside the configured directory first, then copies it to the requested destination.
Leaving -file-transfer-local-base-dir unset or empty leaves file operations unrestricted.