Scopy MCP Server
An MCP (Model Context Protocol) server that lets Claude Code control Scopy by sending JavaScript commands through Scopy's built-in console (QJSEngine).
Say "add device 192.168.2.1, connect to it, and switch to the AD936X tool" and Claude will do it.
Claude Code ──(MCP stdio)──> scopy-mcp-server ──(Unix socket / named pipe)──> Scopy JS engine
<──(Unix socket / named pipe)──
Prerequisites
- Python 3.10+
- Scopy 2.2.1 or newer — download here
- The MCP server enabled in Scopy — open Preferences > General and turn on Enable the MCP server. It is off by default and takes effect immediately, no restart needed.
- Claude Code (CLI, desktop, or IDE extension)
Install
Option A: From PyPI (recommended)
With uv installed, no separate install step is needed. Add this to your .mcp.json:
{
"mcpServers": {
"scopy": {
"command": "uvx",
"args": ["scopy-mcp-server==2.3.0"]
}
}
}
uvx downloads the pinned version on first use. On Windows the pywin32 dependency is installed automatically.
Option B: Download the standalone package (Scopy app users)
Download scopy-mcp-server.zip from the latest CI build artifacts, then:
Linux / macOS:
unzip scopy-mcp-server.zip
cd scopy-mcp-server
python3 setup.py
Windows:
unzip scopy-mcp-server.zip
cd scopy-mcp-server
python setup.py
The script installs dependencies (tries uv, falls back to pip), including the Windows-only pywin32 package on Windows, and prints the .mcp.json snippet to paste into Claude Code.
Option C: From source (developers)
Linux / macOS:
git clone https://github.com/analogdevicesinc/scopy
cd scopy/tools/scopy-mcp-server
bash install.sh
Windows:
git clone https://github.com/analogdevicesinc/scopy
cd scopy\tools\scopy-mcp-server
python setup.py
This regenerates the API metadata from Scopy headers, installs dependencies, and updates the repo's .mcp.json.
Configure Claude Code
Add to your .mcp.json (project root or ~/.claude/.mcp.json for global):
{
"mcpServers": {
"scopy": {
"command": "scopy-mcp-server"
}
}
}
If Scopy is not on your $PATH, set SCOPY_PATH:
{
"mcpServers": {
"scopy": {
"command": "scopy-mcp-server",
"env": {
"SCOPY_PATH": "/path/to/scopy"
}
}
}
}
Allow all Scopy tools without prompting (optional)
By default Claude Code asks for permission on each MCP tool call. To approve all Scopy tools at once, add to .claude/settings.json:
{
"permissions": {
"allow": [
"mcp__scopy__*"
]
}
}
Restart Claude Code after changing .mcp.json.
How it works
The server communicates with Scopy in two modes:
- Attach mode — connects to an already-running Scopy via its
QLocalServersocket (/tmp/scopy_mcpon Linux/macOS,\\.\pipe\scopy_mcpon Windows). Scopy creates it when the Enable the MCP server preference is on (Scopy 2.2.1+). - Launch mode — spawns a new Scopy process and waits for its MCP server socket to appear. Use the
start_scopy()tool.
Each JS command is a fresh connection: connect → send one line → read OK:<result> or ERROR:<msg> → close.
Windows support
On Windows, the bridge uses the Win32 named-pipe API instead of Unix domain sockets. The pywin32 package provides this:
pip install .[windows]
Or with uv:
uv sync --extra windows
The setup.py installer handles this automatically on Windows.
Available tools
Core tools
| Tool | Description |
|---|---|
start_scopy() |
Launch a new Scopy session |
add_device(uri) |
Add a device by URI (e.g. 192.168.2.1) |
connect_device(device_id) |
Connect to an added device |
disconnect_device(device_id) |
Disconnect from a device |
switch_tool(tool_name) |
Switch to a named instrument tool |
Per-plugin tools (auto-generated)
For each Scopy API object (ad936x, adrv9002, regmap, datalogger, etc.), these tools are registered:
| Tool pattern | Description |
|---|---|
{obj}_list() |
List all available methods/parameters |
{obj}_read(key, channel) |
Read a parameter value |
{obj}_write(key, value, channel) |
Write a parameter value |
{obj}_call(method, arg1, ...) |
Call any method on the object |
Usage examples
"List all ad936x parameters" → ad936x_list()
"Read the RX LO frequency" → ad936x_read("rx_lo")
"Set TX gain on channel 0 to -10 dB" → ad936x_write("tx_hardware_gain", "-10", channel=0)
"Add device 192.168.2.1 and connect" → add_device + connect_device
Troubleshooting
| Problem | Fix |
|---|---|
No running Scopy instance ... found |
Use Scopy 2.2.1+ and turn on Preferences > General > Enable the MCP server, then start Scopy or call start_scopy() |
Scopy started but its MCP server did not appear within 30s |
Turn on Enable the MCP server in the Scopy window that opened, then retry the request (no restart needed) |
Scopy binary not found |
Set SCOPY_PATH in .mcp.json env, or add scopy to your PATH |
Scopy did not respond within 10s |
Check Scopy is responsive, try a simpler command |
| MCP server not showing in Claude Code | Check .mcp.json syntax, restart Claude Code |
Cannot connect to Scopy |
Scopy exited — restart it, or call start_scopy() |
error: externally-managed-environment |
Your system Python blocks global pip installs. Install uv and re-run setup.py: curl -LsSf https://astral.sh/uv/install.sh | sh. For more information about this check the official documentation. |
For Scopy developers
Regenerating the API metadata
The scopy_api.json file is generated from Scopy's *_api.h headers. Re-run when the API changes:
python3 tools/scopy-mcp-server/generate_api_tools.py \
--scopy-root . \
--out tools/scopy-mcp-server/scopy_mcp_server/scopy_api.json
Running from source (development)
cd tools/scopy-mcp-server
pip install -e .
scopy-mcp-server
Or using the repo's .mcp.json with uv run:
{
"mcpServers": {
"scopy": {
"command": "uv",
"args": ["run", "--directory", "tools/scopy-mcp-server", "scopy-mcp-server"],
"env": {
"SCOPY_PATH": "/path/to/your/build/scopy"
}
}
}
}
File structure
tools/scopy-mcp-server/
scopy_mcp_server/ # Python package (pip-installable)
__init__.py
server.py # MCP server — loads API JSON, registers tools
bridge.py # Communication bridge (QLocalSocket, cross-platform)
scopy_api.json # Generated API metadata (bundled in wheel)
generate_api_tools.py # Dev tool — parses *_api.h → scopy_api.json
pyproject.toml
README.md
See design.md for architecture details.
Metadata
Release files for scopy-mcp-server 2.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| scopy_mcp_server-2.3.0.tar.gz | 26.6 kB | With provenance | Details for scopy_mcp_server-2.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scopy_mcp_server-2.3.0-py3-none-any.whl | Python 3 | none | any | Details for scopy_mcp_server-2.3.0-py3-none-any.whl |
Total release size: 53.9 kB
Release files / scopy_mcp_server-2.3.0.tar.gz
| Download URL | scopy_mcp_server-2.3.0.tar.gz |
|---|---|
| Size | 26.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1494504504cad9bb33724163869a7cec0aef1841a45866d3899334eecf1563f7
|
|
BLAKE2b-256 checksum How to use checksums |
2bf4d972a39d5983e344d04cacfc4987b2090b7692aa6dd6ecefbb72a8cde69c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / scopy_mcp_server-2.3.0-py3-none-any.whl
| Download URL | scopy_mcp_server-2.3.0-py3-none-any.whl |
|---|---|
| Size | 27.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d0716fbd3b47d7924ae1827afd9828c7ed912f5d84ffc82dbc37f8cab0a3999
|
|
BLAKE2b-256 checksum How to use checksums |
aaf37bd483d5b4432b8d61f020834aa68d28b6bfb2ae4c3dc40de63705cd96ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logSecurity for scopy-mcp-server 2.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for scopy_mcp_server-2.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.