Skip to main content
Glama
radiobrowser-api-mcp

radiobrowser-api-mcp

RadioBrowser API — MCP server

An MCP server for the Radio Browser API plus live "now playing" track info read from station streams via ICY/Shoutcast metadata. No API keys needed.

What is the Radio Browser API?

Radio Browser is a free, community-driven directory of internet radio stations — currently ~58,000 stations (57,973 at last check) with ~12,000 tags. Anyone can submit stations, and automated jobs continuously probe stream health (lastcheckok). It exposes a free JSON webservice with no API key; the only requirement is sending a User-Agent header. The service runs on several mirror servers, which this project fails over across automatically:

  • https://de1.api.radio-browser.info

  • https://de2.api.radio-browser.info

  • https://nl1.api.radio-browser.info

Useful links:

What this project adds on top: every directory endpoint as an MCP tool, plus get_now_playing, which the directory itself cannot provide — it resolves a station name to a stream URL and reads the live track from the stream's ICY/Shoutcast metadata.

Related MCP server: lms-mcp

Tools (29)

Live track info:

  • get_now_playing(station_name, timeout=20) — current track from the station's stream via ICY/Shoutcast metadata. Returns {artist, title, raw_title, station_matched, country, stream_url}; track fields are null when the station sends no titles right now.

Directory search (search_radio_stations, advanced_station_search, list_all_stations, get_station_by_uuid, find_stations_by_name, find_stations_by_country, find_stations_by_country_code, find_stations_by_state, find_stations_by_language, find_stations_by_tag, find_stations_by_codec) — mirrors of GET /json/stations[/search|/byuuid|/by*], with exact, order, reverse, offset, limit, hidebroken params.

Rankings & history: get_top_voted_stations, get_most_clicked_stations, get_recently_clicked_stations, get_recently_updated_stations (topvote/topclick/lastclick/lastchange), get_station_check_history (GET /json/checks — the API ignores limit, so bound with seconds).

Counters & submission: register_station_click (/click), vote_for_station (/vote), resolve_station_stream_url (/url), add_station (POST /add). Note: click/vote/url increment public counters.

Facets & meta: list_countries, list_country_codes, list_codecs, list_states, list_languages, list_tags, get_directory_stats, list_directory_servers.

Run

uv run server.py                                  # stdio transport (default)
uv run server.py --transport streamable-http --http-port 50052  # HTTP for remote connections

The HTTP mode serves Streamable HTTP at /mcp (current standard) plus the legacy SSE transport at /sse (posts to /messages/), with open /health and / endpoints. HOST/PORT env vars supply the --host/--http-port defaults.

HTTP auth (remote deployments)

register_station_click, vote_for_station, resolve_station_stream_url and add_station mutate the public directory. When RADIO_MCP_AUTH_TOKEN is set, calls to these tools must carry an Authorization: Bearer <token> HTTP header; read-only tools stay open. Unset (default) means everything is open — fine for localhost, not for the internet. Over stdio (local use) the check is skipped.

Deploy (Docker / Coolify)

The image runs the server in Streamable HTTP mode on port 50052. Coolify accepts a plain docker-compose.yml, so deployment is: new Resource → Docker Compose → point it at this repo.

docker compose up -d --build
  • No host port is published. The container only exposes 50052 on the project network, so Traefik reaches it and the internet does not.

  • Plain HTTP means Coolify's generated Traefik labels work unmodified: re-enable "Generate default labels" in Coolify and set the domain on port 50052.

  • For remote/Coolify deployments, set RADIO_MCP_AUTH_TOKEN (Coolify env vars) so the mutating tools require a Bearer token (see HTTP auth above).

  • The image installs runtime deps only (uv sync --frozen --no-dev).

  • The server itself speaks plaintext HTTP. TLS is terminated by Traefik; do not publish port 50052 to the internet directly.

  • /health is the liveness probe (Coolify healthcheck and Docker HEALTHCHECK); it never touches the upstream Radio Browser API, so an upstream outage does not restart a healthy container.

