Labsco
MCP SERVER

SignalK MCP Server

by tonybentley

Query a boat's SignalK data by writing JavaScript that filters inside a sandbox, so only the answer comes back.

IoT, Smart Home & Embedded Hardware
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_code` is 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.speedOverGround
  • `getConnectionStatus()` 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