Skip to main content

ridgehop

English · Español · Português

CI PyPI License: MIT Python 3.10–3.13 Good first issues PRs welcome

All Contributors

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 in Claude Code

A real Claude Code session using ridgehop, replayed from its log (docs/demo/).

Contributing

ridgehop is young and built in the open. Code, docs, translations, presets and real-world link reports all count, and every contributor goes in the table below.

  • 🟢 Good first issues: each one lists the files to touch, acceptance criteria and a hint.
  • ⚡ Zero setup: Open in GitHub Codespaces (or a local devcontainer), then uv run pytest -m "not network".
  • 📡 No code? Report a real link (positions, heights, did it work?); it is the most valuable data for calibration.
  • 🗺️ ROADMAP.md · CONTRIBUTING.md (zero to first PR in ~15 min) · Discussions

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).

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?, max_repeaters?) Searches high points around the path and ranks repeater sites by the weaker of the two hops (A→R, R→B). With max_repeaters 2–4 it also plans a relay chain: the fewest repeaters that close the link, hop by hop.
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

Checked on the three ground-to-ground records in Meshtastic's official Range Tests page (details):

Record ridgehop vs SPLAT! (Site Planner) ridgehop prediction Reality
331 km, Apennines → Snežnik −0.05 dB marginal, +5.7 dB worked
254 km, Hailstone Butte → West Butte +0.21 dB marginal, +4.4 dB worked
166 km, Karioi → Taranaki +0.15 dB reachable, +27.5 dB worked
  • 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.

Contributors

Joaquín Cuevas
Joaquín Cuevas

💻 📖 🔬 ⚠️ 🚧 🔣
Anjana TK
Anjana TK

🚇 📖
Aishwarya Kamble
Aishwarya Kamble

💻 ⚠️
SHANN
SHANN

💻 ⚠️
Dokaxz
Dokaxz

🌍

Want to be here? Start with a good first issue.

Sibling projects

  • clarent: classic decision, optimization and engineering methods (TRIZ, Kepner-Tregoe, ACH, SPC…) as tools that compute, for developers and AI agents.
  • esp32-iot-kit: ESP32 + DHT22 telemetry over MQTT into InfluxDB and Grafana, with the server stack in one docker compose command.

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.

Metadata

Release files for ridgehop 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ridgehop 0.1.0
File Size Uploaded Provenance Actions
ridgehop-0.1.0.tar.gz 26.5 kB With provenance Details for ridgehop-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ridgehop 0.1.0
File Interpreter ABI Platform Actions
ridgehop-0.1.0-py3-none-any.whl Python 3 none any Details for ridgehop-0.1.0-py3-none-any.whl

Total release size: 56.7 kB

Release files / ridgehop-0.1.0.tar.gz

Download URL ridgehop-0.1.0.tar.gz
Size 26.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0eb365d50adcd00549fb413d1162896b96d722efd1e06e3c887a07eacb388fb6
BLAKE2b-256 checksum
How to use checksums
0985cbd9dc10e3aadc0ec314a8c73e8d9f26c30a404662f0521f1cbce497db41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Release files / ridgehop-0.1.0-py3-none-any.whl

Download URL ridgehop-0.1.0-py3-none-any.whl
Size 30.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
141963e498129fdfeb2abcf53df348d04f201b73a9931da2b37428c47e2670a0
BLAKE2b-256 checksum
How to use checksums
a51826b193f56d3cc10ab9e4d39bcdfd73c3a8ddbd3cce768c5aeef9311e247e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Security for ridgehop 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ridgehop-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page