execute_codeLABSCO SUMMARY
Filtering next to the data instead of in the context window.
The idea is simple and the effect is large: asking for AIS targets normally means every target lands in the model's context, when the question was "which three are closest". Running the filter in the isolate means the model sees the three. Two practical notes — every SDK function is async and must be awaited, and version 1.0.6 changed the default mode from hybrid to code, so the legacy tools are gone unless you set EXECUTION_MODE=tools.
What it is
A marine data server for SignalK. Instead of returning whole datasets as tool output, it runs agent-written JavaScript in a V8 isolate next to the data and returns only what that code produces.
What you get
execute_codeis the entry point — it runs your JavaScript in an isolated-vm sandbox with no access to Node.js globals- Inside that sandbox:
getVesselState()for position, heading, speed and wind;getAisTargets()for nearby vessels with pagination and a distance filter;getActiveAlarms()for notifications listAvailablePaths()discovers what the server publishes;getPathValue()reads one path such as navigation.speedOverGroundgetConnectionStatus()reports connection health — like every SDK function, it must be awaited- Several calls can be combined in one execution, so a situation report is one round trip rather than three
Requirements
The npm package signalk-mcp-server, version 1.0.8, run with npx, and Node.js 18.0.0 or higher. Point it at your SignalK server with SIGNALK_HOST, SIGNALK_PORT and SIGNALK_TLS. EXECUTION_MODE selects code (the default), tools for the legacy tool surface, or hybrid during a migration. Execution is bounded: 128MB memory and a 30s maximum per run, and it is read-only — nothing is written back to SignalK.
Setup effort
One command — npx signalk-mcp-server
USE CASES
Asking for a situation report
One execution pulls vessel state, AIS targets and alarms and returns only the summary you asked for.
Finding the vessels that actually matter
Filter AIS targets by distance inside the sandbox so only the near ones come back.
Checking for anything alarming
Read active alarms and keep only the ones in alarm or emergency state.
Exploring an unfamiliar SignalK installation
List the available paths, then read the specific values you care about.
1 tool
Listed in project docs. Your client may show a different list.
BEFORE YOU INSTALL
What to know first
Tools you get
1 tool named in the project's documentation.
Requires
- npx on PATH
- Node.js 18.0.0 or later
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
npx signalk-mcp-serverMCP Clients
Claude Desktop
{
"mcpServers": {
"signalk": {
"command": "npx",
"args": [
"signalk-mcp-server"
],
"env": {
"SIGNALK_HOST": "localhost",
"SIGNALK_PORT": "3000",
"SIGNALK_TLS": "false"
}
}
}
}