Ardupilot Mavlink MCP logo

Ardupilot Mavlink MCP

Live ArduPilot control over MAVLink: state, params, modes, prearm diagnosis, gated arm. SITL-first.

Install Ardupilot Mavlink MCP

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "ardupilot-mavlink-mcp": {
      "command": "uvx",
      "args": [
        "ardupilot-mavlink-mcp"
      ]
    }
  }
}

Settings β†’ Developer β†’ Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window β€” this can mean a slow first-time install rather than a real problem.

uvx ardupilot-mavlink-mcp

No response to initialize.

This is an experimental automated check and can have false negatives β€” missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 2d ago.

Overview

Tools8

What Ardupilot Mavlink MCP lets your agent do. Expand a tool for its parameters.

Self-reported~130 tokens of context

Security & health

What it can reach and how reliably it runs β€” from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

5/5 checks healthy over the last 40d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 14d ago via OSV.dev Β· ardupilot-mavlink-mcp (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks β€” not a rating.

GitHub stars4Stargazers on the source repository.
Last commit2mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window β€” often a slow first install.
Tools exposed8Callable tools this server registers over MCP.

From the project README

ardupilot-mcp

An MCP server that lets an AI agent talk to an ArduPilot vehicle over MAVLink. Read state, inspect and change parameters, switch modes, read prearm failures, and (gated) arm or disarm. SITL-first.

Install: pipx install ardupilot-mavlink-mcp

mcp-name: io.github.rmeadomavic/ardupilot-mavlink-mcp

CI PyPI License: MIT Python MCP

[!WARNING] This tool can ARM and command a real aircraft. A bad command can spin props or fly a vehicle away. Defaults are built to stop that: actuation is OFF unless you pass --enable-actuation, and even then it refuses a real (non-loopback) link unless you also pass --allow-real-vehicle. Develop against SITL. On hardware, bench-test with props off first. No warranty β€” you own the outcome.

Why

Most ArduPilot tooling for LLMs targets post-flight log analysis. This one drives the live link: connect to a running vehicle, read its state and params, change modes, and diagnose why it won't arm β€” in the moment, not after landing. The useful case: point an agent at a vehicle that won't arm, have it read the params and the prearm STATUSTEXT, and tell you why, instead of you squinting at a GCS message log. The arm tool reports the real COMMAND_ACK result and hands back the prearm reasons on refusal; it never force-arms.

Architecture

Code
  agent (MCP client)                    ardupilot-mcp                     vehicle
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   JSON-RPC    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   MAVLink   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚ Claude / etc.    β”‚ ───stdio────▢ β”‚  FastMCP tools       β”‚ ──udp/tcp/  β”‚ ArduPilotβ”‚
 β”‚                  β”‚ ◀───────────  β”‚   β”‚                  β”‚   serial──▢ β”‚  (SITL   β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β”‚   β–Ό                  β”‚ ◀────────── β”‚  or FC)  β”‚
                                    β”‚  recv thread (1 reader)            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                    β”‚   β”œβ”€β–Ά message cache (latest/type)
                                    β”‚   β”œβ”€β–Ά param store (request/collect)
                                    β”‚   └─▢ COMMAND_ACK + STATUSTEXT
                                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

MAVLink is an async stream; MCP tools are synchronous. One background thread owns the link and is the only reader β€” it caches the latest message of each type and routes PARAM_VALUE into a param store. Tool calls read from those caches (params block until the data arrives). No two threads ever call recv_match.

What it does

  • Reads vehicle state from cache, instantly. Mode, armed, GPS fix and sats, battery, attitude, position β€” served from cached telemetry, no blocking on the link.
  • Diagnoses a no-arm. ardupilot_arm returns the COMMAND_ACK result and, on refusal, the prearm STATUSTEXT (e.g. AHRS: waiting for home, Accels inconsistent). Safety checks are respected β€” no ARMING_CHECK=0, no force-arm magic number.
  • Gets and sets parameters on the real param table, with set confirmed by the echoed PARAM_VALUE.
  • Switches flight modes by name, mapped per vehicle type (Copter/Rover/Plane/Sub) β€” not hardcoded numbers.

Quick start (SITL)

You need an ArduPilot SITL instance. From an ardupilot checkout:

bash
# starts ArduCopter SITL; serves MAVLink on tcp:127.0.0.1:5760
sim_vehicle.py -v ArduCopter --console

Install and run the server (read-only by default):

bash
pipx install ardupilot-mavlink-mcp          # or: uv tool install ardupilot-mavlink-mcp
ardupilot-mavlink-mcp --connect tcp:127.0.0.1:5760

To allow parameter writes, mode changes, and arm/disarm against SITL, add --enable-actuation.

Use with an MCP client

Claude Code:

Terminal
claude mcp add ardupilot -- ardupilot-mavlink-mcp --connect tcp:127.0.0.1:5760

Claude Desktop / any mcpServers config:

config.json
{
  "mcpServers": {
    "ardupilot": {
      "command": "ardupilot-mavlink-mcp",
      "args": ["--connect", "tcp:127.0.0.1:5760"]
    }
  }
}

Connection strings are pymavlink syntax: tcp:127.0.0.1:5760 (SITL), udp:127.0.0.1:14550, serial:/dev/ttyACM0:115200.

Tools

ToolKindWhat it does
ardupilot_connectβ€”Connect to a vehicle. Default is local SITL.
ardupilot_vehicle_statereadMode, armed, GPS, battery, attitude, position β€” from cache.
ardupilot_recent_statustextreadRecent STATUSTEXT/prearm messages. Read this to see why arming failed.
ardupilot_get_paramreadRead one parameter.
ardupilot_set_paramwriteSet a parameter, confirmed via echoed PARAM_VALUE.
ardupilot_list_paramsreadList params, optional glob (ATC_RAT_*).
ardupilot_set_modewriteSend a request to set flight mode by name.
ardupilot_arm / ardupilot_disarmwriteGated. Confirmed via COMMAND_ACK.

Write tools are gated and carry the MCP destructiveHint. Live telemetry is also exposed as the resource ardupilot://telemetry.

Supported vehicles

VehicleFirmwareStatus
ArduCopter4.5βœ“ validated on SITL
ArduRover (UGV/USV)4.x~ mode map present, not yet validated
ArduPlane4.x~ mode map present, not yet validated
ArduSub4.x~ untested

MAVLink2 is assumed. Not flown on hardware β€” SITL only so far.

Safety model

  1. Actuation tools are OFF by default. Enable with --enable-actuation.
  2. Even enabled, actuation on a real link (serial or non-loopback network) is refused unless --allow-real-vehicle is also set.
  3. Link classification fails safe: anything not clearly loopback is treated as a real vehicle.
  4. arm, disarm, set_param, and set_mode all pass through this gate before sending.
  5. Arming has no force-arm option, and set_param rejects ARMING_CHECK writes (case-insensitive) on every link, even when both actuation flags are enabled.

Status

Working: reads plus gated parameter writes, mode changes, and arm/disarm against ArduCopter SITL. Validated three ways β€” unit tests (Python 3.10–3.12), a real-MAVLink-wire check (scripts/wire_check.py), and a live ArduPilot SITL run (scripts/sitl_check.py).

Open targets: validate Rover/Plane/Sub; mission upload/download and guided flight (takeoff/goto/land) are deferred β€” mission protocol is a stateful handshake and guided commands are fly-away risk. See ROADMAP.md.

Develop

bash
git clone https://github.com/rmeadomavic/ardupilot-mcp && cd ardupilot-mcp
uv venv && uv pip install -e ".[dev]"
pytest -q
ruff check . && ruff format --check .
python scripts/wire_check.py            # offline real-wire check, no SITL needed

License

MIT β€” Kyle Adomavicius

Reviews

No reviews yet β€” be the first to share how it worked for you.

Frequently Asked Questions about Ardupilot Mavlink MCP

ardupilot-mavlink-mcp is an MCP server that lets an AI agent communicate with a live ArduPilot vehicle over MAVLink. It can read cached state, inspect and change parameters, switch flight modes, diagnose prearm failures, and request gated arm or disarm. It is designed SITL-first and connects through UDP, TCP, or serial MAVLink links.

Install ardupilot-mavlink-mcp with `pipx install ardupilot-mavlink-mcp`; `uv tool install ardupilot-mavlink-mcp` is also supported. The package requires Python 3.10 or newer.

The server reads vehicle mode, armed state, GPS fix and satellites, battery, attitude, and position from cached telemetry. It can inspect and set parameters, switch vehicle-specific flight modes, diagnose prearm failures, and perform gated arm or disarm requests.

Start an ArduPilot SITL instance, such as `sim_vehicle.py -v ArduCopter --console`, then run `ardupilot-mavlink-mcp --connect tcp:127.0.0.1:5760`. The server supports UDP, TCP, and serial MAVLink links.

Actuation is disabled by default, and enabling it requires `--enable-actuation`. The server also refuses a non-loopback link unless `--allow-real-vehicle` is provided, and its arm operation respects ArduPilot safety checks rather than force-arming. The README recommends developing against SITL and bench-testing hardware with props off.

Related MCP servers

Add a badge to your READMEShow it’s listed β€” live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewArdupilot Mavlink MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/ardupilot-mavlink-mcp?style=directory)](https://allmcps.com/mcp/ardupilot-mavlink-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/ardupilot-mavlink-mcp"><img src="https://allmcps.com/api/badge/ardupilot-mavlink-mcp?style=directory" alt="Ardupilot Mavlink MCP on AllMCPs" /></a>