Skip to main content
Glama
rov-telemetry-mcp

rov-telemetry-mcp

rov-telemetry-mcp

CI

A read-only Model Context Protocol server that lets an AI assistant read live telemetry from an underwater vehicle (ROV) that speaks MAVLink, such as one running ArduSub.

Ask "how deep is the vehicle and is it safe to keep diving?" and the assistant calls the tools below, gets depth, attitude, battery and link state in real units, and checks them against your operating limits.

It ships with a built-in dive simulator, so it runs with no vehicle and no extra software.

Why read-only

Every tool only reads. There is no tool to arm the vehicle, move it, change a mode or set a parameter, and the HTTP client only ever issues GET requests. A language model can misread a situation, so this server lets it observe and advise while a human stays in control of the thrusters. Both properties are covered by tests.

Related MCP server: ardupilot-mavlink-mcp

Tools

Tool

Returns

get_telemetry_snapshot

Status, depth, attitude and battery in one call

check_vehicle_health

Overall verdict (ok, warning, critical) plus each finding, checked against the configured limits

get_vehicle_status

Armed state, flight mode, autopilot state, seconds since the last heartbeat

get_depth

Depth (m), vertical speed (m/s), water temperature (°C), absolute pressure (hPa)

get_attitude

Roll and pitch (degrees), compass heading

get_battery

Voltage (V), current (A), remaining charge (%)

list_available_messages

Names of the MAVLink messages the vehicle is sending

get_raw_message

The latest raw MAVLink message of one type, wire units untouched

There is also one prompt, pre_dive_check, which asks the assistant for a go / no-go review.

Each tool returns a short readable summary and typed structuredContent with a published output schema. A reading the vehicle has not reported comes back as null, never as 0 or a default, so the model cannot mistake "no data" for "zero metres".

Health rules

Finding

Severity

Trigger

NO_HEARTBEAT

critical

No heartbeat has ever been received

STALE_TELEMETRY

critical

Last heartbeat older than ROV_STALE_AFTER_S

AUTOPILOT_FAILSAFE

critical

Autopilot reports MAV_STATE_CRITICAL or MAV_STATE_EMERGENCY

LOW_BATTERY_VOLTAGE

critical

Voltage below ROV_MIN_BATTERY_V

BATTERY_NEARLY_EMPTY / BATTERY_LOW

critical / warning

Under 10% / under 20% remaining

DEPTH_LIMIT_EXCEEDED / NEAR_DEPTH_LIMIT

critical / warning

Beyond ROV_MAX_DEPTH_M / within 10% of it

EXCESSIVE_TILT

warning

Roll or pitch beyond ROV_MAX_TILT_DEG

NO_DEPTH_DATA, NO_BATTERY_DATA

info

The vehicle is not reporting that reading

Quick start

Requires Node.js 22 or newer.

git clone https://github.com/priyanshu3027/rov-telemetry-mcp.git
cd rov-telemetry-mcp
npm install
npm run build

Add the server to an MCP client. For Claude Code, put this in .mcp.json in your project; for Claude Desktop, add the same entry to claude_desktop_config.json:

{
  "mcpServers": {
    "rov-telemetry": {
      "command": "node",
      "args": ["/absolute/path/to/rov-telemetry-mcp/dist/index.js"]
    }
  }
}

With no configuration the server uses the simulator: the vehicle arms, descends at 0.4 m/s to 12 m, then holds depth while slowly turning and draining its battery. Try asking:

  • "What is the vehicle doing right now?"

  • "Run a pre-dive check."

  • "Show me the raw SYS_STATUS message."

Connecting to a vehicle

The server reads MAVLink through mavlink2rest, which exposes a vehicle's MAVLink stream as a REST API. Point the server at it with MAVLINK2REST_URL:

{
  "mcpServers": {
    "rov-telemetry": {
      "command": "node",
      "args": ["/absolute/path/to/rov-telemetry-mcp/dist/index.js"],
      "env": {
        "MAVLINK2REST_URL": "http://127.0.0.1:8088",
        "ROV_MAX_DEPTH_M": "50"
      }
    }
  }
}

mavlink2rest can sit in front of a real autopilot or the ArduSub software-in-the-loop simulator.

Configuration

Variable

Default

Meaning

MAVLINK2REST_URL

unset

Base URL of mavlink2rest. Setting it switches the source from the simulator to the vehicle

ROV_MCP_SOURCE

auto

Force simulator or mavlink2rest

ROV_SYSTEM_ID

1

MAVLink system id of the vehicle

ROV_COMPONENT_ID

1

MAVLink component id of the autopilot

ROV_HTTP_TIMEOUT_MS

3000

Timeout for each request to mavlink2rest

ROV_MAX_DEPTH_M

100

Depth limit used by the health check

ROV_MIN_BATTERY_V

13.0

Minimum battery voltage (the default suits a 4S lithium pack)

ROV_STALE_AFTER_S

5

Heartbeat age after which the link counts as lost

ROV_MAX_TILT_DEG

45

Roll or pitch beyond this is flagged

