Skip to main content
Glama

Lightning FM :: MCP 服务器

一个用于 Lightning FM 音乐目录的 MCP 服务器——供智能体搜索曲目、查找艺术家,并查看电台正在播放的内容。

没有单独的智能体 API。此服务器读取的正是人类客户端所读取的内容:来自公共 Nostr 中继的 kind 31337 曲目事件和 kind 0 个人资料、来自公共 Blossom 服务器的音频和图片,以及电台在每次曲目切换时发布的 kind 30311 实时活动事件。每首曲目都由艺术家自己的密钥签名——这是权威目录,而非平台为智能体维护的精选子集。

使用

将其添加到你的 MCP 客户端的服务器配置中。对于 Claude Code 或 Claude Desktop:

{
  "mcpServers": {
    "lightning-fm": {
      "command": "npx",
      "args": ["-y", "lightning-fm-mcp"]
    }
  }
}

无需安装、无需 API 密钥、无需账户。默认情况下,它会与 relay.lightning.fmmedia.lightning.fm 通信——如需指向其他位置,请参阅 配置

工具

  • search_catalog — 对整个目录进行自由文本搜索,并支持流派/标签筛选。将所有筛选条件留空即可按最新优先浏览。

  • get_artist — 按显示名称(部分匹配)、十六进制公钥或 npub 查找艺术家。返回其个人资料和完整唱片目录。

  • get_now_playing — 当前正在播出的内容,以及流媒体 URL。

配置

所有环境变量都是可选的——默认值指向生产环境。这里没有任何秘密;此服务器是只读的,从不签名或发布任何内容。

变量

默认值

作用

LFM_NOSTR_RELAYS

wss://relay.lightning.fm

要查询的逗号分隔的中继 URL。只有当某个中继像 relay.lightning.fm 那样限制写入时,才应在此添加——kind 31337 并非 Lightning FM 独有,不受限制的公共中继也会返回其他应用的所有曲目。

LFM_BLOSSOM_URL

https://media.lightning.fm

音频/图片哈希将针对 Blossom 服务器进行解析。

LFM_CACHE_TTL_MS

60000

已获取的快照在下次工具调用重新查询中继之前会被复用多长时间。

开发

npm install
npm run dev     # runs src/index.ts directly via tsx
npm run build   # tsc -> dist/

src/nostr/track.tsstation-server/src/catalog/track.tsapp-desktop/src-tauri/src/relay.rs 中的 kind 31337 解析保持一致。三者必须就标签名称达成一致——这是平台的公共线上格式,完整文档见 lightning.fm/interop

许可证

MIT

-
license - not tested
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Lightning-FM/lightning-fm-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server