
Internet Radio
io.github.AlonDrilichv1.0.2更新於 Oct 6, 2026
Search internet radio stations, stream URLs, top stations, countries and genres (Radio Browser).
概覽
讓助理搜尋全球網路電台並取得其串流網址,還能查詢熱門電台、國家與類型。
- 功能
- 透過公開的 Radio Browser 目錄提供五個唯讀工具:依名稱、類型標籤、國家代碼或語言搜尋電台的 search_stations;依電台 ID 查詢的 get_station;依票數、點播數或趨勢排序的 top_stations;list_countries;以及 list_genres。每筆結果包含一行摘要、JSON 資料與結構化內容,並提供電台本身的 stream_url 以及可在 72FM 網頁播放的 listen_url。find_radio 提示詞可把心情、地點或活動轉成電台建議。
- 適用情境
- 適合讓助理依類型、國家或語言尋找電台、查詢某個電台的串流網址,或了解目前熱門與趨勢電台。適用於收聽建議與目錄查詢,而不是在助理內直接播放。
- 執行需求
- 需要 Node.js 20 或更新版本,透過 npx 從 GitHub 以 stdio 方式啟動,或使用已發布的 Docker 容器映像。不需要 API 金鑰或帳號。需要連線至 Radio Browser 鏡像的網路;選用環境變數 RADIO_BROWSER_MIRRORS 與 RADIO_BROWSER_TIMEOUT_MS 可覆寫預設設定。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Internet Radio,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
internet-radio-mcp
An open-source Model Context Protocol (MCP) server for internet radio. It lets Claude, Cursor, VS Code Copilot and other MCP clients search radio stations worldwide and get their direct stream URLs. It also lists top and trending stations, countries and genres.
The station data comes from Radio Browser, a community-maintained, public-domain directory with over 50,000 stations that have working streams. The server is built by 72FM, a free web radio player built on the same directory. Every result includes a listen_url that plays the station in the browser on 72FM, as well as the station's own stream_url.
Stations belong to their broadcasters. Neither 72FM nor this server owns, operates or curates them. Anyone can add or edit entries in the directory, so a stream can occasionally be offline.
- No API key, no account, read-only.
- 5 tools, 1 prompt, stdio transport.
- Runtime dependencies:
@modelcontextprotocol/server(the official MCP TypeScript SDK, v2) andzod.
Example questions
- "Find jazz stations in Brazil"
- "What are the most popular stations in Japan?"
- "Give me the stream URL for BBC World Service"
- "What's trending on internet radio right now?"
- "Which countries have the most radio stations?"
- "What genres can I search for? Then find me some lofi stations."
Install
Requires Node.js 20 or newer. The server runs straight from GitHub with npx, so there is nothing to install globally.
Claude Code
Then run /mcp in a session to confirm that internet-radio is connected.
Claude Desktop
Open Settings → Developer → Edit Config. This opens claude_desktop_config.json: on macOS it is at ~/Library/Application Support/Claude/claude_desktop_config.json, and on Windows at %APPDATA%\Claude\claude_desktop_config.json. Add:
Restart Claude Desktop.
Cursor
Add the server to ~/.cursor/mcp.json to use it everywhere, or to .cursor/mcp.json to use it in one project:
VS Code (GitHub Copilot, Agent mode)
Add the server to .vscode/mcp.json, or run MCP: Add Server from the Command Palette:
Other clients
Any MCP client that can launch a stdio server can use the same command: npx -y github:AlonDrilich/internet-radio-mcp.
The first launch downloads the package from GitHub, which takes a few seconds. Later launches use the npx cache.
Docker
The same server is published as a container image, and is listed in the official MCP Registry as io.github.AlonDrilich/internet-radio-mcp:
In a client config, use "command": "docker" with "args": ["run", "-i", "--rm", "ghcr.io/alondrilich/internet-radio-mcp:latest"].
Tools
All tools are read-only and annotated with readOnlyHint: true and openWorldHint: true. Each result contains:
- a one-line summary,
- the same data as JSON text,
structuredContentthat matches the tool'soutputSchema.
Broken streams (streams that failed the directory's last automated check) are excluded from searches.
Station fields
stream_urlis the directory's resolved stream URL, or the original URL when no resolved one exists.listen_urlplays the station in the browser on 72FM.tagsholds up to 8 tags.
Prompt
find_radio(request) finds stations for a mood, place, activity or genre, for example "calm jazz for a rainy evening" or "radio from Lisbon".
Untrusted data
Station names, tags, languages, countries and URLs come from a public directory that anyone can edit, and the server hands them to an AI assistant. The server therefore treats every field as untrusted input:
- Text is reduced to a single line: line breaks and control characters become spaces; zero-width characters, bidirectional controls, private-use code points, the invisible Unicode "tag" characters and every other invisible "default-ignorable" code point (variation selectors, fillers, joiners) are removed, except the emoji selector and the zero-width joiners that real text needs, which survive only in runs of at most two; names are cut at 120 characters, tags at 40, other fields at 60.
- URLs (
stream_url,homepage,favicon) must be plainhttporhttpswritten out in full, without credentials or backslashes, and are returned in their parsed canonical form; anything else (javascript:,data:,file:,https:host, a bare word) is dropped, and a station with no valid id or no playable stream is left out of the results. bitrateis converted when a station reports bits per second, and dropped when it is implausible; the directory's own bitrate sort is not offered because it ranks those entries first.- Every result and the server instructions say that these fields are data, not instructions.
- Replies are capped at 5 MB, must be a JSON list, and a mirror that redirects or answers with something else counts as failed.
This reduces the risk of indirect prompt injection; it cannot remove it. A station can still be called "Ignore previous instructions", and that text will be shown, as one capped line, like any other name. Treat results as untrusted when you build on them.
Reliability
The server queries the Radio Browser mirrors in this order, with an 8-second timeout for each:
de1.api.radio-browser.infode2.api.radio-browser.infoall.api.radio-browser.info
If all three fail, the tool returns a clear error (isError: true) and the server keeps running. Requests identify themselves with User-Agent: internet-radio-mcp/1.0 (+https://72fm.com).
You can change this behavior with two optional environment variables:
RADIO_BROWSER_MIRRORS: comma-separated base URLs to use instead of the defaults. OnlyhttpsURLs without credentials are accepted (plainhttponly forlocalhost,127.0.0.1or[::1], for testing); anything else is ignored with a warning on stderr. Redirects are never followed.RADIO_BROWSER_TIMEOUT_MS: the timeout for each mirror, in milliseconds: a whole number from 100 to 60000 (default8000).
Development
The source is plain ES modules with JSDoc types (src/), so there is no build step. That is why npx github:… works without an npm publish.
Related
- radio-playlists: weekly M3U playlists by country and genre from the same directory (browse online).
- radio-player-72fm: WordPress plugin for putting a station's player on a site.
- All 72FM tools: 72fm.com/developers.
Data and credits
- The station directory data comes from Radio Browser and is in the public domain. Thanks to its maintainers and contributors. If you use this server heavily, please consider supporting Radio Browser.
- Streams, names and logos belong to their respective broadcasters.
- 72FM is a free web radio player built on the Radio Browser directory.
License
MIT © Alon Drilich (72FM)
來源:README.md,提交 2a508b3
工具
0版本歷史
1- v1.0.2最新Oct 6, 2026

