Skip to main content
Glama
kotty-radio-mcp
by garrapato

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
WEB_APINoPublica la API web en /api/v1.false
HTTP_HOSTNoDirección de escucha del servidor HTTP/WS.127.0.0.1
HTTP_PORTNoPuerto HTTP/WS; 0 usa un puerto aleatorio.8787
LOG_LEVELNoNivel de log: fatal…trace o silent; siempre a stderr.info
FFMPEG_PATHNoRuta del binario de ffmpeg.ffmpeg
SESSION_TTLNoVida de una sesión sin oyentes en segundos; con oyentes conectados no caduca.7200
MAX_SESSIONSNoSesiones de reproducción simultáneas.50
MCP_TRANSPORTNoTransporte MCP: stdio o http.stdio
RB_TIMEOUT_MSNoTimeout de la API de radio-browser.5000
RB_USER_AGENTNoUser-Agent hacia radio-browser y las emisoras.kotty-radio-mcp/0.1.0 (+…)
WS_MAX_BUFFERNoBytes pendientes por cliente antes de descartar audio.1048576
DEFAULT_FORMATNoFormato si play_station no indica uno.passthrough
MCP_AUTH_TOKENNoToken Bearer de /mcp; obligatorio en modo http fuera de loopback.
WEB_RATE_LIMITNoPeticiones por minuto e IP a la API web.120
ALLOWED_ORIGINSNoOrígenes de navegador permitidos para WS y /mcp, separados por comas.http://localhost:5173
PUBLIC_BASE_URLNoBase ws(s):// con la que se construyen las wsUrl.ws://localhost:8787
WEB_TRUST_PROXYNoToma la IP del cliente de X-Real-IP, detrás de nginx.false
MCP_ALLOWED_HOSTSNoSi se define, únicos nombres de Host (además de loopback) que acepta /mcp.
WEB_ALLOWED_ORIGINSNoOrígenes CORS que pueden usar la API web, separados por comas.
WEB_PLAY_RATE_LIMITNoSesiones nuevas por minuto e IP.10
MAX_CLIENTS_PER_SESSIONNoClientes WS por sesión.5
WEB_SESSIONS_PER_CLIENTNoSesiones abiertas por IP; al crear otra se cierra la más antigua.2

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Internet radio search and playback via radio-browser.info. Use get_random_stations for "surprise me"/no preference, recommend_stations for vague or descriptive requests (style, mood, artist: translate artists into genre/country/decade hints), search_stations for explicit filters, and list_tags/list_countries/list_languages to map the user's words to real values. To listen, call play_station and give its wsUrl to the player; now_playing gives the current song and stop_stream ends playback. Station ids are radio-browser stationuuids; never invent them. See the "play-music" prompt for the full flow.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_stationsA

Search internet radio stations on radio-browser.info with EXPLICIT filters (name, tags, country, language, codec, bitrate). Use this when the user names a station or gives concrete filters. For vague requests ("something like Soda Stereo", "music to study") use recommend_stations instead; for "surprise me" use get_random_stations. Returns compact station objects; pass a station "id" to play_station to listen.

get_random_stationsA

Get random, currently working internet radio stations, optionally filtered by tags, country or language. Use when the user says "surprise me", "play something", "anything" or gives no real preference. Offer up to 3 of them to the user, then call play_station with the chosen "id".

recommend_stationsA

Recommend internet radio stations that fit a free-form music request ("jazz francés tranquilo", "something like Soda Stereo", "music to study"). radio-browser has NO artist or album search, so BEFORE calling, translate any artist/album/song into hints: genres (radio-browser tags), countryCodes, languages, decade and moods. E.g. "algo como Soda Stereo" -> hints {genres:["rock en español","rock"], countryCodes:["AR"], languages:["spanish"], decade:"80s", artist:"Soda Stereo"}. Always pass the original prompt too; the server also parses it as a fallback. Returns ranked stations with matchReason and confidence (0–1): if the top confidence is high (≥0.8) you may play the first one directly with play_station, otherwise offer up to 3 options. If the user just wants anything, prefer get_random_stations.

get_stationA

Get the details of one radio station by its "id" (stationuuid), including whether it passed the last health check and its click trend.

list_tagsA

List radio-browser genre/style tags with how many working stations use each, most used first. Use it to map the user's words to real tags before searching (e.g. filter "rock" -> "rock en español", "classic rock").

list_countriesA

List countries (English name + ISO 3166-1 alpha-2 code) with their station counts. Filter matches the English country name, e.g. "argen" -> Argentina (AR).

list_languagesA

List station languages as radio-browser names them (lowercase English, e.g. "spanish", "french") with station counts. Use these names for the "language" filter of other tools.

list_codecsA

List audio codecs used by stations (MP3, AAC, OGG…) with station counts.

vote_stationA

Upvote a station on radio-browser.info (public, community-visible). ONLY call this when the user explicitly asks to vote for / like the station. radio-browser allows one vote per station per IP every few minutes; ok=false with a message means it was not counted.

play_stationA

Start streaming a radio station (by "id" from the search/recommend tools) and return a WebSocket URL (wsUrl) the client player connects to. The server does not play audio itself: hand wsUrl to the player. Binary WS frames carry the audio; JSON text frames carry {type:"ready"|"metadata"|"reconnecting"|"error"|"ended"}. format: "passthrough" (original codec, default) or "mp3"/"opus"/"pcm16" (48 kHz stereo)/"pcm16_24k_mono" (transcoded, need ffmpeg). Use now_playing for the current song and stop_stream when done.

stop_streamA

Stop a playback session started with play_station: connected players receive {type:"ended"} and are disconnected, and the wsUrl stops working.

now_playingA

Current song of a playback session, from the station's ICY metadata (StreamTitle, usually "Artist - Title"). title is null if the station sends no metadata or no player is connected yet (the stream only starts when a player connects to wsUrl).

Prompts

Interactive templates invoked by user choice

NameDescription
play-musicGuide the assistant to find and play an internet radio station for a request.

Resources

Contextual data attached and managed by the client

NameDescription
top-tagsThe 100 most used genre/style tags with station counts.
countriesAll countries with stations: English name, ISO 3166-1 alpha-2 code and station count.
languagesThe 100 most common station languages (names to use in "language" filters).

TDQS

A4.1/5.0

Scored across 12 tools

Disambiguation4/5

The three discovery tools (search_stations, get_random_stations, recommend_stations) share a surface but their descriptions give explicit routing rules (explicit filters vs. 'surprise me' vs. free-form/artist prompts), which largely resolves the overlap. The list_* facet tools and the play/stop/now_playing trio are clearly distinct. Only residual risk is an agent picking recommend vs. random for a vague query.

Naming Consistency4/5

Almost everything follows a snake_case verb_noun pattern (get_station, list_tags, vote_station, play_station, search_stations, recommend_stations). The single deviation is now_playing, which is a state-noun rather than a verb phrase, and 'get_random_stations' uses a different verb than 'recommend_stations' for a similar read operation.

Tool Count5/5

Twelve tools is well within the sweet spot and every tool maps to a real step in the radio workflow: browse facets, discover, play, inspect, stop, vote. No tool feels redundant padding.

Completeness4/5

The lifecycle is essentially covered: enumerate facets, search/random/recommend, get details, stream, poll now_playing, stop, and a community vote. Minor gaps: no station-id-based 'similar stations' lookup, no batch detail fetch for result sets, and no stream-health/retry surface beyond the error frame, but agents can work around these.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues