Skip to main content
Glama

ridgehop

CI PyPI License: MIT Python 3.10–3.13

Will your LoRa link reach? If not, where to hop.

Ask your AI agent whether a LoRa / Meshtastic link will reach, and where to put the repeater when it won't. Real terrain, real propagation model, no guessing.

ridgehop is an MCP server. It gives Claude (or any MCP client) Copernicus GLO-30 terrain (30 m) and the Longley-Rice / ITM propagation model, with presets for every Meshtastic region and modem preset. It runs locally: no backend, no API keys.

ridgehop answering a link question

Placeholder with real tool output; the GIF of a full Claude Code session is generated by docs/demo/make_demo.sh.

Quickstart

git clone https://github.com/Joaquincuevas/ridgehop && cd ridgehop
claude mcp add ridgehop -- uvx --from "$PWD" ridgehop
claude "Does a Meshtastic node at -33.4261,-70.6106 reach -33.3497,-70.5178? If not, where do I put a repeater?"

Needs uv. Once ridgehop is on PyPI, uvx ridgehop is all you need (no clone).

Related MCP server: geospatial-mcp

Tools

Tool

What it answers

link_check(a, b, preset | freq_mhz, tx_power_dbm, antenna_gain_a_dbi, antenna_gain_b_dbi, height_a_m, height_b_m)

Does A reach B? Verdict (reachable ≥ 10 dB margin, marginal 0–10 dB, unreachable), margin, ITM path loss, received power, first Fresnel zone clearance and every obstruction (distance, height above the line). The preset gives defaults; explicit parameters override them.

suggest_repeater(a, b, preset, search_radius_km?)

Searches high points around the path and ranks repeater sites by the weaker of the two hops (A→R, R→B).

coverage(point, radius_km, preset, height_m)

Radial ITM sweep: area per margin band, farthest reachable point, a GeoJSON file (one MultiPolygon per band) and an optional transparent PNG overlay. 10 km in ~1 s.

elevation_profile(a, b, samples)

Terrain profile between two points.

Points are {"lat": …, "lon": …} (WGS84).

Presets:

  • meshtastic/<REGION>/<MODEM_PRESET>: every region in the Meshtastic firmware (US, EU_868, ANZ, IN, BR_902, …) and every modem preset (LONG_FAST, LONG_SLOW, MEDIUM_FAST, SHORT_TURBO, …). Frequency is the band centre; TX power is min(region limit, 22 dBm), like the firmware does with tx_power = 0 on SX126x radios.

  • lorawan/AU915/DR0–DR6.

  • meshcore/firmware_default.

Every value cites its source in src/ridgehop/presets.yaml. Sensitivity uses Semtech's formula with a 6.5 dB noise figure, which reproduces the official Meshtastic link-budget table (test).

Example, what the agent gets back from link_check (abridged):

{
  "verdict": "unreachable",
  "margin_db": -20.1,
  "summary": "unreachable: margin -20.1 dB (terrain blocks the line by 157 m at 8.95 km from A).",
  "line_of_sight": false,
  "main_obstruction": {"distance_km": 8.95, "terrain_m": 938.5, "above_line_m": 156.9},
  "radio": {"preset": "meshtastic/ANZ/LONG_FAST", "frequency_mhz": 921.5, "tx_power_dbm": 22, "sensitivity_dbm": -131.0}
}

Try it on Glama

ridgehop MCP server

The Glama listing lets you browse the tools, check the quality score and call them from the MCP Inspector before installing anything.

Setup

Claude Code

claude mcp add ridgehop -- uvx --from /path/to/ridgehop ridgehop   # from a checkout
claude mcp add ridgehop -- uvx ridgehop                             # once published on PyPI

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "ridgehop": {
      "command": "uvx",
      "args": ["--from", "/path/to/ridgehop", "ridgehop"]
    }
  }
}

With the PyPI release, use "args": ["ridgehop"].

The first query in a new area downloads one ~40 MB terrain tile (1°×1°) to ~/.cache/ridgehop (override with RIDGEHOP_CACHE). Coverage GeoJSON/PNG files go to ~/.cache/ridgehop/coverage/.

How it differs

ridgehop was called lorascope before its first release. It was renamed so it wouldn't be confused with two unrelated projects:

  • LoRascope · Meshsight: a browser app for planning MeshCore/Meshtastic links on a map (line of sight, Fresnel, coverage). Good if you want to click around a map; ridgehop has no UI and is meant to be called by an agent.

  • CORIOTLAB/LoRaScope: open hardware for LoRaWAN coverage mapping and GNSS quality measurements. It measures coverage in the field; ridgehop predicts it from terrain.

ridgehop

Meshtastic Site Planner

CloudRF

SPLAT!

Radio Mobile

Interface

MCP tools for AI agents

Web app

Web app + paid API

CLI

