
Ardupilot Mavlink Mcp
io.github.rmeadomavic由 GitHub 账号 rmeadomavic 发布v0.1.0更新于 Oct 24, 2026
Live ArduPilot control over MAVLink: state, params, modes, prearm diagnosis, gated arm. SITL-first.
概览
本地 MCP 服务器,让助手通过 MAVLink 读取 ArduPilot 飞行器状态,并在显式开启后发送指令,优先面向 SITL。
- 可以做什么
- 通过 MAVLink 链路(TCP、UDP 或串口)连接飞行器,默认连接本地 SITL,并以资源或工具结果读取缓存的遥测:模式、解锁状态、GPS、电池、姿态和位置。读取最近的 STATUSTEXT 与预解锁消息,解释无法解锁的原因。读取、按通配符列出并设置参数,写入以回显值确认。按机型名称切换飞行模式。执行解锁或上锁,返回 COMMAND_ACK 结果,被拒时给出预解锁原因,且不会强制解锁。
- 适用场景
- 适合让助手在当下检查正在运行的 ArduPilot 飞行器,而不是在降落后分析日志,例如诊断无法解锁的原因、核对参数和模式。主要面向 SITL 开发与台架测试。
- 运行要求
- 需在本地安装 Python 包(pipx 或 uv tool install)并以 stdio 进程运行。需要可连接的 ArduPilot 飞行器或 SITL 实例,以 pymavlink 连接串给出,例如 tcp:127.0.0.1:5760、udp:127.0.0.1:14550 或 serial:/dev/ttyACM0:115200。假定使用 MAVLink2。执行动作需加 --enable-actuation 参数;真实链路还需 --allow-real-vehicle。
安装
在 SourceWeft 中
- 打开 控制台中的 Ardupilot Mavlink Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
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
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_armreturns theCOMMAND_ACKresult and, on refusal, the prearmSTATUSTEXT(e.g.AHRS: waiting for home,Accels inconsistent). Safety checks are respected — noARMING_CHECK=0, no force-arm magic number. - Gets and sets parameters on the real param table, with
setconfirmed by the echoedPARAM_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:
Install and run the server (read-only by default):
To allow parameter writes, mode changes, and arm/disarm against SITL, add --enable-actuation.
Use with an MCP client
Claude Code:
Claude Desktop / any mcpServers config:
Connection strings are pymavlink syntax: tcp:127.0.0.1:5760 (SITL), udp:127.0.0.1:14550, serial:/dev/ttyACM0:115200.
Tools
Write tools are gated and carry the MCP destructiveHint. Live telemetry is also exposed as the resource ardupilot://telemetry.
Supported vehicles
MAVLink2 is assumed. Not flown on hardware — SITL only so far.
Safety model
- Actuation tools are OFF by default. Enable with
--enable-actuation. - Even enabled, actuation on a real link (serial or non-loopback network) is refused unless
--allow-real-vehicleis also set. - Link classification fails safe: anything not clearly loopback is treated as a real vehicle.
arm,disarm,set_param, andset_modeall pass through this gate before sending.- Arming has no force-arm option, and
set_paramrejectsARMING_CHECKwrites (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
License
MIT — Kyle Adomavicius
来源:README.md,提交 569d9d0
工具
0版本历史
1- v0.1.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分