Skip to content

Add it to Claude Code

claude mcp add mcardupilot -- uvx mcardupilot

It flies a SITL binary you have built yourself. Install and connect

Ask for a flight. Get one, and a straight answer about it.

mcardupilot lets an agent harness such as Claude Code fly ArduPilot's simulator for you. Say what you want flown, and the agent starts SITL, flies it, keeps the log and tells you what really happened. Below is one request, recorded as it ran.

A headless Claude Code session, asked to fly ArduPilot’s stock quadplane on 3 October 2026. The request and the answer are word for word. Times are the autopilot’s own clock, which is why nothing leaves the ground until 50 s: the autopilot would not arm until its position estimate had aligned with GPS.

Claude Code, headlessmcardupilot connected
  1. You asked

    Using the mcardupilot tools, fly ArduPilot's stock quadplane for me. Take off vertically and climb to 10 m, then hover there for 15 seconds while a 6 m/s gusty wind blows from the west (seed 7, so it can be repeated), then land. Keep the flight's log. Afterwards read the log and tell me how the hover went: how high it really got, how hard the motors worked, how much current it drew, and anything the autopilot said that matters. Use idle pacing so your thinking doesn't change the flight. Reply with one short paragraph written for a person rather than an engineer, and nothing else: no tables, no headings, no extra sections.

  2. The agent, on the autopilot's clock

    1. sim 10.2 sStarted a stock quadplane SITL on a free instance, with a 6 m/s west wind gusting on a repeatable seed, and idle pacing so time stands nearly still between its calls
    2. sim 49.7 sArmed in QLOITER once the position estimator had aligned with GPS (the autopilot refused until then)
    3. sim 50.0 to 58.1 sClimbed on the throttle until the height reached 10 m, centring the stick in that same instant
    4. sim 58.1 to 73.1 sHeld for exactly 15 seconds of simulated time in the gusts
    5. sim 73.1 to 97.5 sSwitched to QLAND and waited for touchdown and the automatic disarm
    6. after touchdownClosed the session, kept the flight's log, and read it back: phases, battery, motors and every message the autopilot logged
  3. The agent answered

    The quadplane took off into the westerly wind, and the hover was steady but a bit high: when I centred the throttle at 10 m the aircraft was still climbing at about 1.4 m/s, so the autopilot settled on roughly 11.3 m and held within about 20 cm of that for the full 15 seconds, topping out at 11.5 m, and it never drifted more than a metre or so from its spot despite gusts swinging the wind between about 4 and 7 m/s. The four lift motors worked moderately hard, averaging around 58 percent of full output and swinging between roughly 44 and 67 percent as the gusts hit, which showed up in the battery as a draw that wandered between about 34 and 50 amps at a steady 12.1 volts, with the whole flight using just under 500 mAh (about 6 watt-hours). The autopilot complained repeatedly before takeoff that it was "not using configured AHRS type" until its EKF3 estimator finished aligning with GPS about 38 seconds after boot, after which it armed cleanly, performed one yaw reset a few seconds into the climb, and logged no errors at all; the landing was gentle, touching down at about 0.5 m/s before it announced "Land complete" and disarmed itself. The log is kept as 20261003T213056Z-hover-10m-wind-west-6mps-seed7.BIN in the mcardupilot logs directory, and because the gusts used seed 7 the same flight can be replayed exactly.

    Quoted as written. ArduPlane V4.8.0-dev (4c98c922), ArduPilot's stock quadplane in SITL.

The flight, from its logclimbhoverlanding
Height, battery current and throttle demand against sim time for the recorded flightThree stacked panels share a sim-time axis from 46 to 99 seconds. Height: the quadplane arms at 49.7 s and climbs from 50.0 s. The stick is centred when it reaches 10 m at 58.1 s, but it is still rising, so it settles about 1.3 m higher, holding near 11.3 m through the 15 second hover with a peak of 11.5 m. It then descends in QLAND and disarms at 97.5 s. Current: between 33 and 50 amps in the hover, around 40 amps while landing, near zero once down. Throttle demand: between 44 and 67 percent in the hover, averaging 58 percent, then idle after touchdown.climbhover 15 slandingheight, m04812current, A03570throttle demand, %0501005060708090sim time, sheld about 11.3 masked for 10 mstick centredat 10 m, rising
Armed phases, from the log summary
PhaseTimesPeakmCurrentavg, AEnergyWh
Take-off and hover QLOITER23.611.542.53.39
Landing QLAND24.311.331.42.58
Whole flight47.911.55.97

The agent never had to fly in real time. While it thought between requests, the server kept the simulator connected and paced so that almost no simulated time passed, and once the aircraft was down it read the autopilot’s own log back. That is how the answer can say 11.3 m when 10 m was asked for. The tutorial walks through a flight like this one, and the pump thread and sim time explains the pacing.