Skip to main content
Glama

ardupilot-mcp

CI PyPI Python License: AGPL-3.0

Türkçe · English

ArduPilot uçuş loglarını teşhis eden bir MCP sunucusu. Claude Desktop, Cursor ya da VS Code gibi bir yapay zekâ istemcisine eklersin, .bin veya .tlog dosyanı verirsin; istemci uçuşta ne olduğunu sade bir dille anlatır: titreşim, düşük batarya, GPS kaybı, motor kaybı, hatalı ayar.

Bulguları deterministik kontroller üretir. Her eşiğin kaynağı docs/SOURCES.md'de yazılıdır; model bu bulguları yalnızca açıklar. Sunucu yalnızca yerel dosyaları okur, ağa bağlanmaz, araca komut göndermez ve parametre yazmaz.

Hızlı başlangıç

Claude Desktop ile:

  1. uv'yi kur.

  2. Claude Desktop'ta Settings → Developer → Edit Config ile şunu ekle:

    { "mcpServers": { "ardupilot-mcp": { "command": "uvx", "args": ["ardupilot-mcp"] } } }
  3. Claude Desktop'tan tamamen çık ve yeniden aç.

  4. Sor: "C:\loglar\00000042.BIN logunu analiz et, neden düştü?"

Claude Code için tek satır yeterli: claude mcp add ardupilot-mcp -- uvx ardupilot-mcp. Cursor, VS Code, Windsurf, Cline, Zed, LM Studio ve diğer istemcilerin ayarları, sorun giderme ve istemcisiz deneme docs/clients.md'de.

Related MCP server: ArduPilot MCP Server Sandbox

Hangi log?

  • .bin uçuş kontrolcüsünün kendi kaydıdır ve en ayrıntılı teşhisi verir. SD karttaki APM/LOGS/ klasöründedir; Mission Planner'da DataFlash Logs → Download DataFlash Log Via Mavlink ile de indirilir.

  • .tlog yer istasyonunun kaydettiği telemetridir. Saniyede birkaç örnek ve yalnızca birincil sensör taşır, bu yüzden teşhis daha kabadır. Telsiz kopmasını araç arızası sanabilecek kontroller bu dosyada çalışmaz.

Örnek

python examples/analyze.py demo.bin çıktısından bir bölüm. İstemci aynı bulguları senin dilinde anlatır.

First anomaly while armed: Elevated VibeZ vibration @ 9s.
6 critical, 2 warning, 3 info finding(s).
[CRITICAL] vibration @ 9s: Elevated VibeZ vibration
           VibeZ vibration peaks at 72 m/s^2 (>60); 20% of samples exceed 60 m/s^2.
[CRITICAL] attitude  @ 20s: Attitude tracking failure (roll)
           Roll failed to track the demand for 3.0 s, error up to 35 deg (sustained >25 deg).
[CRITICAL] power     @ 25s: Battery reached critical voltage
           Pack voltage fell to 13.32 V, at or below the critical-voltage level (13.50 V, configured BATT_*_VOLT failsafe).

Araçlar

Bütün araçlar salt okunurdur.

Araç

Ne işe yarar

analyze_log

Bütün kontrolleri çalıştırır; önem sırasına dizilmiş bulguları resmi ArduPilot doküman linkleriyle döndürür.

incident_timeline

İlk anomaliyi ve çarpma anını bulur, olayları zaman sırasına koyar. Neden-sonuç iddia etmez.

forum_report

discuss.ardupilot.org'a yapıştırılacak Markdown yanıtı hazırlar. GPS konumu içermez.

compare_logs

İki uçuş arasında değişen parametreleri, firmware'i ve metrikleri yan yana koyar.

log_summary

Araç, firmware, süre, uçuş modları ve log bütünlüğü.

vehicle_profile

Frame, motor sayısı, batarya, hover gazı ve güç marjı.

list_events

ERR, MODE, EV ve MSG kayıtlarının zaman çizelgesi.

query_timeseries

Bir bulgunun arkasındaki ham seri; çoklu sensörlerde instance seçilebilir.

get_params

Logdaki parametreler ve o firmware sürümünde belgelenmiş aralık, birim ve değerler.

load_param_file

Dışa aktarılmış .param dosyasını okur.

recommend_tuning

Harmonik notch, PID ve autotune önerisi. Hiçbir şeyi uygulamaz.

list_checks

Kayıtlı kontrollerin listesi.

Araçların argümanları ve 18 kontrolün tamamı docs/reference.md'de. Bu dosyayı scripts/gen_docs.py koddan üretir, CI da güncel olup olmadığını denetler.

Nasıl çalışır

Parser logu sütunlu bir FlightLog modeline çevirir. Kayıtlı kontroller bu modeli okur: verisi logda olmayan kontrol atlanır, araç tipine uymayan çalışmaz. Aynı olayın ERR kaydı, failsafe mod değişikliği ve firmware mesajı tek bulguda birleşir. Çarpmadan sonra başlayan bulgular listenin sonuna iner ve raporun başında çarpmadan önceki ilk anomali kalır.