Invalid values stop the server at startup with a message naming the variable.

How it works

MCP client (Claude)
      │  stdio, JSON-RPC
      ▼
server.ts          tools, prompt, output schemas, error handling
      │
telemetry.ts       MAVLink messages → depth, attitude, battery in real units
health.ts          snapshot + limits → findings (pure function)
      │
MessageProvider    one interface, two implementations
   ├─ Mavlink2RestProvider   HTTP GET against mavlink2rest
   └─ SimulatedProvider      scripted dive, same message shapes

The simulator emits the same raw MAVLink message shapes as a vehicle, so both sources run through exactly the same conversion code.

MAVLink fields used: HEARTBEAT (armed bit, mode, state), VFR_HUD (depth as negative altitude, climb, heading), GLOBAL_POSITION_INT (depth fallback), ATTITUDE (roll, pitch, yaw), SCALED_PRESSURE2 (water temperature, pressure) and SYS_STATUS (battery).

Development

npm test            # build, then run the suite
npm run typecheck   # type-check sources and tests
npm run dev         # run from source with tsx

The suite has 111 tests:

  • Conversions and modes: units, sentinel values, the armed bit in each form base_mode can take

  • mavlink2rest client: URL building, 404 and empty bodies, timeouts, bad JSON, rejection of invalid message names before any request is made

  • Telemetry and health: every reading and every rule, including missing data

  • Simulator: the dive profile under a hand-driven clock

  • Server: a real MCP client connected in memory, covering every tool, schema validation and failure of the telemetry source

  • End to end: the built server started as a child process over stdio, against the simulator and against a local HTTP server that answers like mavlink2rest

Limitations

  • The mavlink2rest integration is tested against a local HTTP server that mimics the documented response format. It has not yet been run against a live mavlink2rest instance or a physical vehicle.

  • HEARTBEAT.base_mode is serialised differently across mavlink2rest versions. The three known forms are handled; an unknown form reports the armed state as null.

  • Flight mode names are for ArduSub. Other vehicle types report the mode by number.

  • stdio transport only.

License

MIT

Available Tools

8 tools
check_vehicle_healthHealth checkA
Read-onlyIdempotent

Checks the current telemetry against the configured operating limits (maximum depth, minimum battery voltage, heartbeat age, tilt) and returns an overall verdict with the individual findings.

Inputs: no named parameters. Returns: limits, overall, findings, snapshot

get_attitudeAttitudeB
Read-onlyIdempotent

Roll and pitch in degrees and the compass heading.

Inputs: no named parameters. Returns: rollDeg, pitchDeg, headingDeg

get_batteryBatteryA
Read-onlyIdempotent

Battery voltage, current draw and estimated remaining charge.

Inputs: no named parameters. Returns: currentA, voltageV, remainingPercent

get_depthDepthB
Read-onlyIdempotent

Current depth in metres, vertical speed, water temperature and absolute pressure.

Inputs: no named parameters. Returns: depthM, pressureHpa, verticalSpeedMS, waterTemperatureC

get_raw_messageRaw MAVLink messageA
Read-onlyIdempotent

The latest raw MAVLink message of one type, with wire units untouched (for example radians and millivolts). Use this for fields the other tools do not expose.

Inputs: name (required). Returns: name, found, message, lastUpdate, +1 more

get_telemetry_snapshotTelemetry snapshotA
Read-onlyIdempotent

Status, depth, attitude and battery in one call. Prefer this over calling the individual tools one by one.

Inputs: no named parameters. Returns: depth, source, status, battery, +1 more

get_vehicle_statusVehicle statusA
Read-onlyIdempotent

Whether the vehicle is armed, its flight mode, autopilot state and how recently it sent a heartbeat.

Inputs: no named parameters. Returns: mode, armed, autopilot, vehicleType, +2 more

list_available_messagesList MAVLink messagesA
Read-onlyIdempotent

Names of the MAVLink message types the vehicle is currently sending. Use with get_raw_message.

Inputs: no named parameters. Returns: messages

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 8 tools

    Disambiguation4/5

    Each tool targets a distinct telemetry concern (status, depth, attitude, battery, health, raw messages), and get_telemetry_snapshot's description explicitly tells the agent to prefer it over the individual getters. The only mild overlap is snapshot vs. the individual getters and raw vs. typed fields, but both are clearly explained.

    Naming Consistency5/5

    All tools follow a consistent snake_case verb_noun pattern (get_*, check_*, list_*), with verbs chosen appropriately for the action. No mixed conventions or vague names.

    Tool Count5/5

    Eight tools is well-scoped for a read-only telemetry server: four focused getters, one aggregate snapshot, one raw escape hatch, one health check and one discovery tool. Every tool earns its place without redundancy.

    Completeness4/5

    The surface covers the core ROV telemetry domains (status, depth, attitude, battery, health, raw MAVLink) plus discovery of available messages. Minor gaps exist, such as position/navigation data or a way to view/configure the operating limits used by check_vehicle_health, but agents can work around these via get_raw_message.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers