Learn · Agent access
Can an AI agent search Lightning FM's catalog?
Yes, and two different ways, neither of which needs a key, an account, or anyone's permission. Query the public relay directly, or run the MCP server. The second is a convenience over the first, not a gate in front of it.
Every track is a signed Nostr event on an open-read relay. No package, no dependency on us:
# no package required: ask the relay yourself
nak req -k 31337 -l 20 wss://relay.lightning.fmKind 31337 is a track, kind 0 is an artist profile, kind 30402 is a sale listing, kind 30311 is what the station is playing. The full tag contract is on the interop page[4]. Audio is content-addressed on a standard Blossom server, so a file can be verified by its hash and mirrored anywhere.
If your agent speaks MCP, add this to its server config:
{
"mcpServers": {
"lightning-fm": {
"command": "npx",
"args": ["-y", "lightning-fm-mcp"]
}
}
}search_catalog free-text search over titles, artists, albums and descriptions, plus genre and tag filters. Leave the filters empty to browse.
get_artist look up an artist by display name, hex pubkey, or npub, and get their profile plus full discography.
get_now_playing what is on air right now, and the stream URL.
Published on npm[1], listed in the official MCP registry[2], MIT source on GitHub[3]. It runs locally on your machine and talks to the public relay itself, so there is no Lightning FM server in the middle of your queries and nothing for us to meter or log.
It is read-only. It cannot sign events, publish a track, or spend a satoshi. An agent can find music and read what it costs; actually paying stays a human-held decision, because the alternative is a tool that either custodies funds or holds a spending key. Purchases settle from a buyer's wallet to the artist's own wallet, and nothing about agent access changes that.
A private agent endpoint would be a second source of truth that only we control, which is the exact dependency exit rights are meant to rule out. Agents read the same artist-signed events from the same open relay as a human's music player. If Lightning FM vanished tomorrow, both the catalog and the way you reach it would keep working. That would not be true of an endpoint we could switch off.
Do I need an API key or an account?
No. There is no key, no signup, and no rate-limit tier. The catalog lives on a public Nostr relay with open reads, so any client, script, or agent can query it directly. The MCP server is a convenience wrapper over that same public data, not a gate in front of it.
What can the MCP server actually do?
Three tools: search_catalog (free-text search plus genre and tag filters, or browse everything newest-first), get_artist (look up an artist by display name, hex pubkey, or npub, and get their full discography), and get_now_playing (what is currently on air on the station, and the stream URL). It is read-only. It never signs, publishes, or spends anything.
Can an agent buy music through it?
No, deliberately. The MCP server cannot spend money. Purchases settle from a buyer's Lightning wallet to the artist's own wallet, and putting that behind an agent tool would mean either custodying funds or holding a spending key, both of which the platform is built to avoid. An agent can discover a track and read its price; paying is a separate, human-held decision.
Why is there no dedicated agent API?
Because a separate agent API would be a second source of truth we control, and that is the thing this platform is trying not to be. Agents read the same signed events from the same relay as a human's music player. If Lightning FM disappeared, the catalog and the access method would both still work, which would not be true of a proprietary endpoint.
How big is the catalog?
Small and honest about it. Lightning FM is in early beta and onboarding its first artists, so an agent querying today will find a short catalog. The access path is complete and stable regardless of how many tracks sit behind it, and it does not change as the catalog grows.
Facts change. Every claim above links to its source as of the date shown. Check the source, and if we're out of date, tell us and we'll fix it.
Or read the full wire format if you are building against the catalog.