4.x firmware her IMU, GPS, pusula, batarya ve EKF çekirdeğini tek mesaj adı altında yazar. Kontroller her birini ayrı değerlendirir. 4.1 öncesi loglarda ayrı adla yazılan ikincil sensörler de aynı yapıya çevrilir.

Sunucu MCP Python SDK 2 üzerinde çalışır. Hem 2026-07-28 protokol sürümünü hem de bugün çoğu masaüstü istemcinin kullandığı eski el sıkışmayı (2024-11-05 ile 2025-11-25 arası) konuşur.

Doğruluk ve sınırlar

Motor, forumdaki 49 gerçek kaza logu üzerinde ölçülür; logların sebebini o logu inceleyen bir geliştirici ya da deneyimli bir kullanıcı yazmıştır. Güncel skorlar ve yöntem bench/README.md'de.

  • Pusula yön hatasından kaynaklanan dairesel sürüklenme (toilet-bowl) henüz tespit edilmiyor.

  • Format tanımları bozulmuş bir log, kısmi sonuç yerine açık bir hata verir.

  • .tlog dosyasında ERR kaydı, batch sampler, hızlı IMU ve mod değişikliği nedeni yoktur.

  • Bulgular karar desteğidir. Uçuşa elverişlilik kararı vermez.

Diğer araçlar

UAV Log Viewer ve Mission Planner'ın Auto Analysis'i veriyi gösterir, yorumu sana bırakır. ardupilot-mcp yorumu yapar ve takip sorularını cevaplar. Bir sinyali grafikte görmek ya da uçuşu 3B izlemek için UAV Log Viewer daha iyidir.

Katkı

CONTRIBUTING.md geliştirme ortamını, yeni kontrol eklemeyi ve PR sürecini anlatır. Yapay zekâ asistanlarının uyduğu kurallar AGENTS.md'de. Güvenlik açıklarını SECURITY.md'deki yoldan bildir. Değişiklikler CHANGELOG.md'de.

Lisans

GNU AGPL-3.0. Kodu değiştirip ağ üzerinden hizmet olarak sunan, değiştirdiği kaynak kodu o hizmetin kullanıcılarına açmak zorundadır. AGPL koşulları işine uymuyorsa ticari lisans için contact@furkanisikay.com adresine yaz. PyPI'da yayımlanan 0.1.3 ve önceki paketler MIT lisanslıdır ve öyle kalır; bu değişiklikten sonraki kaynak kod ve sonraki sürümler AGPL-3.0 lisanslıdır.

ardupilot_mcp/data/params/ altındaki veri, ArduPilot'un GPLv3 lisanslı parametre tanımlarından (apm.pdef.xml) çıkarılmış olgulardan oluşur: aralık, birim, değer kodları ve bitmask bitleri. Açıklama metni kopyalanmaz.

Available Tools

12 tools
analyze_logA
Read-onlyIdempotent