To deploy on Coolify:

  1. Set RADIO_MCP_AUTH_TOKEN in the resource's env vars — without the token the mutating tools are open to anyone who can reach the endpoint.

  2. Re-enable "Generate default labels" and set the domain on port 50052.

Then test:

curl -sf https://<domain>/health

and connect an MCP client to https://<domain>/mcp.

Client configuration

opencode, and any other MCP client supporting remote servers:

{
  "mcp": {
    "radio-browser": {
      "type": "remote",
      "url": "https://radiobrowser-api-mcp.d.imaxim.org/mcp",
      "enabled": true,
      "headers": { "Authorization": "Bearer <token>" }
    }
  }
}

The header is only needed to call the four mutating tools; reads work without it.

Client config (example)

{
  "mcpServers": {
    "radio-now-playing": {
      "command": "uv",
      "args": ["--directory", "/Users/maksym/code/open_code_test", "run", "server.py"]
    }
  }
}

Available Tools

29 tools
add_stationA

Submit a new station to the directory (POST /json/add). Only name + url are required.

Inputs: url (required), name (required), tags, state, +5 more.

find_stations_by_codecA

Find stations by stream codec, e.g. "MP3" (GET /json/stations/bycodec[/exact]/{codec}).

Inputs: value (required), exact, limit, order, +4 more. Returns: result

find_stations_by_countryA

Find stations by country, e.g. "Australia" (GET /json/stations/bycountry[/exact]/{country}).

Inputs: value (required), exact, limit, order, +4 more. Returns: result

find_stations_by_country_codeC

Find stations by ISO 3166-1 country code, e.g. "AU" (GET /json/stations/bycountrycodeexact/{code}).

Inputs: value (required), limit, order, offset, +3 more. Returns: result

find_stations_by_languageC

Find stations by broadcast language, e.g. "english" (GET /json/stations/bylanguage[/exact]/{language}).

Inputs: value (required), exact, limit, order, +4 more. Returns: result

find_stations_by_nameC

Find stations by name (GET /json/stations/byname[/exact]/{name}).

Inputs: value (required), exact, limit, order, +4 more. Returns: result

find_stations_by_stateB

Find stations by state/region (GET /json/stations/bystate[/exact]/{state}).

Inputs: value (required), exact, limit, order, +4 more. Returns: result

find_stations_by_tagB

Find stations by tag/genre, e.g. "chill" (GET /json/stations/bytag[/exact]/{tag}).

Inputs: value (required), exact, limit, order, +4 more. Returns: result

get_directory_statsB

Directory server statistics (GET /json/stats): station counts, checks, clicks, etc.

Inputs: timeout.

get_most_clicked_stationsC

Most-clicked stations (GET /json/stations/topclick/{count}).

Inputs: count, timeout. Returns: result

get_now_playingA

Get the track currently playing on a radio station.

Args:
    station_name: Station name, e.g. "Smooth FM Sydney" or "smooth 95.3".
    timeout: Seconds for directory + stream reads; clamped to 1-60, and
        shared as an overall deadline across all candidates tried.

Returns:
    Dict with artist, title, raw_title, station_matched, country and
    stream_url (track fields null when the station is reachable but
    sending no track titles right now). Raises (as an MCP error) when
    nothing is found.

Inputs: station_name (required), timeout.

get_recently_clicked_stationsC

Most recently clicked stations (GET /json/stations/lastclick/{count}).

Inputs: count, timeout. Returns: result

get_recently_updated_stationsB

Most recently changed/added stations (GET /json/stations/lastchange/{count}).

Inputs: count, timeout. Returns: result

get_station_by_uuidA

Get one station by its stationuuid (GET /json/stations/byuuid/{uuid}).

Inputs: station_uuid (required), timeout.

get_station_check_historyA

Automated stream-check history for a station (GET /json/checks).

