For AI agents
Use Nostr Relays from your AI assistant
Our MCP server gives Claude, ChatGPT, Cursor and other agents the same live relay data as this site. It is free, read only and needs no API key.
MCP server URL
https://nostr-relays.com/mcp
Streamable HTTP, no sessions, no authentication.
Connect it
Claude Code
Run this in your terminal.
claude mcp add --transport http nostr-relays https://nostr-relays.com/mcp
Claude (web and desktop)
Open Settings, then Connectors, choose Add custom connector and paste this URL.
https://nostr-relays.com/mcp
ChatGPT
Turn on developer mode under Settings, Apps and Connectors, Advanced. Then create a connector with this URL and no authentication.
https://nostr-relays.com/mcp
Cursor
Add this to ~/.cursor/mcp.json, or .cursor/mcp.json in a project.
{
"mcpServers": {
"nostr-relays": {
"url": "https://nostr-relays.com/mcp"
}
}
}VS Code
Add this to .vscode/mcp.json, then start the server from the MCP view.
{
"servers": {
"nostr-relays": {
"type": "http",
"url": "https://nostr-relays.com/mcp"
}
}
}Windsurf
Add this to ~/.codeium/windsurf/mcp_config.json.
{
"mcpServers": {
"nostr-relays": {
"serverUrl": "https://nostr-relays.com/mcp"
}
}
}Clients that only run local servers
Bridge to the remote server with mcp-remote.
{
"mcpServers": {
"nostr-relays": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://nostr-relays.com/mcp"
]
}
}
}What it can do
Every result includes a link to the matching page here, so your assistant can show its sources.
search_relaysSearch the nostr relay directory
- List public nostr relays ranked by how many real profiles use them, with live online status, latency, payment/auth flags and supported NIPs. Filter by text, status and minimum users.
get_relayCheck one nostr relay
- Live status, latency, user count, NIP-11 information document (name, software, supported NIPs, limits, fees) and uptime percentages over 24h, 7d, 30d and 90d for a single relay.
get_relay_usersWho uses a relay
- Indexed nostr profiles that list a relay in their relay list (NIP-65 or kind 3), most followed first.
recommend_relaysRecommend nostr relays
- Curated relay picks from live data. Groups: starter (best free general purpose set), fast (lowest latency), paid (low spam), search (NIP-50), features (most NIPs). Each relay has a 0 to 100 score from reach, latency and NIP support.
lookup_profileLook up a nostr profile and its relays
- Resolve a nostr identity (display name, npub, nprofile, hex pubkey, nostr: URI or NIP-05 like [email protected]) and return the profile plus its read/write relay list with live status. A plain name returns matching profiles to choose from.
find_eventFind which relays hold a nostr event
- Query relays live for one event (note1, nevent1, naddr1, hex id, or a client URL containing one). Reports which relays have it, a signature checked preview, and a censorship resistance score (0 to 100) based on how many independent operators hold a copy. Takes up to about 20 seconds.
build_relay_listBuild a NIP-65 relay list event
- Normalise relay addresses and return an unsigned kind 10002 (NIP-65) event the user can sign with their own client or signer. Never ask for a private key.
Ready made prompts
Clients that support MCP prompts show these as commands.
choose_relaysPick a good set of relays for a new or existing nostr user and produce a NIP-65 list.
audit_my_relaysCheck a nostr profile's relay list for offline, slow or concentrated relays and suggest fixes.
check_note_reachFind which relays hold a nostr event and explain how censorship resistant it is.
Try it with curl
curl -s https://nostr-relays.com/mcp -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"recommend_relays","arguments":{"group":"starter"}}}'Other ways in
- llms.txt: A short plain text guide to the site, its scores and its tools.
- llms-full.txt: The same, plus every relay guide in full.
- MCP server card: Discovery metadata for registries and clients.
- Downloads: The relay directory as txt, JSON, CSV or NIP-65. No JavaScript needed.
- profilestr API: The JSON API behind this site.
The server never asks for a private key. To publish a relay list, the build_relay_list tool returns an unsigned event that you sign in your own nostr client or signer.