chew-z/bradio
If you are the rightful owner of bradio and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
Bradio is a dual-mode CLI tool and MCP server designed for discovering internet radio stations, leveraging the Radio Browser database.
π» Bradio
A powerful dual-mode CLI tool and MCP server for discovering internet radio stations. Built with Go and powered by the fantastic Radio Browser database.
β¨ Features
- π Smart Search: Find stations by name or tag with popularity-based sorting
- π€ AI Integration: MCP server mode for seamless AI assistant integration
- β‘ Fast & Lightweight: Single binary with no external dependencies
- π΅ Shell-Friendly: Perfect for integration with
fzf
,mpv
, and other tools - π Rich Output: Detailed station info including click count, codec, bitrate, and streaming URL
π Quick Start
Installation
# Clone and build
git clone <repository-url>
cd bradio
go build -o bin/bradio .
Basic Usage
# Search by station name
bradio --name "Milano Lounge"
# Search by tag/genre
bradio --tag "ambient"
# Limit results
bradio --tag "jazz" --limit 10
# Get help
bradio --help
ποΈ Operating Modes
1. CLI Mode (Default)
Traditional command-line interface for interactive use:
# Search examples
bradio --name "BBC Radio"
bradio --tag "classical" --limit 20
bradio --tag "electronic"
Output Format:
(15420) BBC Radio 1; pop,hits,uk,bbc; MP3[128]; http://stream.live.vc.bbcmedia.co.uk/bbc_radio_one
(8965) Jazz FM; jazz,smooth jazz,uk; AAC[128]; http://edge-audio-01-gos2.sharp-stream.com/jazzmmp3
2. MCP Server Mode
Model Context Protocol server for AI assistant integration:
# Start MCP server
bradio --mcp
Available MCP Tools:
search_radio_by_name
- Search stations by namesearch_radio_by_tag
- Search stations by tag/genreget_popular_stations
- Get most popular stations globally
Example MCP Usage:
# List available tools
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | bradio --mcp
# Search for jazz stations
echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"search_radio_by_tag","arguments":{"tag":"jazz","limit":5}}}' | bradio --mcp
π΅ Integration Examples
With fzf + mpv (Interactive Radio Player)
# One-liner for quick radio browsing
bradio --tag 'lounge' | fzf --nth 1 --preview="echo {}" --preview-window=bottom:2:nohidden | awk -F $'; ' '{print $4}' | mpv --playlist=-
# Create a handy function
function br() {
bradio "$@" | fzf --nth 1 --preview='echo {}' --preview-window=bottom:2:nohidden | awk -F $'; ' '{print $4}' | mpv --playlist=-
}
# Use the function
br --tag 'chillout' --limit 50
With AI Assistants (MCP Mode)
# Configure Claude/GPT to use bradio as MCP server
# Add to your AI assistant's MCP configuration:
{
"servers": {
"bradio": {
"command": "/path/to/bradio",
"args": ["--mcp"]
}
}
}
π οΈ Development
Building
go build -o bin/bradio .
Testing
./run_test.sh
# or directly:
go test -v ./...
Linting
./run_lint.sh
Formatting
./run_format.sh
π Command Reference
CLI Flags
Flag | Description | Default |
---|---|---|
--name | Search stations by name | - |
--tag | Search stations by tag/genre | - |
--limit | Maximum number of results | 12 |
--help | Show help information | - |
--mcp | Run as MCP server | - |
Search Tips
- Popular genres:
jazz
,classical
,rock
,electronic
,ambient
,news
,talk
- Language tags:
english
,french
,german
,spanish
,italian
- Country codes:
uk
,usa
,france
,germany
,italy
- Combine terms: Use specific tags like
smooth jazz
,deep house
,indie rock
π Data Source
Bradio is powered by the excellent Radio Browser - a community-driven database of internet radio stations. Radio Browser provides:
- π Global Coverage: Thousands of stations worldwide
- π Free & Open: No API keys or registration required
- π Rich Metadata: Detailed station information and statistics
- π Live Updates: Community-maintained, always current
- π High Performance: Fast, reliable API infrastructure
Special thanks to the Radio Browser team and community for maintaining this fantastic resource!
ποΈ Architecture
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β CLI Mode β β Core Logic β β MCP Server β
β β β β β Mode β
β β’ Flag parsing βββββΆβ β’ Radio search ββββββ β’ Tools β
β β’ Direct output β β β’ Data formattingβ β β’ Resources β
β β’ Error handlingβ β β’ API calls β β β’ Transport β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β
βΌ
ββββββββββββββββββββ
β Radio-Browser β
β API β
ββββββββββββββββββββ
π€ Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
π License
This project is licensed under the MIT License - see the file for details.
π Acknowledgments
- Radio Browser - For providing the incredible radio station database
- goradios - Go library for Radio Browser API
- mcp-go - Go implementation of Model Context Protocol