Args:
    station_uuid: Station uuid.
    seconds: Only checks newer than this many seconds. The API ignores
        `limit` here (verified live), so use `seconds` to bound the
        response — e.g. 86400 for the last day. Defaults to 0, which
        returns the FULL history (can be thousands of entries).

Inputs: station_uuid (required), seconds, timeout. Returns: result

get_top_voted_stationsC

Highest-voted stations (GET /json/stations/topvote/{count}).

Inputs: count, timeout. Returns: result

list_all_stationsB

List stations in the directory (GET /json/stations). Paginate with offset/limit.

Inputs: limit, order, offset, reverse, +2 more. Returns: result

list_codecsA

Stream codecs with station counts (GET /json/codecs[/{filter}]).

Inputs: filter, timeout. Returns: result

list_countriesC

Countries in the directory with station counts (GET /json/countries).

Inputs: order, reverse, timeout. Returns: result

list_country_codesA

ISO 3166-1 country codes in the directory with station counts (GET /json/countrycodes).

Inputs: timeout. Returns: result

list_directory_serversB

Known directory mirror servers (GET /json/servers).

Inputs: timeout. Returns: result

list_languagesA

Broadcast languages with station counts (GET /json/languages[/{filter}]).

Inputs: filter, timeout. Returns: result

list_statesA

States/regions with station counts (GET /json/states[/{country}]).

Country must be the exact directory name, e.g. "Australia".

Inputs: country, timeout. Returns: result

list_tagsB

Tags/genres with station counts (GET /json/tags[/{filter}]).

Inputs: filter, timeout. Returns: result

register_station_clickA

Register a click (listen) for a station (GET /json/click/{uuid}).

NOTE: increments the station's public click counter. Returns the station record.

Inputs: station_uuid (required), timeout.

resolve_station_stream_urlA

Get the current stream URL for a station (GET /json/url/{uuid}). Also counts as a click.

Inputs: station_uuid (required), timeout.

search_radio_stationsB

Search the Radio Browser directory for stations matching a name.

Args:
    query: Free-text station name, e.g. "smooth sydney".
    limit: Max results; clamped to 1-20.

Returns:
    List of station dicts with name, stream URL, codec, bitrate, country.

Inputs: query (required), limit. Returns: result

vote_for_stationB

Vote for a station (GET /json/vote/{uuid}). NOTE: increments the public vote counter.

Inputs: station_uuid (required), timeout.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 29 tools

    Disambiguation2/5

    Several tools have unclear boundaries: search_radio_stations and find_stations_by_name both search by station name, and advanced_station_search also accepts name plus many other filters. The large family of find_stations_by_* endpoints is largely subsumed by advanced_station_search, creating avoidable overlap.

    Naming Consistency3/5

    Most tools follow readable snake_case verb_noun patterns such as list_*, get_*, and find_stations_by_*. However, search_radio_stations breaks the find_stations_by_name convention, advanced_station_search is not verb-led, and get_now_playing uses a different structure, so consistency is only moderate.

    Tool Count2/5

    29 tools is above the 25+ threshold and makes the server feel heavy. While each endpoint may map to a real API operation, the redundancy between search tools and the large number of near-identical find_stations_by_* tools could be reduced.

    Completeness4/5

    The surface covers the major workflows: searching/listening to stations, getting now-playing info, voting and click tracking, adding stations, and browsing directory statistics and metadata. It lacks update/delete station operations, but those are less central and likely require credentials or admin privileges.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP server that wraps the Radio Browser API to search radio stations, list countries, and discover genres. Enables AI agents to find and browse radio stations without authentication.
      284 npm
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables MCP clients such as Claude, Cursor, and VS Code Copilot to search more than 50,000 internet radio stations by name, genre, country, or language and retrieve their direct stream URLs. It also surfaces the most popular and trending stations along with country and genre listings, with no API key or account required.
      5
      78 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants and autonomous agents to discover, search, and stream internet radio stations worldwide through Radio Browser, with browsing by country, language, genre, or popularity and playback control via MCP.
      Apache 2.0