ardupilot-mcp 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ardupilot_mcp-0.1.0/.gitignore +35 -0
- ardupilot_mcp-0.1.0/CHANGELOG.md +40 -0
- ardupilot_mcp-0.1.0/LICENSE +21 -0
- ardupilot_mcp-0.1.0/PKG-INFO +155 -0
- ardupilot_mcp-0.1.0/README.en.md +121 -0
- ardupilot_mcp-0.1.0/README.md +121 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/__init__.py +13 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/__main__.py +17 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/ardupilot_docs.py +199 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/ardupilot_meta.py +264 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/checks/__init__.py +53 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/checks/attitude.py +184 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/checks/base.py +109 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/checks/calibration.py +189 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/checks/compass.py +118 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/checks/config.py +129 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/checks/ekf.py +124 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/checks/events.py +206 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/checks/gps.py +224 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/checks/integrity.py +112 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/checks/motors.py +149 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/checks/param_audit.py +189 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/checks/power.py +280 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/checks/prearm.py +198 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/checks/rcin.py +99 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/checks/sensors.py +171 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/checks/timing.py +176 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/checks/util.py +109 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/checks/vibration.py +128 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/flight_log.py +242 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/model.py +267 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/orchestrator.py +134 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/param_file.py +40 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/parser.py +201 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/profile.py +134 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/server.py +323 -0
- ardupilot_mcp-0.1.0/ardupilot_mcp/tuning.py +278 -0
- ardupilot_mcp-0.1.0/docs/SOURCES.md +228 -0
- ardupilot_mcp-0.1.0/pyproject.toml +77 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
build/
|
|
7
|
+
dist/
|
|
8
|
+
.venv/
|
|
9
|
+
venv/
|
|
10
|
+
env/
|
|
11
|
+
.pytest_cache/
|
|
12
|
+
.mypy_cache/
|
|
13
|
+
.ruff_cache/
|
|
14
|
+
.coverage
|
|
15
|
+
htmlcov/
|
|
16
|
+
|
|
17
|
+
# Logs / fixtures (büyük .bin/.tlog/.ulog dosyaları repoya girmesin — fixture'lar ayrı yönetilecek)
|
|
18
|
+
*.tlog
|
|
19
|
+
*.ulg
|
|
20
|
+
# NOT: test fixture .bin dosyaları için tests/fixtures/ altında seçici allow-list kullanılacak (plan aşamasında)
|
|
21
|
+
|
|
22
|
+
# IDE / OS
|
|
23
|
+
.idea/
|
|
24
|
+
.vscode/
|
|
25
|
+
.DS_Store
|
|
26
|
+
Thumbs.db
|
|
27
|
+
|
|
28
|
+
# Local Claude Code settings (machine-specific)
|
|
29
|
+
.claude/settings.local.json
|
|
30
|
+
|
|
31
|
+
# Demo output
|
|
32
|
+
examples/*.bin
|
|
33
|
+
|
|
34
|
+
# Downloaded real logs (third-party data; not ours to redistribute)
|
|
35
|
+
_reallogs/
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format is based on
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to
|
|
5
|
+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.1.0] — 2026-06-14
|
|
10
|
+
|
|
11
|
+
First release: an offline, read-only MCP server that diagnoses ArduPilot DataFlash
|
|
12
|
+
`.bin` flight logs with a deterministic check engine; the LLM explains the grounded
|
|
13
|
+
findings.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- **Parser** (`pymavlink` DFReader) → pure `FlightLog` domain model; defensive against
|
|
17
|
+
truncated/corrupt logs; flight-relative timestamps robust to corrupt outliers.
|
|
18
|
+
- **16 diagnostic checks** across two families:
|
|
19
|
+
- Flight dynamics: events/errors, EKF health, vibration, power (BAT/CURR), GPS,
|
|
20
|
+
compass, attitude tracking, motor balance, RC-link loss, timing.
|
|
21
|
+
- Configuration & setup: risky parameters, parameter audit (contradictory/disabled/
|
|
22
|
+
implausible values), calibration, configured-but-silent sensors, firmware pre-arm
|
|
23
|
+
messages.
|
|
24
|
+
- **Vehicle awareness** (copter/heli/plane/rover) — checks gate to the vehicles they
|
|
25
|
+
apply to.
|
|
26
|
+
- **Advisory tuning** — harmonic notch (gyro FFT), PID, autotune.
|
|
27
|
+
- **Documentation grounding** — every finding links authoritative ArduPilot docs;
|
|
28
|
+
reports surface version-specific parameter definitions (`apm.pdef.xml`) for 4.x.
|
|
29
|
+
- **Physical profile** (`vehicle_profile`) — frame, motor count, battery cells, hover
|
|
30
|
+
throttle → power margin and thrust-to-weight.
|
|
31
|
+
- **9 read-only MCP tools**: `analyze_log`, `log_summary`, `vehicle_profile`,
|
|
32
|
+
`list_events`, `query_timeseries`, `get_params`, `load_param_file`, `recommend_tuning`,
|
|
33
|
+
`list_checks`.
|
|
34
|
+
- **Parameter completeness** signals + `.param`/`.params` file ingestion.
|
|
35
|
+
- `examples/analyze.py` CLI and an MCP stdio smoke test.
|
|
36
|
+
- [`docs/SOURCES.md`](docs/SOURCES.md): every threshold/enum/fact audited against
|
|
37
|
+
authoritative sources.
|
|
38
|
+
|
|
39
|
+
[Unreleased]: https://github.com/furkanisikay/ardupilot-mcp/compare/v0.1.0...HEAD
|
|
40
|
+
[0.1.0]: https://github.com/furkanisikay/ardupilot-mcp/releases/tag/v0.1.0
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Furkan IŞIKAY
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ardupilot-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: ArduPilot uçuş loglarını teşhis eden deterministik MCP sunucusu · Deterministic MCP server that diagnoses ArduPilot DataFlash flight logs
|
|
5
|
+
Project-URL: Homepage, https://github.com/furkanisikay/ardupilot-mcp
|
|
6
|
+
Project-URL: Repository, https://github.com/furkanisikay/ardupilot-mcp
|
|
7
|
+
Project-URL: Issues, https://github.com/furkanisikay/ardupilot-mcp/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/furkanisikay/ardupilot-mcp/blob/main/CHANGELOG.md
|
|
9
|
+
Author: Furkan IŞIKAY
|
|
10
|
+
License: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: ardupilot,dataflash,diagnostics,drone,flight-log,mavlink,mcp,model-context-protocol,uav
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Requires-Python: >=3.11
|
|
25
|
+
Requires-Dist: mcp>=1.27
|
|
26
|
+
Requires-Dist: numpy>=2.0
|
|
27
|
+
Requires-Dist: pymavlink>=2.4.49
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: build>=1.2; extra == 'dev'
|
|
30
|
+
Requires-Dist: mypy==2.1.0; extra == 'dev'
|
|
31
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
32
|
+
Requires-Dist: ruff==0.15.17; extra == 'dev'
|
|
33
|
+
Description-Content-Type: text/markdown
|
|
34
|
+
|
|
35
|
+
# ardupilot-mcp
|
|
36
|
+
|
|
37
|
+
[](https://github.com/furkanisikay/ardupilot-mcp/actions/workflows/ci.yml)
|
|
38
|
+
[](https://pypi.org/project/ardupilot-mcp/)
|
|
39
|
+
[](https://pypi.org/project/ardupilot-mcp/)
|
|
40
|
+
[](LICENSE)
|
|
41
|
+
|
|
42
|
+
🇹🇷 **Türkçe** · [🇬🇧 English](README.en.md)
|
|
43
|
+
|
|
44
|
+
**ArduPilot DataFlash (`.bin`) uçuş loglarını teşhis eden, deterministik-temelli bir MCP (Model Context Protocol) sunucusu.** Bir `.bin` logunu gösterirsin; Claude Desktop gibi bir yapay zekâ istemcisi uçuşta ne olduğunu **düz Türkçe** anlatır — tahminle değil, deterministik bir kontrol motoruyla.
|
|
45
|
+
|
|
46
|
+
> Bu araç **çoğunlukla Türk ve Türkçe konuşan drone topluluğu** için, Türkçe-öncelikli olarak geliştiriliyor. Katkı vermek isteyenlere bayılıyoruz — [CONTRIBUTING.md](CONTRIBUTING.md) ve [AGENTS.md](AGENTS.md) (insanlar ve yapay zekâ asistanları için kurallar). Her eşik değeri [docs/SOURCES.md](docs/SOURCES.md)'de kaynağıyla belgeli.
|
|
47
|
+
|
|
48
|
+
## Neden log teşhisi?
|
|
49
|
+
|
|
50
|
+
Bir ArduPilot `.bin` logunu okumak uzmanlık ister: `ERR` satırlarını filtreler, mekanik arıza için `ATT.DesRoll` ile `ATT.Roll`'u karşılaştırır, titreşim / EKF / batarya clipping'ine göz gezdirirsin. Drone'un düştüğünde "neden?" sorusunun cevabı bu logun içindedir ama okumak doktorun röntgen okuması gibidir. Bu sunucu o kontrolleri deterministik olarak çalıştırır ve yapay zekânın sonucu sade dille anlatmasını sağlar.
|
|
51
|
+
|
|
52
|
+
## Kurulum
|
|
53
|
+
|
|
54
|
+
Python 3.11+ gerekir.
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pip install ardupilot-mcp
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Kaynaktan (geliştirme için):
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
git clone https://github.com/furkanisikay/ardupilot-mcp
|
|
64
|
+
cd ardupilot-mcp
|
|
65
|
+
pip install -e ".[dev]"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Claude Desktop ile kullanım
|
|
69
|
+
|
|
70
|
+
`claude_desktop_config.json` dosyana ekle:
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"mcpServers": {
|
|
75
|
+
"ardupilot-mcp": {
|
|
76
|
+
"command": "ardupilot-mcp"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
`ardupilot-mcp` komutu PATH'te bulunamazsa, kurduğun ortamdaki tam yolu ver (ör. `.venv/bin/ardupilot-mcp` veya Windows'ta `...\Scripts\ardupilot-mcp.exe`). Sonra Claude'a şöyle sor: *"C:\\loglar\\ucus.bin logunu analiz et — neden düştü?"*
|
|
83
|
+
|
|
84
|
+
## Araçlar (hepsi salt-okunur)
|
|
85
|
+
|
|
86
|
+
| Araç | Ne yapar |
|
|
87
|
+
|------|----------|
|
|
88
|
+
| `analyze_log(path)` | Tüm kontrol paketini çalıştırır → önem-sıralı bulgular + özet. Her bulgu **resmi ArduPilot doküman linkleri** taşır; rapor 4.x firmware için sürüm-özel parametre dokümanlarını da içerir. **Manşet araç.** |
|
|
89
|
+
| `log_summary(path)` | Araç, firmware, süre, mesaj sayıları, uçuş modları, max irtifa, bütünlük. |
|
|
90
|
+
| `vehicle_profile(path)` | **Fiziksel / mimari profil**: frame & tip, motor sayısı, batarya hücresi/kapasitesi, hover gazı, **güç marjı** ve itki/ağırlık. Fiziğe-dayalı muhakeme için. |
|
|
91
|
+
| `list_events(path, kinds?, start_s?, end_s?)` | Çözümlenmiş `ERR`/`MODE`/`EV`/`MSG` zaman çizelgesi. |
|
|
92
|
+
| `query_timeseries(path, message_type, fields, start_s?, end_s?, max_points?)` | Bir bulguya derinlemesine bakmak için seyreltilmiş sayısal seri. |
|
|
93
|
+
| `get_params(path, name_glob?)` | Logun PARM dökümünden parametre değerleri (ör. `INS_HNTCH_*`), toplam sayı, yorumlamak için sürüm-özel metadata linki, ve döküm eksikse bir uyarı. |
|
|
94
|
+
| `load_param_file(path, name_glob?)` | Kullanıcının dışa aktardığı `.param`/`.params` dosyasını okur — log dökümü kesikse veya "uçtuğu config vs şimdiki"yi karşılaştırmak için tam, otoriter config. |
|
|
95
|
+
| `recommend_tuning(path, area?)` | Tavsiye niteliğinde tuning (gyro FFT'sinden harmonik notch, PID, autotune). **Sadece öneri — asla uygulanmaz.** |
|
|
96
|
+
| `list_checks()` | Kayıtlı teşhis kontrolleri (genişletilebilir katalog). |
|
|
97
|
+
|
|
98
|
+
## Nasıl çalışır
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
.bin ──▶ parser.py (pymavlink DFReader) ──▶ FlightLog (saf domain modeli)
|
|
102
|
+
│
|
|
103
|
+
▼
|
|
104
|
+
checks/ registry ──▶ Check eklentileri (her biri bir konu)
|
|
105
|
+
│
|
|
106
|
+
▼
|
|
107
|
+
orchestrator.diagnose() ──▶ DiagnosisReport (yapısal)
|
|
108
|
+
│
|
|
109
|
+
▼
|
|
110
|
+
server.py (FastMCP, stdio) ──▶ Yapay zekâ bulguları anlatır
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
- **Anahtar ilke:** deterministik motor **tek doğruluk kaynağı**; yapay zekâ sadece açıklar ve kaynak gösterir, *karar vermez*. Bu, "yapay zekâ fizik-temelli analizörlerden güvenilmez" eleştirisine doğrudan cevaptır.
|
|
114
|
+
- **`FlightLog`** saf, `pymavlink`-bağımsız bir domain modelidir; bu yüzden kontroller ve testler gerçek `.bin` olmadan sentetik loglarla çalışır.
|
|
115
|
+
- **Kontroller** bağımsız, registry'e kayıtlı eklentilerdir (`@register_check`). Yeni bir tane eklemek = tek bir yeni modül. Orchestrator, verisi loglanmamış kontrolü zarifçe atlar, araç tipine uymayanı (ör. heli/uçakta motor-dengesi) çalıştırmaz ve hata fırlatan kontrolü izole eder.
|
|
116
|
+
- Katalog iki aile: **Uçuş dinamiği** — olaylar/hatalar, EKF sağlığı, titreşim, güç (BAT/CURR), GPS (fix/uydu/HDOP, armed pencerede), pusula, attitude takibi, motor dengesi, RC sinyal kaybı, zamanlama. **Konfigürasyon & kurulum** (çünkü çoğu kaza uçuş anında değil kurulum hatasıdır): riskli parametreler (kapalı arming/failsafe), çelişkili/kapalı/mantıksız değerlerin **parametre denetimi**, kalibrasyon (büyük/sıfır pusula offset'i), yapılandırılmış-ama-sessiz sensörler (kablo/bağlantı arızası), ve firmware'in kendi pre-arm/açılış uyarıları. Artı tavsiye niteliğinde tuning.
|
|
117
|
+
- **Araç-farkında** (copter / heli / uçak / rover): çoklu-rotora özel kontroller bir helinin swashplate servolarında ya da bir uçağın kontrol yüzeylerinde çalışmaz. Copter 3.2–4.6, Plane, QuadPlane, Heli ve Rover'ı kapsayan **40 gerçek forum loguyla doğrulandı.**
|
|
118
|
+
- Bulgular **doküman-temelli**: her biri ilgili resmi ArduPilot sayfasına link verir; raporlar 4.x için sürüm-özel parametre tanımlarını (`apm.pdef.xml`) yüzeye çıkarır. Sunucu offline/deterministik kalır; bu *işaretçileri* web erişimi olan yapay zekâya verir, o okur ve alıntılar.
|
|
119
|
+
- **Fiziksel profil** (`vehicle_profile`) logu airframe gerçeklerine dönüştürür — frame, motor sayısı, batarya hücresi ve özellikle **güç marjı** (hover gazı → itki/ağırlık). Motorlarını sonuna kadar açıp düşen gerçek bir 12 kg'lık quad'da *"underpowered, %69 gazda asılı, sadece %31 pay"* diyor — kazanın asıl sebebi.
|
|
120
|
+
|
|
121
|
+
## Güvenlik
|
|
122
|
+
|
|
123
|
+
Bu sürüm **offline ve salt-okunur**. MAVLink bağlantısı yok, arming yok, parametre yazma yok, aktüasyon yok. Tuning çıktısı sadece tavsiyedir. Canlı-araç özellikleri (düzgün bir güvenlik gateway'i ile: SITL-önce, insan-onayı, kill switch) bilinçli olarak kapsam dışı ve ertelenmiş.
|
|
124
|
+
|
|
125
|
+
## Kaynaklar & varsayımlar
|
|
126
|
+
|
|
127
|
+
Koddaki her sayısal eşik, enum, varsayılan ve davranışsal iddia otoriter kaynaklara karşı (ArduPilot wiki/firmware, MAVLink, MCP spec) [`docs/SOURCES.md`](docs/SOURCES.md)'de denetlenmiştir — her biri *onaylandı* (atıflı), *heuristik* (bizim ihtiyatlı seçimimiz, en yakın rehber atıflı) veya *tasarım kararı* (bizim severity sınırımız) olarak işaretli. Bu denetim 8 gerçek hatayı bulup düzeltti (ör. yanlış bir heli FRAME_CLASS kümesi, yanlış-numaralı event id'leri, innovation test-ratio'su olmayan bir EKF alanı).
|
|
128
|
+
|
|
129
|
+
## Geliştirme
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
pip install -e ".[dev]"
|
|
133
|
+
ruff check ardupilot_mcp tests # lint
|
|
134
|
+
mypy ardupilot_mcp # tip kontrolü
|
|
135
|
+
pytest # testler
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Kontroller sentetik in-memory loglarla (`tests/helpers.py`) test edilir; sentetik bir DataFlash yazıcısı (`tests/synth_bin.py`) parser'a round-trip için gerçek, hermetik bir `.bin` verir — repoya büyük ikili fixture girmez.
|
|
139
|
+
|
|
140
|
+
## Bilinen sınırlamalar
|
|
141
|
+
|
|
142
|
+
- **Toilet-bowl / pusula-heading** arızaları henüz tespit edilmiyor — sadece alan-büyüklüğü stabilitesi değil, dairesel-pozisyon-drift analizi gerektiriyor (planlı).
|
|
143
|
+
- **Gerçekten bozuk bir log** (ör. bit-flip'li mesaj formatı) kısmi-kurtarma yerine net bir hatayla başarısız olur.
|
|
144
|
+
- Büyük loglar (3–4 MB / ~100k kayıt) ~12–15 sn'de parse olur; MCP sunucusu parse'ı path+mtime ile cache'ler, yani bu maliyeti sadece ilk araç çağrısı öder.
|
|
145
|
+
|
|
146
|
+
## Yol haritası
|
|
147
|
+
|
|
148
|
+
1. **Bu sürüm:** ArduPilot offline `.bin` teşhisi + tuning tavsiyesi + genişletilebilir kontrol çerçevesi.
|
|
149
|
+
2. PX4 / ULog desteği (ayrı parser + kurallar; ortak teşhis soyutlaması).
|
|
150
|
+
3. Canlı MAVLink bağlantısı (SITL-önce) + tam güvenlik gateway'i.
|
|
151
|
+
4. Topluluk kontrol-paylaşımı; onay-kapılı tuning *uygulaması*.
|
|
152
|
+
|
|
153
|
+
## Lisans
|
|
154
|
+
|
|
155
|
+
MIT
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# ardupilot-mcp
|
|
2
|
+
|
|
3
|
+
[](https://github.com/furkanisikay/ardupilot-mcp/actions/workflows/ci.yml)
|
|
4
|
+
[](https://pypi.org/project/ardupilot-mcp/)
|
|
5
|
+
[](https://pypi.org/project/ardupilot-mcp/)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
|
|
8
|
+
[🇹🇷 Türkçe](README.md) · 🇬🇧 **English**
|
|
9
|
+
|
|
10
|
+
A deterministic-grounded **MCP (Model Context Protocol) server that diagnoses ArduPilot DataFlash (`.bin`) flight logs**. Point it at a `.bin` log and your LLM client (Claude Desktop, etc.) explains what happened in a flight — backed by a deterministic check engine, not vibes.
|
|
11
|
+
|
|
12
|
+
> This project is built **Turkish-first**, primarily for the Turkish-speaking drone community — but it is fully usable in English. Contributions are very welcome: see [CONTRIBUTING.md](CONTRIBUTING.md) and [AGENTS.md](AGENTS.md) (the rules for humans and AI assistants). Every threshold is sourced in [docs/SOURCES.md](docs/SOURCES.md).
|
|
13
|
+
|
|
14
|
+
## Why log diagnosis?
|
|
15
|
+
|
|
16
|
+
Reading an ArduPilot `.bin` is an expert bottleneck: you filter `ERR` rows, compare `ATT.DesRoll` vs `ATT.Roll` to spot a mechanical failure, and eyeball vibration / EKF / battery clipping. This server runs those checks deterministically and lets the model narrate the result in plain language.
|
|
17
|
+
|
|
18
|
+
## Install
|
|
19
|
+
|
|
20
|
+
Requires Python 3.11+.
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pip install ardupilot-mcp
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Or from source (for development):
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
git clone https://github.com/furkanisikay/ardupilot-mcp
|
|
30
|
+
cd ardupilot-mcp
|
|
31
|
+
pip install -e ".[dev]"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Use with Claude Desktop
|
|
35
|
+
|
|
36
|
+
Add to your `claude_desktop_config.json`:
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"mcpServers": {
|
|
41
|
+
"ardupilot-mcp": {
|
|
42
|
+
"command": "ardupilot-mcp"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
If `ardupilot-mcp` isn't on your PATH, give the full path inside the env you installed into (e.g. `.venv/bin/ardupilot-mcp`, or on Windows `...\Scripts\ardupilot-mcp.exe`). Then ask Claude things like *"analyze the log at C:\\logs\\flight.bin — why did it crash?"*
|
|
49
|
+
|
|
50
|
+
## Tools (all read-only)
|
|
51
|
+
|
|
52
|
+
| Tool | What it does |
|
|
53
|
+
|------|--------------|
|
|
54
|
+
| `analyze_log(path)` | Run the full check suite → severity-ranked findings + summary. Each finding carries **official ArduPilot doc links**, and the report includes version-specific parameter docs for 4.x firmware. The headline. |
|
|
55
|
+
| `log_summary(path)` | Vehicle, firmware, duration, message counts, flight modes, max altitude, integrity. |
|
|
56
|
+
| `vehicle_profile(path)` | **Physical/architecture profile**: frame & type, motor count, battery cells/capacity, hover throttle, **power margin** and thrust-to-weight. For physically-grounded reasoning. |
|
|
57
|
+
| `list_events(path, kinds?, start_s?, end_s?)` | Decoded `ERR`/`MODE`/`EV`/`MSG` timeline. |
|
|
58
|
+
| `query_timeseries(path, message_type, fields, start_s?, end_s?, max_points?)` | Decimated numeric series for drilling into a finding. |
|
|
59
|
+
| `get_params(path, name_glob?)` | Parameter values from the log's PARM dump (e.g. `INS_HNTCH_*`), plus the total count, a version-specific metadata link to interpret them, and a note if the snapshot looks incomplete. |
|
|
60
|
+
| `load_param_file(path, name_glob?)` | Read a user-exported `.param`/`.params` file — the authoritative complete config, for when the log's snapshot is truncated or to compare flown-vs-current. |
|
|
61
|
+
| `recommend_tuning(path, area?)` | Advisory tuning (harmonic notch from gyro FFT, PID, autotune). **Recommendation only — never applied.** |
|
|
62
|
+
| `list_checks()` | The registered diagnostic checks (extensible catalogue). |
|
|
63
|
+
|
|
64
|
+
## How it works
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
.bin ──▶ parser.py (pymavlink DFReader) ──▶ FlightLog (pure domain model)
|
|
68
|
+
│
|
|
69
|
+
▼
|
|
70
|
+
checks/ registry ──▶ Check plugins (one per concern)
|
|
71
|
+
│
|
|
72
|
+
▼
|
|
73
|
+
orchestrator.diagnose() ──▶ DiagnosisReport (structured)
|
|
74
|
+
│
|
|
75
|
+
▼
|
|
76
|
+
server.py (FastMCP, stdio) ──▶ LLM narrates the findings
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
- **Core principle:** the deterministic engine is the single source of truth; the LLM only *explains* and cites — it never decides. This directly answers the objection that "LLMs are less reliable than physics-based log analyzers."
|
|
80
|
+
- **`FlightLog`** is a pure, `pymavlink`-free domain model, so checks and their tests run against synthetic logs without a real `.bin`.
|
|
81
|
+
- **Checks** are independent, registry-registered plugins (`@register_check`). Adding one is a single new module. The orchestrator skips a check cleanly when its data wasn't logged, when it doesn't apply to the vehicle kind (e.g. motor-balance on a heli/plane), and isolates any check that raises.
|
|
82
|
+
- The check catalogue has two families. **Flight dynamics:** events/errors, EKF health, vibration, power (BAT/CURR), GPS (fix/sats/HDOP, scoped to the armed window), compass, attitude tracking, motor balance, RC-link loss, timing. **Configuration & setup** (because many crashes are setup mistakes, not flight events): risky parameters (disabled arming checks/failsafes), a **parameter audit** of contradictory/disabled/implausible values, calibration (large/zero compass offsets), configured-but-silent sensors (wiring/connection faults), and the firmware's own pre-arm/startup warnings. Plus advisory tuning.
|
|
83
|
+
- It is **vehicle-aware** (copter / heli / plane / rover): multirotor-specific checks don't run on a heli's swashplate servos or a plane's control surfaces. Validated against 40 real forum logs across Copter 3.2–4.6, Plane, QuadPlane, Heli and Rover.
|
|
84
|
+
- Findings are **documentation-grounded**: each links the authoritative ArduPilot doc page, and reports surface the firmware-version-specific parameter definitions (`apm.pdef.xml`) for 4.x. The server stays offline/deterministic and hands these *pointers* to the LLM, which has its own web access to read and cite them.
|
|
85
|
+
- The **physical profile** (`vehicle_profile`) turns the log into airframe facts — frame, motor count, battery cells, and especially the **power margin** (hover throttle → thrust-to-weight). On a real 12 kg quad that crashed maxing its motors, it reports "underpowered, hovers at 69 %, only 31 % headroom" — the actual cause.
|
|
86
|
+
|
|
87
|
+
## Safety
|
|
88
|
+
|
|
89
|
+
This release is **offline and read-only**. No MAVLink connection, no arming, no parameter writes, no actuation. Tuning output is advice only. Live-vehicle features (with a proper safety gateway: SITL-first, human-in-the-loop, kill switch) are explicitly out of scope and deferred.
|
|
90
|
+
|
|
91
|
+
## Sources & assumptions
|
|
92
|
+
|
|
93
|
+
Every numeric threshold, enum, default and behavioural claim in the code is audited against authoritative sources (ArduPilot wiki/firmware, MAVLink, the MCP spec) in [`docs/SOURCES.md`](docs/SOURCES.md) — each marked *confirmed* (with a citation), *heuristic* (our conservative choice), or *design choice* (our severity cut-off). That audit found and fixed eight genuine errors (e.g. a wrong heli FRAME_CLASS set, mis-numbered event ids, an EKF field that isn't an innovation test ratio).
|
|
94
|
+
|
|
95
|
+
## Development
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
pip install -e ".[dev]"
|
|
99
|
+
ruff check ardupilot_mcp tests
|
|
100
|
+
mypy ardupilot_mcp
|
|
101
|
+
pytest
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Checks are tested against synthetic in-memory logs (`tests/helpers.py`) and a synthetic DataFlash writer (`tests/synth_bin.py`) gives the parser a real, hermetic `.bin` to round-trip — no large binary fixtures committed.
|
|
105
|
+
|
|
106
|
+
## Known limitations
|
|
107
|
+
|
|
108
|
+
- **Toilet-bowl / compass-heading faults** aren't detected yet — they need circular-position-drift analysis (planned), not just field-magnitude stability.
|
|
109
|
+
- A **genuinely corrupt log** (e.g. a bit-flipped message format) fails to parse with a clear error rather than partial recovery.
|
|
110
|
+
- Large logs (3–4 MB / ~100k records) take ~12–15 s to parse; the MCP server caches a parsed log by path+mtime, so only the first tool call pays that cost.
|
|
111
|
+
|
|
112
|
+
## Roadmap
|
|
113
|
+
|
|
114
|
+
1. **This release:** ArduPilot offline `.bin` diagnosis + tuning advice + extensible check framework.
|
|
115
|
+
2. PX4 / ULog support (separate parser + rules; shared diagnosis abstraction).
|
|
116
|
+
3. Live MAVLink connection (SITL-first) with a full safety gateway.
|
|
117
|
+
4. Community check-sharing; confirmation-gated tuning *apply*.
|
|
118
|
+
|
|
119
|
+
## License
|
|
120
|
+
|
|
121
|
+
MIT
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# ardupilot-mcp
|
|
2
|
+
|
|
3
|
+
[](https://github.com/furkanisikay/ardupilot-mcp/actions/workflows/ci.yml)
|
|
4
|
+
[](https://pypi.org/project/ardupilot-mcp/)
|
|
5
|
+
[](https://pypi.org/project/ardupilot-mcp/)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
|
|
8
|
+
🇹🇷 **Türkçe** · [🇬🇧 English](README.en.md)
|
|
9
|
+
|
|
10
|
+
**ArduPilot DataFlash (`.bin`) uçuş loglarını teşhis eden, deterministik-temelli bir MCP (Model Context Protocol) sunucusu.** Bir `.bin` logunu gösterirsin; Claude Desktop gibi bir yapay zekâ istemcisi uçuşta ne olduğunu **düz Türkçe** anlatır — tahminle değil, deterministik bir kontrol motoruyla.
|
|
11
|
+
|
|
12
|
+
> Bu araç **çoğunlukla Türk ve Türkçe konuşan drone topluluğu** için, Türkçe-öncelikli olarak geliştiriliyor. Katkı vermek isteyenlere bayılıyoruz — [CONTRIBUTING.md](CONTRIBUTING.md) ve [AGENTS.md](AGENTS.md) (insanlar ve yapay zekâ asistanları için kurallar). Her eşik değeri [docs/SOURCES.md](docs/SOURCES.md)'de kaynağıyla belgeli.
|
|
13
|
+
|
|
14
|
+
## Neden log teşhisi?
|
|
15
|
+
|
|
16
|
+
Bir ArduPilot `.bin` logunu okumak uzmanlık ister: `ERR` satırlarını filtreler, mekanik arıza için `ATT.DesRoll` ile `ATT.Roll`'u karşılaştırır, titreşim / EKF / batarya clipping'ine göz gezdirirsin. Drone'un düştüğünde "neden?" sorusunun cevabı bu logun içindedir ama okumak doktorun röntgen okuması gibidir. Bu sunucu o kontrolleri deterministik olarak çalıştırır ve yapay zekânın sonucu sade dille anlatmasını sağlar.
|
|
17
|
+
|
|
18
|
+
## Kurulum
|
|
19
|
+
|
|
20
|
+
Python 3.11+ gerekir.
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pip install ardupilot-mcp
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Kaynaktan (geliştirme için):
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
git clone https://github.com/furkanisikay/ardupilot-mcp
|
|
30
|
+
cd ardupilot-mcp
|
|
31
|
+
pip install -e ".[dev]"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Claude Desktop ile kullanım
|
|
35
|
+
|
|
36
|
+
`claude_desktop_config.json` dosyana ekle:
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"mcpServers": {
|
|
41
|
+
"ardupilot-mcp": {
|
|
42
|
+
"command": "ardupilot-mcp"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`ardupilot-mcp` komutu PATH'te bulunamazsa, kurduğun ortamdaki tam yolu ver (ör. `.venv/bin/ardupilot-mcp` veya Windows'ta `...\Scripts\ardupilot-mcp.exe`). Sonra Claude'a şöyle sor: *"C:\\loglar\\ucus.bin logunu analiz et — neden düştü?"*
|
|
49
|
+
|
|
50
|
+
## Araçlar (hepsi salt-okunur)
|
|
51
|
+
|
|
52
|
+
| Araç | Ne yapar |
|
|
53
|
+
|------|----------|
|
|
54
|
+
| `analyze_log(path)` | Tüm kontrol paketini çalıştırır → önem-sıralı bulgular + özet. Her bulgu **resmi ArduPilot doküman linkleri** taşır; rapor 4.x firmware için sürüm-özel parametre dokümanlarını da içerir. **Manşet araç.** |
|
|
55
|
+
| `log_summary(path)` | Araç, firmware, süre, mesaj sayıları, uçuş modları, max irtifa, bütünlük. |
|
|
56
|
+
| `vehicle_profile(path)` | **Fiziksel / mimari profil**: frame & tip, motor sayısı, batarya hücresi/kapasitesi, hover gazı, **güç marjı** ve itki/ağırlık. Fiziğe-dayalı muhakeme için. |
|
|
57
|
+
| `list_events(path, kinds?, start_s?, end_s?)` | Çözümlenmiş `ERR`/`MODE`/`EV`/`MSG` zaman çizelgesi. |
|
|
58
|
+
| `query_timeseries(path, message_type, fields, start_s?, end_s?, max_points?)` | Bir bulguya derinlemesine bakmak için seyreltilmiş sayısal seri. |
|
|
59
|
+
| `get_params(path, name_glob?)` | Logun PARM dökümünden parametre değerleri (ör. `INS_HNTCH_*`), toplam sayı, yorumlamak için sürüm-özel metadata linki, ve döküm eksikse bir uyarı. |
|
|
60
|
+
| `load_param_file(path, name_glob?)` | Kullanıcının dışa aktardığı `.param`/`.params` dosyasını okur — log dökümü kesikse veya "uçtuğu config vs şimdiki"yi karşılaştırmak için tam, otoriter config. |
|
|
61
|
+
| `recommend_tuning(path, area?)` | Tavsiye niteliğinde tuning (gyro FFT'sinden harmonik notch, PID, autotune). **Sadece öneri — asla uygulanmaz.** |
|
|
62
|
+
| `list_checks()` | Kayıtlı teşhis kontrolleri (genişletilebilir katalog). |
|
|
63
|
+
|
|
64
|
+
## Nasıl çalışır
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
.bin ──▶ parser.py (pymavlink DFReader) ──▶ FlightLog (saf domain modeli)
|
|
68
|
+
│
|
|
69
|
+
▼
|
|
70
|
+
checks/ registry ──▶ Check eklentileri (her biri bir konu)
|
|
71
|
+
│
|
|
72
|
+
▼
|
|
73
|
+
orchestrator.diagnose() ──▶ DiagnosisReport (yapısal)
|
|
74
|
+
│
|
|
75
|
+
▼
|
|
76
|
+
server.py (FastMCP, stdio) ──▶ Yapay zekâ bulguları anlatır
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
- **Anahtar ilke:** deterministik motor **tek doğruluk kaynağı**; yapay zekâ sadece açıklar ve kaynak gösterir, *karar vermez*. Bu, "yapay zekâ fizik-temelli analizörlerden güvenilmez" eleştirisine doğrudan cevaptır.
|
|
80
|
+
- **`FlightLog`** saf, `pymavlink`-bağımsız bir domain modelidir; bu yüzden kontroller ve testler gerçek `.bin` olmadan sentetik loglarla çalışır.
|
|
81
|
+
- **Kontroller** bağımsız, registry'e kayıtlı eklentilerdir (`@register_check`). Yeni bir tane eklemek = tek bir yeni modül. Orchestrator, verisi loglanmamış kontrolü zarifçe atlar, araç tipine uymayanı (ör. heli/uçakta motor-dengesi) çalıştırmaz ve hata fırlatan kontrolü izole eder.
|
|
82
|
+
- Katalog iki aile: **Uçuş dinamiği** — olaylar/hatalar, EKF sağlığı, titreşim, güç (BAT/CURR), GPS (fix/uydu/HDOP, armed pencerede), pusula, attitude takibi, motor dengesi, RC sinyal kaybı, zamanlama. **Konfigürasyon & kurulum** (çünkü çoğu kaza uçuş anında değil kurulum hatasıdır): riskli parametreler (kapalı arming/failsafe), çelişkili/kapalı/mantıksız değerlerin **parametre denetimi**, kalibrasyon (büyük/sıfır pusula offset'i), yapılandırılmış-ama-sessiz sensörler (kablo/bağlantı arızası), ve firmware'in kendi pre-arm/açılış uyarıları. Artı tavsiye niteliğinde tuning.
|
|
83
|
+
- **Araç-farkında** (copter / heli / uçak / rover): çoklu-rotora özel kontroller bir helinin swashplate servolarında ya da bir uçağın kontrol yüzeylerinde çalışmaz. Copter 3.2–4.6, Plane, QuadPlane, Heli ve Rover'ı kapsayan **40 gerçek forum loguyla doğrulandı.**
|
|
84
|
+
- Bulgular **doküman-temelli**: her biri ilgili resmi ArduPilot sayfasına link verir; raporlar 4.x için sürüm-özel parametre tanımlarını (`apm.pdef.xml`) yüzeye çıkarır. Sunucu offline/deterministik kalır; bu *işaretçileri* web erişimi olan yapay zekâya verir, o okur ve alıntılar.
|
|
85
|
+
- **Fiziksel profil** (`vehicle_profile`) logu airframe gerçeklerine dönüştürür — frame, motor sayısı, batarya hücresi ve özellikle **güç marjı** (hover gazı → itki/ağırlık). Motorlarını sonuna kadar açıp düşen gerçek bir 12 kg'lık quad'da *"underpowered, %69 gazda asılı, sadece %31 pay"* diyor — kazanın asıl sebebi.
|
|
86
|
+
|
|
87
|
+
## Güvenlik
|
|
88
|
+
|
|
89
|
+
Bu sürüm **offline ve salt-okunur**. MAVLink bağlantısı yok, arming yok, parametre yazma yok, aktüasyon yok. Tuning çıktısı sadece tavsiyedir. Canlı-araç özellikleri (düzgün bir güvenlik gateway'i ile: SITL-önce, insan-onayı, kill switch) bilinçli olarak kapsam dışı ve ertelenmiş.
|
|
90
|
+
|
|
91
|
+
## Kaynaklar & varsayımlar
|
|
92
|
+
|
|
93
|
+
Koddaki her sayısal eşik, enum, varsayılan ve davranışsal iddia otoriter kaynaklara karşı (ArduPilot wiki/firmware, MAVLink, MCP spec) [`docs/SOURCES.md`](docs/SOURCES.md)'de denetlenmiştir — her biri *onaylandı* (atıflı), *heuristik* (bizim ihtiyatlı seçimimiz, en yakın rehber atıflı) veya *tasarım kararı* (bizim severity sınırımız) olarak işaretli. Bu denetim 8 gerçek hatayı bulup düzeltti (ör. yanlış bir heli FRAME_CLASS kümesi, yanlış-numaralı event id'leri, innovation test-ratio'su olmayan bir EKF alanı).
|
|
94
|
+
|
|
95
|
+
## Geliştirme
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
pip install -e ".[dev]"
|
|
99
|
+
ruff check ardupilot_mcp tests # lint
|
|
100
|
+
mypy ardupilot_mcp # tip kontrolü
|
|
101
|
+
pytest # testler
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Kontroller sentetik in-memory loglarla (`tests/helpers.py`) test edilir; sentetik bir DataFlash yazıcısı (`tests/synth_bin.py`) parser'a round-trip için gerçek, hermetik bir `.bin` verir — repoya büyük ikili fixture girmez.
|
|
105
|
+
|
|
106
|
+
## Bilinen sınırlamalar
|
|
107
|
+
|
|
108
|
+
- **Toilet-bowl / pusula-heading** arızaları henüz tespit edilmiyor — sadece alan-büyüklüğü stabilitesi değil, dairesel-pozisyon-drift analizi gerektiriyor (planlı).
|
|
109
|
+
- **Gerçekten bozuk bir log** (ör. bit-flip'li mesaj formatı) kısmi-kurtarma yerine net bir hatayla başarısız olur.
|
|
110
|
+
- Büyük loglar (3–4 MB / ~100k kayıt) ~12–15 sn'de parse olur; MCP sunucusu parse'ı path+mtime ile cache'ler, yani bu maliyeti sadece ilk araç çağrısı öder.
|
|
111
|
+
|
|
112
|
+
## Yol haritası
|
|
113
|
+
|
|
114
|
+
1. **Bu sürüm:** ArduPilot offline `.bin` teşhisi + tuning tavsiyesi + genişletilebilir kontrol çerçevesi.
|
|
115
|
+
2. PX4 / ULog desteği (ayrı parser + kurallar; ortak teşhis soyutlaması).
|
|
116
|
+
3. Canlı MAVLink bağlantısı (SITL-önce) + tam güvenlik gateway'i.
|
|
117
|
+
4. Topluluk kontrol-paylaşımı; onay-kapılı tuning *uygulaması*.
|
|
118
|
+
|
|
119
|
+
## Lisans
|
|
120
|
+
|
|
121
|
+
MIT
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""Deterministic-grounded MCP server for diagnosing ArduPilot DataFlash logs."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
__version__ = "0.1.0"
|
|
6
|
+
|
|
7
|
+
# Importing the checks package registers every check via decorator side effects.
|
|
8
|
+
from . import checks as checks # noqa: E402,F401
|
|
9
|
+
from .flight_log import FlightLog, LogMeta
|
|
10
|
+
from .orchestrator import diagnose
|
|
11
|
+
from .parser import parse_bin
|
|
12
|
+
|
|
13
|
+
__all__ = ["FlightLog", "LogMeta", "diagnose", "parse_bin", "checks", "__version__"]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Entry point: ``python -m ardupilot_mcp`` (or the ``ardupilot-mcp`` script).
|
|
2
|
+
|
|
3
|
+
Runs the MCP server over stdio — the transport Claude Desktop and other local
|
|
4
|
+
MCP clients use.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from .server import mcp
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def main() -> None:
|
|
13
|
+
mcp.run() # stdio transport by default
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
if __name__ == "__main__":
|
|
17
|
+
main()
|