Skip to content

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.

Terminal window
uvx lc29h-mcp
VariableDefaultDescription
LC29H_PORT/dev/ttyS0Serial port path to the LC29H module
LC29H_BAUD115200Serial baud rate
Terminal window
claude mcp add lc29h -- uvx lc29h-mcp

Or 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"
}
}
}
}

The MCP server organizes its 20 tools into six functional groups, with 3 resources for lightweight status polling.

Core tools for reading the module’s current state. These work on all LC29H variants.

ToolParametersReturns
get_positionnonelatitude, longitude, altitude, fix_type, satellites, hdop, speed_knots, course, timestamp
get_satellitesnoneList of satellite objects with prn, elevation, azimuth, snr, constellation, used_in_fix
get_module_infononemodel, 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).

Tools for tuning the module’s GNSS engine. Changes take effect immediately but revert on reboot unless persisted with save_config.

ToolParametersDescription
configure_constellationsgps, glonass, galileo, beidou, qzss (all bool, default True)Enable or disable individual GNSS constellations. At least one must remain enabled.
set_fix_ratems (int, default 1000)Position fix interval in milliseconds. Range: 100ms (10 Hz) to 10000ms (0.1 Hz). Higher rates consume more power.
save_confignonePersist all current settings to flash memory. Sends both PAIR and PQTM save commands.
restart_modulemode (str, default "hot")Restart the GNSS engine. hot keeps all data (~1s TTFF), warm clears ephemeris (~30s TTFF), cold clears everything (~60s TTFF).

Tools for connecting to NTRIP casters that stream RTCM3 correction data. RTK corrections enable centimeter-level positioning on the DA and BA variants.

ToolParametersDescription
ntrip_connecthost (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_statusnoneReturns connected boolean indicating current NTRIP connection state.
ntrip_disconnectnoneDisconnect 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.

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.

ToolParametersDescription
survey_in_startduration_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_statusnoneReturns 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 fuses GNSS with onboard inertial sensors (accelerometer and gyroscope) to maintain continuous positioning through signal gaps such as tunnels and urban canyons.

ToolParametersDescription
dead_reckoning_configmode (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 (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.

ToolParametersDescription
easy_statusnoneQuery whether EASY is enabled and the number of extension days available (0-3 days of predicted orbits stored).
easy_enableenabled (bool, default True)Enable or disable EASY ephemeris prediction. Save with save_config to persist.

Tools for tuning power consumption, filtering behavior, and satellite selection criteria. These work on all variants.

ToolParametersDescription
odometeraction (str, default "enable")Control the GNSS distance accumulator. Actions: enable, disable, reset.
elevation_maskdegrees (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_clampingenabled (bool, default True)When enabled, the module reports zero speed when stationary. Prevents position drift from being misinterpreted as movement.
gnss_suspend_resumeaction (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_modemode (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).

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.

URIDescriptionContent
gnss://positionLive position snapshot, updated each fix cycleLat/Lon/Alt, fix type, satellite count, HDOP, speed, course
gnss://satellitesCurrent satellite constellation viewSatellite count plus per-satellite PRN, constellation, elevation, azimuth, SNR
gnss://statusModule status overviewFix 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).

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 firmware
LC29HDANR11A04S, 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 on
G05, 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 track
GPS, Galileo, and BeiDou satellites. This change is active but will
revert 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 points
near 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 type
should progress from 3D to RTK float, then RTK fixed within
30-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.31m
HDOP 0.6, 18 satellites, accuracy is now centimeter-level.

All 20 tools grouped by function, with variant applicability.

ToolDescription
get_positionCurrent position fix with coordinates, fix quality, HDOP, speed, course, timestamp
get_satellitesAll tracked satellites with PRN, constellation, elevation, azimuth, SNR, used-in-fix flag
get_module_infoFirmware version, model, build date/time, chip model, chip version
ToolDescription
configure_constellationsEnable/disable GPS, GLONASS, Galileo, BeiDou, QZSS individually
set_fix_ratePosition fix interval 100-10000ms
save_configPersist all settings to flash (both PAIR and PQTM config stores)
restart_moduleHot, warm, or cold restart of the GNSS engine
ToolDescription
ntrip_connectConnect to NTRIP caster; empty mountpoint fetches source table
ntrip_statusCheck NTRIP connection state
ntrip_disconnectDisconnect and cancel RTCM forwarding task
ToolDescription
survey_in_startStart base station position averaging with duration and accuracy targets
survey_in_statusSurvey-in progress with ECEF and WGS84 coordinates, accuracy estimate
ToolDescription
dead_reckoning_configQuery or set DR mode (GNSS-only, DR-only, auto)
ToolDescription
easy_statusQuery EASY ephemeris prediction cache status
easy_enableEnable or disable EASY technology
ToolDescription
odometerEnable, disable, or reset distance accumulation
elevation_maskGet or set satellite elevation cutoff angle (0-90 degrees)
speed_clampingEnable or disable static speed clamp (report zero when stationary)
gnss_suspend_resumeSuspend or resume the GNSS engine for power saving
periodic_modeDuty-cycle power saving: disabled, smart, or strict with configurable run/sleep timing
URIDescription
gnss://positionLive position text snapshot
gnss://satellitesCurrent constellation view as formatted text
gnss://statusModule status with NTRIP connection state

For developing against the MCP server from source:

Terminal window
# Add local development server to Claude Code
claude mcp add lc29h-dev -- uv run --directory /path/to/lc29h lc29h-mcp
# Test with headless mode
claude -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:

Terminal window
LC29H_PORT=/dev/ttyUSB0 uv run lc29h-mcp