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.

Then ask the harder questions

One flight answers "what happened". The questions that matter come after it: did that really happen, does it happen every time, and is the change you made the reason. The agent can film, repeat and count, down to flights that repeat bit for bit, and every result below came from it doing so on ArduPilot's own simulator.

Watch it

Every flight, as a film

Flown by ArduPilot. The ArduPilot logo on the title card is the project's own, used under CC BY-SA 3.0.

render_film turns a kept log into a lit 3D film in Blender. A title card names the flight, the airframe, its firmware, when and where it flew and the wind, then your own airframe flies, props turning with each motor's logged output. The weather is the wind SITL flew: a windsock that reads like a real one and gusts drifting across the grass. A heads-up display gives altitude in feet, knots, climb, attitude, mode, battery and a mission clock.

Watch a flight

Fly it again

The same flight, twice

  • Hover lift73.71 % then 73.48-0.31%
  • Hover current42.67 A then 42.52-0.35%
  • Descent current33.42 A then 33.38-0.12%
  • Whole-flight energy4.743 Wh then 4.73-0.27%

Every kept flight carries the recipe that flew it. Asked to fly one again, the agent replays it call for call, through gusts seeded to be the same air, and compares the two logs. A gusty hover came back within half a percent everywhere it flew.

Or fly it exactly, and the replay is a copy

55,253of 55,253 IMU samples identical, original against replay

Opened with exact=true and flown as a mission by fly_exact, a hop repeats bit for bit. Its repro matches record for record, sensors, estimator and motor outputs alike, at any speedup: two idle boots at speedups 10 and 4 agreed on all 32,116 IMU samples.

Count it

Is the difference real, or noise?

Peak roll rate in a gusty hover, three flights a side, as roll gain goes from 0.25 to 0.4 (log scale)
Peak roll angle, the same six flights

The higher gain shakes: the roll rate swings past 209 degrees a second, more than a hundred times the lower gain's, while the roll angle moves from 6.5° to 7.8° and lift and energy by about two percent. A summary that only averaged would have called it normal.

And the control: six identical gusty hovers, one build, hover current

Nothing changed, yet the flights split into two groups about 0.8% apart, from when the autopilot happened to arm. One pair could land either side and look like a result. So the agent flies sets, alternates the two sides, and counts a difference only when it stands out from that spread.

Unless the flight is exact. Then one flight a side settles it: roll gain raised to 0.4 on B, sim time in the hop
  • 39.324 sB first parts from A, by about 2×10−15 m
  • 40.544 sfirst visibly, a millimetre lower
  • +2,589%largest change: peak roll rate in AUTO, 7.71 to 207 °/s

An exact recipe has no spread to see past. batch_fly flies A, A again and B, proves the two A flights match record for record (16,057 IMU samples), and then every difference is the change, down to the moment it first acts.

Program it

Sticks and gains, flown exactly

TerraHawk, flown by ArduPilot in SITL. The ArduPilot logo on the title card is the project's own, used under CC BY-SA 3.0.

A mission can't move a stick or change a gain partway through. A step program can: each step sets sticks, parameters or a mode, then waits for a height, a time or a mode. fly_exact(steps=...) runs it inside SITL, on the physics step, so every input lands on the same tick every time.

Here TerraHawk flies one through seeded gusts with wind on the pad: a climb, a hover, a run forward, a turn, a sidestep and a landing. Flown again, it is the same flight.

38,485of 38,485 records identical, original against replay, from the moment it armed

Fly a step program exactly