RepeaterBook Python Client
Unofficial project. RepeaterBook Python Client is an independent, community-maintained library and MCP server, and is not affiliated with, endorsed by, or officially supported by RepeaterBook.com. "RepeaterBook" is a trademark of its respective owner. For the official website and API, visit https://repeaterbook.com/.
Welcome to the RepeaterBook Python Client documentation!
RepeaterBook Python Client is an unofficial, third-party Python library and Model Context Protocol (MCP) server that provides a powerful and convenient interface to the RepeaterBook.com API — the world's largest database of amateur radio repeaters. Use it as a library to programmatically download, query, and analyze repeater data, or run the bundled MCP server to give AI agents and LLM tools the same repeater lookup capabilities.
Features
- Easy API Access: Download repeater data from RepeaterBook.com with a simple async interface
- Unofficial MCP Server: Ship repeater sync, geographic search, and lookup to any MCP client as three typed tools — see the MCP Server guide
- Local Database: Store repeater information in a local SQLite database for fast queries
- Geographic Queries: Find repeaters near a location using distance-based filtering
- Band Filtering: Query repeaters by frequency band (2m, 70cm, etc.)
- Digital Mode Support: Filter by DMR, P25, NXDN, and other digital modes
- Smart Caching: Automatic caching of API responses to reduce load and improve performance
- Type Safe: Fully typed with mypy for excellent IDE support
- Async/Await: Non-blocking I/O for efficient API operations
Quick Example
This library requires a per-user RepeaterBook API token. Request access, generate your token, and expose it as the
REPEATERBOOKenvironment variable (for exampleexport REPEATERBOOK="rbuapp_...").
import asyncio
import os
from repeaterbook import RepeaterBook, Repeater
from repeaterbook.services import RepeaterBookAPI
from repeaterbook.models import ExportQuery, Status
from repeaterbook.utils import LatLon, Radius
from repeaterbook.queries import filter_radius, square, band, Bands
import pycountry
async def find_nearby_repeaters():
# Download repeater data
api = RepeaterBookAPI(app_token=os.environ["REPEATERBOOK"])
brazil = pycountry.countries.get(name="Brazil")
repeaters = await api.download(query=ExportQuery(countries={brazil}))
# Store in local database
rb = RepeaterBook()
rb.populate(repeaters)
# Find DMR repeaters within 50km of São Paulo
sao_paulo = LatLon(lat=-23.5505, lon=-46.6333)
radius = Radius(origin=sao_paulo, distance=50)
nearby = rb.query(
square(radius),
Repeater.dmr_capable == True,
Repeater.operational_status == Status.ON_AIR,
band(Bands.CM_70) # 70cm band
)
filtered = filter_radius(nearby, radius)
# Display results (filter_radius returns repeaters sorted by distance)
from haversine import haversine
for rep in filtered[:5]:
distance = haversine(radius.origin, (rep.latitude, rep.longitude), unit=radius.unit)
print(f"{distance:.1f}km - {rep.frequency:.4f} MHz - {rep.callsign}")
asyncio.run(find_nearby_repeaters())
Quick Example (MCP)
Prefer to drive RepeaterBook from an AI agent? The unofficial MCP server ships as
the repeaterbook-mcp console script behind the mcp extra. Point your MCP
client at uvx and nothing needs installing up front:
{
"mcpServers": {
"repeaterbook": {
"command": "uvx",
"args": ["--from", "repeaterbook[mcp]", "repeaterbook-mcp"],
"env": {
"REPEATERBOOK_WORKING_DIR": "~/.repeaterbook",
"REPEATERBOOK_APP_CONTACT": "you@example.com",
"REPEATERBOOK_APP_TOKEN": "rbuapp_..."
}
}
}
}
That exposes three tools — sync_repeaters, search_repeaters, and
get_repeater — returning a stable, source-agnostic repeater spec. See the
MCP Server guide for the full tool reference, filter vocabulary,
and configuration options.
Documentation
- Getting Started - Tutorial for beginners
- Usage Guide - Comprehensive usage examples
- MCP Server - Run the unofficial MCP server for AI agents
- Examples - Real-world use cases
- Architecture - Understanding the internals
- API Reference - Complete API documentation
- FAQ - Common questions and troubleshooting
Read RepeaterBook.com's official API documentation for more information about the upstream API.
Use Cases
- AI Agents & Assistants: Let an LLM look up repeaters conversationally over MCP
- Trip Planning: Find repeaters along travel routes
- Emergency Communications: Identify emergency-capable repeaters
- Radio Programming: Generate codeplugs for DMR and other digital radios
- Coverage Analysis: Create coverage maps and statistics
- Network Analysis: Analyze repeater networks and infrastructure
- Mobile Apps: Build repeater directory applications
- Research: Analyze amateur radio repeater trends and distributions
Related Projects
- MicaelJarniac/opengd77 - OpenGD77 radio programming
- MicaelJarniac/ogdrb - OpenGD77 RepeaterBook integration
See Also
- afourney/hamkit - Ham radio toolkit
- desertblade/OpenGD77-Repeaterbook - OpenGD77 integration
- TomHW/OpenGD77 - OpenGD77 firmware
Installation
PyPI
repeaterbook is available on PyPI:
# With uv (recommended)
uv add repeaterbook
# With pip
pip install repeaterbook
# With Poetry
poetry add repeaterbook
MCP server
The MCP server lives behind the mcp extra. Most MCP clients should invoke it
via uvx, with no install step at all:
# Run on demand, no install (what MCP clients should use)
uvx --from "repeaterbook[mcp]" repeaterbook-mcp
# Or install it persistently
uv tool install "repeaterbook[mcp]"
# Or add it as a project dependency
uv add "repeaterbook[mcp]"
pip install "repeaterbook[mcp]"
GitHub
You can also install the latest version of the code directly from GitHub:
# With uv
uv add git+https://github.com/MicaelJarniac/repeaterbook
# With pip
pip install git+https://github.com/MicaelJarniac/repeaterbook
# With Poetry
poetry add git+https://github.com/MicaelJarniac/repeaterbook
Requirements
- Python 3.11 or higher
- Dependencies are automatically installed:
- aiohttp - Async HTTP client
- anyio - Async compatibility layer
- attrs - Immutable config classes
- haversine - Distance calculations
- loguru - Structured logging
- pycountry - Country/region codes
- pydantic - Data validation
- sqlmodel - SQL ORM with type safety
- tqdm - Progress bars
- yarl - URL handling
- The optional
mcpextra additionally installsfastmcpandpydantic-settings
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
More details can be found in CONTRIBUTING.
Contributors ✨
Micael Jarniac 🐛 💻 🖋 🔣 📖 💡 🤔 🚇 🚧 📆 💬 🔬 👀 🔧 ⚠️ 📓 |
ada mancini 🐛 🤔 📓 |
aaronjbrown 💻 📖 🤔 ⚠️ |
Erica Morton 🐛 💻 📖 🔬 ⚠️ |
License
This project was created with the MicaelJarniac/crustypy template.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file repeaterbook-0.10.0.tar.gz.
File metadata
- Download URL: repeaterbook-0.10.0.tar.gz
- Upload date:
- Size: 358.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e98b1aa06b7320d49593619eb1ff0d27fcbb70defcf7756cda670d0e6cc4798
|
|
| MD5 |
f15b1f81d682521039d9c66b76bd1138
|
|
| BLAKE2b-256 |
e1879468fc5d62eac8370b44d24274a7643c8224de43f36aaa8097131cfd9047
|
Provenance
The following attestation bundles were made for repeaterbook-0.10.0.tar.gz:
Publisher:
semantic-release.yml on MicaelJarniac/repeaterbook
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
repeaterbook-0.10.0.tar.gz -
Subject digest:
2e98b1aa06b7320d49593619eb1ff0d27fcbb70defcf7756cda670d0e6cc4798 - Sigstore transparency entry: 2666978067
- Sigstore integration time:
-
Permalink:
MicaelJarniac/repeaterbook@7764f3d5930c89a2a63b934cbc5f69af075a7b46 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/MicaelJarniac
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
semantic-release.yml@7764f3d5930c89a2a63b934cbc5f69af075a7b46 -
Trigger Event:
push
-
Statement type:
File details
Details for the file repeaterbook-0.10.0-py3-none-any.whl.
File metadata
- Download URL: repeaterbook-0.10.0-py3-none-any.whl
- Upload date:
- Size: 44.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc8508d8f504c791a2a7128c6520c1581eb135af4c8515105e9eddbedac562dc
|
|
| MD5 |
299f275c1b6268f1ee7830045bd11161
|
|
| BLAKE2b-256 |
5c006c4b19b23b1e44720ef2f18cd49f9c159bfcdf1ac7122a21fdf948caf5ea
|
Provenance
The following attestation bundles were made for repeaterbook-0.10.0-py3-none-any.whl:
Publisher:
semantic-release.yml on MicaelJarniac/repeaterbook
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
repeaterbook-0.10.0-py3-none-any.whl -
Subject digest:
dc8508d8f504c791a2a7128c6520c1581eb135af4c8515105e9eddbedac562dc - Sigstore transparency entry: 2666978088
- Sigstore integration time:
-
Permalink:
MicaelJarniac/repeaterbook@7764f3d5930c89a2a63b934cbc5f69af075a7b46 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/MicaelJarniac
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
semantic-release.yml@7764f3d5930c89a2a63b934cbc5f69af075a7b46 -
Trigger Event:
push
-
Statement type: