
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 分