MAVProxy MCP module: let AI agents talk to ArduPilot over JSON-RPC

Hi everyone,

I’ve published a small standalone project that may be useful if you’re experimenting with AI agents / LLM tools against ArduPilot via MAVProxy.

What it is

mavproxy-mcp is an in-process MAVProxy module that exposes a lightweight MCP-style JSON-RPC 2.0 surface over:

  • HTTP (POST / or /mcp)
  • TCP (newline-delimited JSON-RPC)

No sidecar process — it loads like any other MAVProxy module and uses the existing master link to the vehicle (SITL or real FC).

Repo (GPL-3.0): GitHub - davidbitton/mcp-tools: Standalone MCP tools (mavproxy-mcp and future packages) · GitHub
Not intended for upstream into ArduPilot/MAVProxy (yet) — keep it separate.

Why

MAVProxy already sits on the MAVLink path for a lot of lab and ops work. MCP (Model Context Protocol) is how many AI clients discover and call tools. Wiring the two together means an agent can query vehicle state — and, if you opt in, issue guided commands — without a custom bridge for each client.

This is aimed at lab / SITL / companion workflows, not as a replacement for a full GCS.

Safety defaults (important)

  • Loading the module does not open ports until you mcp start (or set MAVPROXY_MCP_ENABLE=1)
  • Binds to 127.0.0.1 by default
  • Flight tools are off until you explicitly enable them (mcp set allow_flight 1 or env)

Always-on tools: vehicle_status, position, mcp_info

With allow_flight: set_mode, arm (incl. SITL force/magic 21196), takeoff, velocity_ned

Quick start

export PYTHONPATH="/path/to/mcp-tools/mavproxy-mcp${PYTHONPATH:+:$PYTHONPATH}"

In MAVProxy (with a vehicle connected):

module load mavproxy_mcp
mcp start
mcp set allow_flight 1   # only if you want command tools

Smoke check:

curl -s http://127.0.0.1:8765/health | jq .
curl -s -X POST http://127.0.0.1:8765/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | jq .

CLI: mcp status | start | stop | restart | set …

Env at load: MAVPROXY_MCP_ENABLE, MAVPROXY_MCP_HTTP (8765), MAVPROXY_MCP_TCP (8766), MAVPROXY_MCP_BIND, MAVPROXY_MCP_ALLOW_FLIGHT.

Full notes: mcp-tools/mavproxy-mcp/README.md at main · davidbitton/mcp-tools · GitHub

Status

Early (0.1.0), small tool surface, lab-focused. Happy to take feedback on the tool set, auth/bind story, or whether a broader MCP surface (params, missions, messages) would be useful to others.

Thanks — and fly safe (especially if you turn allow_flight on).

1 Like