Run the full deterministic diagnostic suite over an ArduPilot .bin log (or a ground station's .tlog).

A .tlog is the telemetry the ground station received: a few Hz, the primary sensor and EKF core only, and gaps where the radio link dropped. Checks that would read a link dropout as a vehicle fault (log integrity, timing) are skipped on it; prefer the onboard .bin when the user has it.

Returns severity-ranked findings (each with concrete evidence AND official ArduPilot doc links), per-check results, a plain-language summary, and guidance. Read the cited references for the log's firmware version, call vehicle_profile for the airframe's physical configuration, and fold in any real-world details the user gives — then explain and cite sources. Every finding is grounded in the log; do not invent causes beyond them.

Inputs: path (required). Returns: Top-level structured output of ``analyze_log`` — the reliable backbone.

compare_logsA
Read-onlyIdempotent

What changed between two logs of the same vehicle ("it flew fine last week")? Lists configuration parameters that differ (separately from values the autopilot learns/counts itself), parameters present in only one log, the firmware change, and flight metrics side by side (vibration, hover throttle, battery/board voltage minimums). Differences only — it does not judge which side is right. By convention A is the earlier/good flight and B the later/bad one.

Inputs: path_a (required), path_b (required). Returns: Differences between two logs (A = earlier/good, B = later/bad, by convention).

forum_reportA
Read-onlyIdempotent

A Markdown reply to paste into a discuss.ardupilot.org thread: vehicle and firmware, what went wrong first (onset and impact), the findings with their corroborating log records, and a small text plot of the data behind each one. It contains no GPS positions and is returned as text (nothing is written to disk). Review it with the user and add what they saw before they post it.

Inputs: path (required). Returns: A Markdown reply for a forum thread, built from the deterministic diagnosis.

get_paramsA
Read-onlyIdempotent

Parameter values recorded in the log's PARM dump. name_glob is a case-insensitive glob, e.g. 'INS_HNTCH_*'.

Includes total (full param count), metadata_url (version-specific definitions to interpret values), and a note if the snapshot looks incomplete (truncated log) — in which case ask the user for their exported .param file and read it with load_param_file. documented gives each returned param's documented range, units, listed values and bitmask bits for the log's firmware (bundled, offline); a value outside the documented range or list is not necessarily wrong (some defaults, e.g. 0 = disabled, lie outside). undocumented names params that release does not document.

Inputs: path (required), name_glob. Returns: note, path, total, params, +6 more

incident_timelineA
Read-onlyIdempotent

What went wrong first, and what followed: the onset (first anomaly while armed), the impact (crash check, crash disarm, or the log ending while armed), and every firmware verdict, error, failsafe mode change and finding in time order, each tagged before_onset / onset / after_onset / impact / after_impact. Use it to answer "what failed first, and is the rest just the crash?". Time order only — never causation.

Inputs: path (required). Returns: What went wrong first, and what followed. Order in time only — never causation.

list_checksA
Read-onlyIdempotent

List the registered diagnostic checks (the extensible catalogue).

Inputs: no named parameters. Returns: total, checks

list_eventsB
Read-onlyIdempotent

Decoded ERR/MODE/EV/MSG timeline. kinds filters families (ERR, MODE, EV, MSG); times are seconds.

Inputs: path (required), end_s, kinds, start_s. Returns: path, total, events

load_param_fileA
Read-onlyIdempotent

Load a user-exported ArduPilot parameter file (.param / .params).

The authoritative complete configuration — use it when the log's PARM snapshot is truncated/incomplete, or to compare the flown config (get_params) against the user's current/intended config. name_glob filters. firmware (e.g. 'ArduCopter V4.6.3', from the log's log_summary) attaches the documented metadata and lists names that release does not document (typos, script or other-firmware params).

Inputs: path (required), firmware, name_glob. Returns: note, path, total, params, +6 more

log_summaryB
Read-onlyIdempotent

Cheap orientation: vehicle, firmware, duration, message counts, flight modes, max altitude, integrity.

Inputs: path (required). Returns: Cheap orientation metadata about a parsed log.

query_timeseriesB
Read-onlyIdempotent

Numeric time series for a message type and fields, for drilling into a finding.

Multi-instance messages (VIBE/IMU per IMU, GPS per receiver, MAG per compass, BAT per battery, XKF* per EKF core) are returned one instance at a time: pass instance (default: the first one; see available_instances). Values are aligned with times_s by index. Downsamples (decimates) to at most max_points points.

Inputs: path (required), fields (required), message_type (required), end_s, +3 more. Returns: note, path, fields, series, +6 more

recommend_tuningB
Read-onlyIdempotent

Advisory tuning recommendations (harmonic notch from the batch sampler, a fast IMU, the in-flight FFT or ESC RPM; PID; autotune). Recommendation ONLY — never applied.

Inputs: path (required), area. Returns: path, notes, recommendations

vehicle_profileA
Read-onlyIdempotent

Physical / architecture profile of the aircraft inferred from the log.

Frame class & type, motor count, battery cells/capacity, and — the key physical insight — the hover throttle and resulting power margin / thrust-to-weight. Use this to reason about the craft physically and to combine with real-world details the user gives (weight, prop diameter, motor KV, wind).

Inputs: path (required). Returns: Physical / architecture profile of the aircraft, inferred from the log. Gives t…

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 12 tools

    Disambiguation4/5

    Most tools have clearly distinct roles: analyze_log (full diagnostics) vs incident_timeline (time ordering) vs log_summary (cheap orientation) vs list_events (raw decoded events) vs query_timeseries (raw drilling) are well differentiated. Minor potential overlap between analyze_log's findings and incident_timeline's tags, but descriptions make the boundary clear.

    Naming Consistency4/5

    All names use snake_case and most follow a verb_noun pattern (analyze_log, get_params, compare_logs, load_param_file, query_timeseries, recommend_tuning, list_events, list_checks). A few are noun phrases (incident_timeline, forum_report, vehicle_profile, log_summary), a minor deviation but still readable and predictable.

    Tool Count5/5

    12 tools is well within the ideal range and each earns its place in a log-diagnosis workflow: entry point (log_summary), deep analysis (analyze_log), temporal/raw access (incident_timeline, list_events, query_timeseries), config (get_params, load_param_file, compare_logs), and reporting/advisory (forum_report, recommend_tuning).

    Completeness4/5

    Covers the core diagnostic lifecycle: orient, diagnose, temporalize, inspect parameters/config, compare flights, and produce reports/advisories. Minor gaps: no direct visualization/export beyond the text plot in forum_report, and recommend_tuning is advisory-only with no apply path, but these are reasonable for a read/diagnose server.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers