MCP Server
The lc29h-mcp server exposes the full LC29H GNSS module capability set through the Model Context Protocol — 20 tools and 3 resources that allow LLMs to interact with GNSS hardware through natural language. Position queries, constellation configuration, RTK correction streaming, dead reckoning, power management, and base station survey-in are all available as structured tool calls.
Installation
Section titled “Installation”uvx lc29h-mcpgit clone https://git.supported.systems/warehack.ing/lc29hcd lc29huv syncuv run lc29h-mcpEnvironment Variables
Section titled “Environment Variables”| Variable | Default | Description |
|---|---|---|
LC29H_PORT | /dev/ttyS0 | Serial port path to the LC29H module |
LC29H_BAUD | 115200 | Serial baud rate |
Add to Claude Code
Section titled “Add to Claude Code”claude mcp add lc29h -- uvx lc29h-mcpOr add to any MCP-compatible client’s config:
{ "mcpServers": { "lc29h": { "command": "uvx", "args": ["lc29h-mcp"] } }}To pass environment variables (for a non-default serial port, for example):
{ "mcpServers": { "lc29h": { "command": "uvx", "args": ["lc29h-mcp"], "env": { "LC29H_PORT": "/dev/ttyUSB0" } } }}Available Capabilities
Section titled “Available Capabilities”The MCP server organizes its 20 tools into six functional groups, with 3 resources for lightweight status polling.
Position and Status
Section titled “Position and Status”Core tools for reading the module’s current state. These work on all LC29H variants.
| Tool | Parameters | Returns |
|---|---|---|
get_position | none | latitude, longitude, altitude, fix_type, satellites, hdop, speed_knots, course, timestamp |
get_satellites | none | List of satellite objects with prn, elevation, azimuth, snr, constellation, used_in_fix |
get_module_info | none | model, firmware_version, build_date, build_time, chip_model, chip_version |
The get_position tool returns a snapshot from the continuously-parsed NMEA stream. The fix_type field reports NO_FIX, GPS, DGPS, RTK_FIXED, RTK_FLOAT, or DR depending on the module’s current solution quality. HDOP (Horizontal Dilution of Precision) values below 1.0 indicate excellent geometry; values above 5.0 suggest poor satellite distribution.
The get_module_info tool sends both PAIR021 and PQTMVERNO proprietary commands to retrieve complete hardware and firmware identification. The model string encodes the variant (e.g., LC29HDA for the RTK-only variant).
Configuration
Section titled “Configuration”Tools for tuning the module’s GNSS engine. Changes take effect immediately but revert on reboot unless persisted with save_config.
| Tool | Parameters | Description |
|---|---|---|
configure_constellations | gps, glonass, galileo, beidou, qzss (all bool, default True) | Enable or disable individual GNSS constellations. At least one must remain enabled. |
set_fix_rate | ms (int, default 1000) | Position fix interval in milliseconds. Range: 100ms (10 Hz) to 10000ms (0.1 Hz). Higher rates consume more power. |
save_config | none | Persist all current settings to flash memory. Sends both PAIR and PQTM save commands. |
restart_module | mode (str, default "hot") | Restart the GNSS engine. hot keeps all data (~1s TTFF), warm clears ephemeris (~30s TTFF), cold clears everything (~60s TTFF). |
NTRIP (RTK Corrections)
Section titled “NTRIP (RTK Corrections)”Tools for connecting to NTRIP casters that stream RTCM3 correction data. RTK corrections enable centimeter-level positioning on the DA and BA variants.
| Tool | Parameters | Description |
|---|---|---|
ntrip_connect | host (str), port (int, default 2101), mountpoint (str, default ""), username (str, default ""), password (str, default "") | Connect to an NTRIP caster and begin streaming RTCM3 corrections to the module. |
ntrip_status | none | Returns connected boolean indicating current NTRIP connection state. |
ntrip_disconnect | none | Disconnect from the NTRIP caster and cancel the RTCM forwarding task. |
Source table discovery: When ntrip_connect is called with an empty mountpoint, it fetches and returns the caster’s source table instead of connecting. This returns a list of available mount points with their format, navigation system, and other metadata — useful for discovering what corrections are available from a given caster.
Survey-in (BS Variant)
Section titled “Survey-in (BS Variant)”Tools for establishing a base station. The BS variant can average its position over time to determine a precise fixed location, then output RTCM3 corrections for nearby RTK rovers.
| Tool | Parameters | Description |
|---|---|---|
survey_in_start | duration_s (int, default 3600), accuracy_m (float, default 1.0) | Start position averaging. The module computes a mean position over the specified duration with the target accuracy threshold. |
survey_in_status | none | Returns active, valid, duration_s, mean_accuracy_m, ECEF coordinates (ecef_x, ecef_y, ecef_z), and WGS84 conversion (latitude, longitude, altitude_m). |
The survey-in completes when both the duration has elapsed and the computed mean position meets the accuracy threshold. Longer durations and tighter accuracy targets produce more precise base station coordinates. A typical survey-in for sub-meter accuracy runs 1 hour; centimeter-level base station positioning may require 24 hours or more.
Dead Reckoning (BA/CA Variants)
Section titled “Dead Reckoning (BA/CA Variants)”Dead reckoning fuses GNSS with onboard inertial sensors (accelerometer and gyroscope) to maintain continuous positioning through signal gaps such as tunnels and urban canyons.
| Tool | Parameters | Description |
|---|---|---|
dead_reckoning_config | mode (int, default -1) | Query (-1) or set the DR mode. 0 = GNSS only (DR disabled), 1 = DR only (inertial navigation without GNSS), 2 = GNSS+DR auto (module decides when to engage DR). |
EASY / AGNSS (AA Variant)
Section titled “EASY / AGNSS (AA Variant)”EASY (Extended Prediction Orbit) is Quectel’s self-generated ephemeris prediction system. It caches satellite orbit data and predicts orbits for up to 3 days, enabling faster time-to-first-fix when the module temporarily loses signal.
| Tool | Parameters | Description |
|---|---|---|
easy_status | none | Query whether EASY is enabled and the number of extension days available (0-3 days of predicted orbits stored). |
easy_enable | enabled (bool, default True) | Enable or disable EASY ephemeris prediction. Save with save_config to persist. |
Power and Performance
Section titled “Power and Performance”Tools for tuning power consumption, filtering behavior, and satellite selection criteria. These work on all variants.
| Tool | Parameters | Description |
|---|---|---|
odometer | action (str, default "enable") | Control the GNSS distance accumulator. Actions: enable, disable, reset. |
elevation_mask | degrees (int, default -1) | Get (-1) or set (0-90) the satellite elevation cutoff angle. Satellites below this elevation are excluded from position computation. Typical range: 5-15 degrees. |
speed_clamping | enabled (bool, default True) | When enabled, the module reports zero speed when stationary. Prevents position drift from being misinterpreted as movement. |
gnss_suspend_resume | action (str, default "suspend") | suspend puts the GNSS engine into idle mode (stops tracking but keeps serial alive). resume wakes the engine (similar to hot start). |
periodic_mode | mode (int, default -1), run_ms (int, default 1000), sleep_ms (int, default 1000) | Duty-cycle power saving. mode=-1 queries current setting. 0 = disabled (continuous), 1 = smart (stays awake if position uncertain), 2 = strict (fixed timing). |
Resources
Section titled “Resources”MCP resources provide lightweight, read-only status snapshots. Unlike tools, resources are intended for passive monitoring and can be polled by clients that support the MCP resource protocol.
| URI | Description | Content |
|---|---|---|
gnss://position | Live position snapshot, updated each fix cycle | Lat/Lon/Alt, fix type, satellite count, HDOP, speed, course |
gnss://satellites | Current satellite constellation view | Satellite count plus per-satellite PRN, constellation, elevation, azimuth, SNR |
gnss://status | Module status overview | Fix type, satellite count, NTRIP connection state |
Resources return human-readable text summaries. For structured data, use the corresponding tools (get_position, get_satellites, ntrip_status).
Example Conversation
Section titled “Example Conversation”You: What module is connected? Show me the satellite constellation.
Claude: I'll query the module and check the sky view.[Calls get_module_info][Calls get_satellites]
The connected module is an LC29H(DA) running firmwareLC29HDANR11A04S, built 2024-03-15. It's the RTK-only variant.
Currently tracking 28 satellites across four constellations: GPS: G02, G05, G07, G13, G15, G20, G24, G29, G30 GLONASS: R04, R05, R09, R15, R16 Galileo: E02, E07, E12, E25, E33, E36 BeiDou: B11, B14, B23, B26, B33, B37, B44
18 are used in the current 3D fix. Best SNR is 45 dB-Hz onG05, weakest used satellite is 22 dB-Hz on R16.
You: Disable GLONASS and QZSS — I only want GPS, Galileo, and BeiDou.
Claude: I'll update the constellation configuration.[Calls configure_constellations with gps=True, glonass=False, galileo=True, beidou=True, qzss=False]
Done. GLONASS and QZSS are now disabled. The module will only trackGPS, Galileo, and BeiDou satellites. This change is active but willrevert on reboot — want me to save it to flash?
You: Yes, save it. Then connect to rtk2go.com for RTK corrections.
Claude: I'll persist the configuration and set up NTRIP.[Calls save_config][Calls ntrip_connect with host="rtk2go.com", mountpoint=""]
Configuration saved. Before connecting, here are the mount pointsnear you from rtk2go.com:
SFBAY_RTCM3 — RTCM 3.2, GPS+GLO+GAL, 37.78°N 122.41°W OAK_GPS — RTCM 3.3, GPS+GLO+GAL+BDS, 37.80°N 122.27°W
Which mount point should I use?
You: Use SFBAY_RTCM3, no authentication needed.
Claude: Connecting now.[Calls ntrip_connect with host="rtk2go.com", mountpoint="SFBAY_RTCM3"]
NTRIP connection established to rtk2go.com/SFBAY_RTCM3.RTCM3 corrections are streaming to the module. The fix typeshould progress from 3D to RTK float, then RTK fixed within30-60 seconds. I'll check the position in a moment.
[Calls get_position]
Fix upgraded to RTK_FIXED. Current position:37.7749182°N, 122.4194023°W, altitude 52.31mHDOP 0.6, 18 satellites, accuracy is now centimeter-level.Tool Reference (Complete)
Section titled “Tool Reference (Complete)”All 20 tools grouped by function, with variant applicability.
Position and Status — All Variants
Section titled “Position and Status — All Variants”| Tool | Description |
|---|---|
get_position | Current position fix with coordinates, fix quality, HDOP, speed, course, timestamp |
get_satellites | All tracked satellites with PRN, constellation, elevation, azimuth, SNR, used-in-fix flag |
get_module_info | Firmware version, model, build date/time, chip model, chip version |
Configuration — All Variants
Section titled “Configuration — All Variants”| Tool | Description |
|---|---|
configure_constellations | Enable/disable GPS, GLONASS, Galileo, BeiDou, QZSS individually |
set_fix_rate | Position fix interval 100-10000ms |
save_config | Persist all settings to flash (both PAIR and PQTM config stores) |
restart_module | Hot, warm, or cold restart of the GNSS engine |
NTRIP — DA, BA, BS Variants
Section titled “NTRIP — DA, BA, BS Variants”| Tool | Description |
|---|---|
ntrip_connect | Connect to NTRIP caster; empty mountpoint fetches source table |
ntrip_status | Check NTRIP connection state |
ntrip_disconnect | Disconnect and cancel RTCM forwarding task |
Survey-in — BS Variant
Section titled “Survey-in — BS Variant”| Tool | Description |
|---|---|
survey_in_start | Start base station position averaging with duration and accuracy targets |
survey_in_status | Survey-in progress with ECEF and WGS84 coordinates, accuracy estimate |
Dead Reckoning — BA, CA Variants
Section titled “Dead Reckoning — BA, CA Variants”| Tool | Description |
|---|---|
dead_reckoning_config | Query or set DR mode (GNSS-only, DR-only, auto) |
EASY / AGNSS — AA Variant
Section titled “EASY / AGNSS — AA Variant”| Tool | Description |
|---|---|
easy_status | Query EASY ephemeris prediction cache status |
easy_enable | Enable or disable EASY technology |
Power and Performance — All Variants
Section titled “Power and Performance — All Variants”| Tool | Description |
|---|---|
odometer | Enable, disable, or reset distance accumulation |
elevation_mask | Get or set satellite elevation cutoff angle (0-90 degrees) |
speed_clamping | Enable or disable static speed clamp (report zero when stationary) |
gnss_suspend_resume | Suspend or resume the GNSS engine for power saving |
periodic_mode | Duty-cycle power saving: disabled, smart, or strict with configurable run/sleep timing |
Resources
Section titled “Resources”| URI | Description |
|---|---|
gnss://position | Live position text snapshot |
gnss://satellites | Current constellation view as formatted text |
gnss://status | Module status with NTRIP connection state |
Local Development with MCP
Section titled “Local Development with MCP”For developing against the MCP server from source:
# Add local development server to Claude Codeclaude mcp add lc29h-dev -- uv run --directory /path/to/lc29h lc29h-mcp
# Test with headless modeclaude -p "What module is connected?" \ --mcp-config .mcp.json \ --allowedTools "mcp__lc29h-dev__*"To run the MCP server with a custom serial port during development:
LC29H_PORT=/dev/ttyUSB0 uv run lc29h-mcp