iNAV MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@iNAV MCP ServerFind my flight controller and check why it won't arm."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
iNAV MCP Server
An MCP server that lets Claude configure, diagnose, and troubleshoot an iNAV fixed-wing flight controller over USB.
It talks to the FC through a single serial connection, using the iNAV CLI for configuration writes and a small built-in MSP codec for live/binary reads. Every write is dry-run by default, auto-backs-up first, refuses while the board is armed, and reads back to verify.
⚠️ Safety: Always remove props from the aircraft before any motor test. This tool never switches the FC into MSP-RX mode and never arms the aircraft.
Requirements
Python 3.10+
An iNAV flight controller (developed against iNAV 8.x/9.x) connected over USB
The serial port the FC enumerates as (e.g.
COM3on Windows,/dev/ttyACM0on Linux)
Related MCP server: MCP Remote Access
Install
# from the repo root
python -m venv .venv
.venv/Scripts/python -m pip install -e . # Windows
# source .venv/bin/activate && pip install -e . # Linux/macOSFor development (tests):
.venv/Scripts/python -m pip install -e ".[dev]"Try it without a flight controller
You don't need any hardware to confirm the project works — the test suite runs fully offline (no FC required):
.venv/Scripts/python -m pytest # Windows
# .venv/bin/pytest # Linux/macOSAll 186 tests should pass. To actually use the server, though, you need a flight controller flashed with iNAV firmware (developed against iNAV 8.x/9.x) connected over USB — without one, the connection tools have nothing to talk to.
Register with Claude
Add the server to your Claude (Code or Desktop) MCP config
(~/.claude/settings.json or the Claude Desktop config). Replace the paths
below with wherever you cloned this repo — the command points at the Python
inside your .venv, and cwd is the repo root.
Windows:
{
"mcpServers": {
"inav": {
"command": "C:\\path\\to\\inav-mcp\\.venv\\Scripts\\python.exe",
"args": ["-m", "inav_mcp.server"],
"cwd": "C:\\path\\to\\inav-mcp"
}
}
}Linux / macOS:
{
"mcpServers": {
"inav": {
"command": "/path/to/inav-mcp/.venv/bin/python",
"args": ["-m", "inav_mcp.server"],
"cwd": "/path/to/inav-mcp"
}
}
}The server speaks MCP over stdio. You can also run it directly with the
installed entry point inav-mcp.
Typical workflows
The server ships prompts that walk Claude through the common jobs — just pick one:
new_fixed_wing_setup— gather hardware details →define_aircraft→ review → apply.troubleshoot_no_arm— decode arming-prevention flags → guided fixes.configure_modes— identify switches from live RC → suggest a layout → assign modes.
Or drive it conversationally, e.g.:
"Connect to my FC on COM3 and tell me why it won't arm."
"Set up a 4S flying wing on DSHOT600, then show me the commands before applying."
Tools (35)
Connection & identity
Tool | What it does |
| List available serial ports. |
| Auto-detect which port has an FC by probing for MSP identity — no guessing the port. |
| Open the FC connection, return board identity. |
| Close the connection. |
| FC variant, firmware version, target, API version, sensors. |
Hardware setup
Tool | What it does |
| Offline planner — stores a profile and generates the CLI config plan. |
| The current declared profile + plan. |
| Apply the plan (gated: not armed, auto-backup, read-back verify). On iNAV, applying is inherently save+reboot. |
|
|
Flight modes & switches
Tool | What it does |
| Recommend a fixed-wing switch/mode layout (offline). |
| Assign one mode to an aux range. |
| Map a whole 2/3/6-pos switch in one call. |
| Remove a mode's switch assignments. |
Diagnostics
Tool | What it does |
| Full sweep: arming, sensors, RC, battery, GPS → prioritized fixes. |
| Decode arming-prevention flags into plain reasons + fixes. |
| Live RC channel values — flip a switch, see which channel moves. |
| Live attitude, per-sensor health, battery. |
| MSP status + CLI |
| All modes and their current switch assignments. |
| Read |
Bench tests & calibration
Tool | What it does |
| Spin ONE motor briefly. Hard-gated: |
| Zero-level the accelerometer (board flat + still). Fixes most "not level" arming blocks. |
| Calibrate the compass (rotate the craft ~30s). |
Navigation & tuning
Tool | What it does |
| Live GPS fix/sats/position + nav-readiness assessment (read-only). |
| Enable the GPS feature and set provider/SBAS. |
| Set fixed-wing RTH altitude / climb-first / landing / loiter radius. |
| Read fixed-wing PID gains, rates, and filter cutoffs. |
| Set fixed-wing P/I/D/FF gains for one axis. |
Config management
Tool | What it does |
| Save |
| List saved backups (path, time, size, label), newest first. |
| Replay a saved backup via CLI. |
| Set the RC-loss procedure / throttle (atomic write; FC validates the procedure token). |
| Raw CLI escape hatch (ONE command, one reboot). Writes need |
| Run MANY CLI commands in one session → one reboot. Read-only batch exits without saving; a write batch backs up + saves once (rolls back if any command is rejected). Motor/ |
|
|
Resources
inav://modes-reference— iNAV mode glossary with fixed-wing relevance.inav://current-profile— the declared aircraft profile + generated plan.inav://last-backup— the most recentdiff allbackup.
Safety model
Props-off gate —
test_motor()and any livemotorcommand viacli(...)requireprops_removed=True(the generic write-confirm cannot bypass it), refuse while the board is armed, and are never saved.test_motor()also clamps throttle/duration and always commands the motor back to stop.Armed guard — all writes (and motor tests / calibrations) refuse if the FC reports armed.
Auto-backup before every write; the backup path is returned.
Dry-run by default — writes return the exact commands;
confirm=Trueapplies.Read-back verify — after applying, settings are re-read and mismatches flagged.
save= reboot —save_and_rebootwarns and marks the connection stale.No receiver-mode changes — the FC is never switched to MSP-RX.
Reboot model — why batching matters
On iNAV, leaving the CLI always reboots the FC — both save (persist to
EEPROM) and exit (discard changes) trigger a reboot, after which the USB VCP
re-enumerates and we reconnect (~6–8 s, surfaced as reboot_seconds). So every
CLI round-trip costs one reboot, including read-only ones (get, diff,
dump, version). There is no way to read over the CLI without that reboot —
the only lever is to do fewer CLI sessions.
What this server does to keep reboot churn down:
Reads prefer MSP, which never reboots.
get_status,read_rc_channels,read_sensors,read_gps,list_flight_modes,why_wont_it_arm,diagnose, and the armed-guard all read structured data over MSP — zero reboots. Only data that's CLI-only (diff all,get failsafe, PID/rate/filtergets) pays a reboot.Writes are atomic and batch internally. Each write tool (
apply_aircraft_setup,set_flight_mode,assign_switch,set_pid,set_failsafe,restore_config, …) opens one CLI session: backup → apply all commands → save → reboot once. Multiple settings = one reboot.cli_batch()for ad-hoc runs. Instead of callingcli()in a loop (one reboot per command — the cadence that can knock a board into DFU), pass a list tocli_batch(): one session, one reboot. Read-only batchesexitwithout saving; write batches back up andsaveonce (rolling back if any command is rejected).Resilient reconnect. After a reboot the reconnect waits a short settle, then polls with backoff; if the original COM port doesn't return it scans for a re-enumerated one, and if the board came back in DFU/bootloader mode it says so and tells you to power-cycle (USB unplug/replug) rather than hanging.
How it works
Single serial handle shared between MSP and CLI modes (
connection.py), tracked by amodestate machine. Never two handles on one port.CLI-first writes — the CLI is stable across firmware versions; MSP command IDs can drift. A thin MSP v1/v2 codec (
msp.py) handles only the live binary reads (status, RC, attitude, analog, GPS, sensor health, mode ranges, box maps).Box IDs are resolved at runtime via
MSP_BOXNAMES+MSP_BOXIDS— never hardcoded.Arming flags are decoded from
knowledge/arming_flags.json, calibrated to iNAV 8.x/9.x bit positions. The table declares its calibrated major versions, andconnect()/board_info()/why_wont_it_arm()/diagnose()warn when the connected firmware is outside that range (bit positions shift between majors, so flag names may be mislabelled even though the raw flag value is correct).
Development
.venv/Scripts/python -m pytest # 186 tests, all offline (no FC needed)The suite covers the MSP codec round-trips, CLI response parsing, the diagnostic rule engine, offline profile/command generation, mode-range read-modify-write logic (against a mock connection), and resource/prompt registration.
Project layout:
inav_mcp/
server.py # FastMCP app: all tools, resources, prompts
connection.py # single serial handle, MSP + CLI mode switching
msp.py # MSP v1/v2 codec + parsers
cli.py # CLI response parsing, write-command detection
modes.py # box maps, mode-range read/write, layout planner
profiles.py # AircraftProfile + offline CLI command generator
troubleshoot.py # diagnose() rule engine + arming-flag decode
safety.py # armed guard, backup paths
state.py # connection + profile singletons
knowledge/ # arming_flags / modes_reference / esc_protocols / fc_targets (JSON)
tests/ # offline pytest suite
tools/ # gen_readme_tools.py — regenerates the tool reference below
examples/ # flying_wing_quickstart.md — end-to-end walkthroughRelease history is in CHANGELOG.md.
Full tool reference
Complete, signature-accurate list — regenerate after changing tools with
python -m tools.gen_readme_tools (a test fails if this drifts):
35 tools — auto-generated by tools/gen_readme_tools.py; do not edit by hand.
Tool | Description |
| Apply the declared aircraft profile to the FC, then save and reboot. |
| Map a multi-position switch's detents to flight modes in one call. |
| Save the current FC config to a timestamped backup file. |
| Read flight-controller identity over MSP. |
| Calibrate the accelerometer (zero-level). Fixes most 'not level' / 'accel not |
| Calibrate the compass (magnetometer). Only useful if a compass is installed. |
| Compare the FC's actual configuration against the declared aircraft profile. |
| Read and explain the failsafe configuration (what happens on RC loss). |
| Remove all switch assignments for a flight mode (disables its slots via CLI 'aux'). |
| Raw CLI escape hatch — run any iNAV CLI command directly. |
| Run MANY CLI commands in ONE CLI session — a single reboot for the whole batch. |
| Enable the GPS feature and set the receiver provider / SBAS (atomic CLI write). |
| Open the serial connection to the FC and return board identity. |
| Define the aircraft hardware profile and generate a configuration plan. |
| Full diagnostic sweep — the flagship troubleshooter. |
| Close the serial connection to the FC. |
| Auto-detect which serial port has a flight controller, so you don't guess. |
| Return the currently declared aircraft profile. |
| Read FC status via both MSP and CLI. |
| List saved config backups under ./backups/, newest first. No FC needed. |
| List all available flight modes and their current switch assignments. |
| List all available serial ports. |
| Live GPS status: fix type, satellites, position, speed, HDOP + nav-readiness. |
| Read live RC channel values via MSP. |
| Read live sensor values: attitude, per-sensor health, and analog (battery). |
| Read fixed-wing PID gains, rates, and key filter cutoffs (via CLI). |
| Restore FC config by replaying a backup file's CLI commands, then save+reboot. |
| Save the running config to EEPROM and reboot the FC. |
| Set the core failsafe behaviour (atomic CLI write: backup → apply → save+reboot). |
| Assign a flight mode to an aux channel range (read-modify-write via CLI 'aux'). |
| Set core fixed-wing navigation / RTH parameters (atomic CLI write). |
| Set fixed-wing PID gains for ONE axis (atomic CLI write). |
| Recommend a fixed-wing flight-mode/switch layout. Pure knowledge — no FC needed. |
| Spin ONE motor briefly for a bench test (direction / wiring / response). |
| Decode the FC's arming-prevention flags into plain English. |
License
MIT. This project ships its own MSP codec and does not import GPL libraries (uNAVlib / YAMSPy) at runtime, keeping it permissively licensed.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/starlordz12/inav-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server