Control via AI (MCP)
ScryLab has a built-in MCP (Model Context Protocol) server. It lets AI agents – Claude Code, Cursor, VS Code with Copilot, and other MCP-capable tools – connect to your running ScryLab instance and work with your data: load measurement files, find signals, apply filters and transforms, compute metrics, and build plots.
The agent works in the same workspace you see on screen. Plots it creates appear live in the GUI, and everything it does goes through the same undo history as your own actions – you can review and undo any step with Ctrl+Z.
Endpoint
http://localhost:5679/mcpInfo
The MCP server is only accessible from the local machine (127.0.0.1) and is never exposed on the network. No authentication is required. The port is fixed.
The server starts automatically with ScryLab. You can disable it under Settings → General → Integrations.
Connecting an AI agent
ScryLab must be running – the agent connects to the live application. The setup is needed only once.
Claude Code
claude mcp add --transport http scrylab http://localhost:5679/mcpCursor
Add the server to ~/.cursor/mcp.json (or .cursor/mcp.json in your project):
{ "mcpServers": { "scrylab": { "url": "http://localhost:5679/mcp" } }}VS Code (Copilot)
Add the server to your user configuration via MCP: Add Server, or to .vscode/mcp.json in your workspace:
{ "servers": { "scrylab": { "type": "http", "url": "http://localhost:5679/mcp" } }}What the agent can do
Every ScryLab command is exposed as an MCP tool, covering the full analysis workflow:
| Area | Examples |
|---|---|
| Data sources | Open measurement files (.mf4, .csv, .h5, …), list and search signals, trim a whole measurement |
| Analysis | Compute metrics (RMS, peak, bandwidth, …), locate events over time, read signal data |
| Operations | Apply filters, FFT, arithmetic and every other ScryLab operation |
| Visualization | Create plots, add signals to existing plots, manage rows, tabs, and layouts |
| Workflow | Undo/redo, reproduce an analysis view on another measurement |
You don’t need to learn these tools yourself – the interface is self-documenting for the agent. Just describe what you want in plain language.
Example prompts
Things you can ask an agent connected to ScryLab:
Load
measurement.mf4and plot lateral acceleration and steering angle.
Low-pass filter the plotted acceleration signal with a sensible cutoff frequency.
Where does the actual maneuver happen in this measurement? Trim the file to that range.
Compute RMS and peak-to-peak for all wheel speed signals and compare them.
I built this analysis view for measurement 1 – apply the same layout to measurement 2.
Good to know
- Shared workspace: the agent sees your current plots and signals and is instructed to build on them instead of duplicating. You can keep working in the GUI between prompts.
- Undo: the agent’s actions land in the normal undo history. If it does something you don’t like, Ctrl+Z works as always – or just tell the agent to undo it.
- Sending files as signals: when an agent pushes local
.npz/.matfiles into ScryLab, the upload goes through the local REST API. Keep the REST API enabled in Settings → General → Integrations if you use this.
Troubleshooting
| Problem | Solution |
|---|---|
| Agent cannot connect | Make sure ScryLab is running and the AI interface is enabled under Settings → General → Integrations. |
| ”Port 5679 already in use” in the log | Another application occupies the port. Close it and restart ScryLab – the port cannot be changed. |
| File upload fails | The REST API is disabled. Enable it under Settings → General → Integrations. |