Windows desktop app

Model

ITM (Longley-Rice), same as Site Planner

ITM via SPLAT!

Several (ITM, ITU, …)

ITM / ITWOM

Longley-Rice

Terrain

Copernicus GLO-30 (30 m DSM), auto-download

SRTM (AWS Terrain Tiles)

Global, high-res, clutter

SRTM files you prepare

SRTM and others

Repeater search

✅ ranks hilltops by weakest hop

Highest point near a site

✅ Best Site Analysis (paid)

❌

Manual

Meshtastic presets

All regions and modem presets

Per-device profiles

Generic

Manual

Manual

Cost / license

Free, MIT

Free, GPL-3

Commercial

Free, GPL-2

Freeware

ridgehop does not try to replace these tools. Its job is to let an agent get a checked answer in the middle of a conversation ("is this link viable? where's the best hill?"), instead of guessing a range from memory.

Accuracy and limitations

  • ridgehop's ITM engine (pure-Python itmlogic) matches SPLAT!'s point_to_point_ITM (the engine behind the Meshtastic Site Planner) and the NTIA reference implementation within 0.01 dB on real Santiago profiles, and within 0.42 dB on 60 synthetic profiles. Method: tests/README.md; decision record: docs/decisions.md.

  • That comparison validates the propagation model, not the terrain. GLO-30 is a surface model: rooftops and tree canopy are included at 30 m resolution, while individual buildings, foliage loss and interference are not modeled.

  • The 10 dB reachable threshold is a rule of thumb, not a calibration (#25).

  • One repeater at a time; multi-hop chains are planned (#18).

Treat the output as a prediction and confirm with a range test.

Development

uv sync
uv run pytest                     # first run downloads ~80 MB of terrain
uv run pytest -m "not network"    # offline subset
uv run ruff check . && uv run ruff format --check .
uv run python scripts/smoke_stdio.py

See CONTRIBUTING.md. Good first issues: link.

Attribution and licenses

  • ridgehop: MIT (LICENSE).

  • Terrain: Copernicus DEM GLO-30. © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018, provided under COPERNICUS by the European Union and ESA; all rights reserved. Read at runtime from AWS Open Data; ridgehop does not redistribute terrain data.

  • Propagation model: the Irregular Terrain Model (Longley-Rice) by NTIA/ITS. At runtime ridgehop uses itmlogic (MIT). The NTIA reference code (a U.S. Government work) and SPLAT! (GPL) are compiled only locally by tests/reference/ to validate results; neither is distributed.

  • Radio parameters come from the Meshtastic firmware and docs, The Things Stack and MeshCore, cited per value.

Full notices: NOTICE. Español: README.es.md.

Available Tools

4 tools
coverageA

Area a node at point covers: radial ITM sweep over real terrain. Returns area stats per margin band (reachable >= 10 dB, marginal 0-10 dB), farthest reachable distance, a GeoJSON file with one MultiPolygon per band and an optional PNG overlay.

Inputs: point (required), png, preset, radials, +4 more. Returns: object

elevation_profileC

Terrain profile between A and B: distance, elevations and highest point.

Inputs: a (required), b (required), samples. Returns: object

suggest_repeaterA

When A can't reach B: search high points around the path and return the best repeater sites, ranked by the weaker of the two hops (A->repeater, repeater->B), each with its margin and verdict.

Inputs: a (required), b (required), preset, height_a_m, +4 more. Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool targets a clearly distinct analysis: terrain profile, point-to-point link budget, repeater site search, and area coverage. The two A-to-B tools (elevation_profile and link_check) differ clearly in output (terrain vs. radio verdict), and suggest_repeater/coverage are unambiguous.

    Naming Consistency3/5

    Names mix noun phrases (elevation_profile, link_check, coverage) with a verb_noun form (suggest_repeater). All are readable and snake_case, but there is no single predictable pattern across the set.

    Tool Count5/5

    Four tools is well-scoped for a LoRa propagation analysis server; each tool covers a distinct workflow step (profile, link check, repeater siting, coverage) with no filler.

    Completeness4/5

    The surface covers the core lifecycle of link planning: inspect terrain, test a link, find a repeater, and map coverage. Minor gaps exist, such as batch/multi-link comparisons or network-level planning, but agents can work around these.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables agents to retrieve ground elevations worldwide, profile route ascent/descent and grades, sample grid areas for high/low points and relief, and test whether terrain blocks a sightline, drawing on USGS 3DEP and Open Topo Data with per-value provenance.
      124 npm
      3
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      Enables radio line-of-sight checks over locally cached FABDEM terrain for points and routes, including Earth curvature, k-factor refraction, Fresnel-zone clearance, coverage gaps, and verdicts at named stops. It also supports terrain elevation/profile queries and tile prefetching for offline use.
      6
      AGPL 3.0