Trust-aware Nostr MCP server for AI agents and humans. Verification, proximity, and access woven into every interaction.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add bray --env NOSTR_SECRET_KEY='<NOSTR_SECRET_KEY>' --env NOSTR_RELAYS='<NOSTR_RELAYS>' --env NWC_URI='<NWC_URI>' -- npx -y nostr-bray~/.codex/config.toml
[mcp_servers.bray]
command = "npx"
args = ["-y", "nostr-bray"]
env = { NOSTR_SECRET_KEY = "<NOSTR_SECRET_KEY>", NOSTR_RELAYS = "<NOSTR_RELAYS>", NWC_URI = "<NWC_URI>" }
# codex mcp add bray --env NOSTR_SECRET_KEY='<NOSTR_SECRET_KEY>' --env NOSTR_RELAYS='<NOSTR_RELAYS>' --env NWC_URI='<NWC_URI>' -- npx -y nostr-bray~/.cursor/mcp.json
{
"mcpServers": {
"bray": {
"command": "npx",
"args": [
"-y",
"nostr-bray"
],
"env": {
"NOSTR_SECRET_KEY": "<NOSTR_SECRET_KEY>",
"NOSTR_RELAYS": "<NOSTR_RELAYS>",
"NWC_URI": "<NWC_URI>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"bray": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"nostr-bray"
],
"env": {
"NOSTR_SECRET_KEY": "<NOSTR_SECRET_KEY>",
"NOSTR_RELAYS": "<NOSTR_RELAYS>",
"NWC_URI": "<NWC_URI>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"bray": {
"command": "npx",
"args": [
"-y",
"nostr-bray"
],
"env": {
"NOSTR_SECRET_KEY": "<NOSTR_SECRET_KEY>",
"NOSTR_RELAYS": "<NOSTR_RELAYS>",
"NWC_URI": "<NWC_URI>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"bray": {
"command": "npx",
"args": [
"-y",
"nostr-bray"
],
"env": {
"NOSTR_SECRET_KEY": "<NOSTR_SECRET_KEY>",
"NOSTR_RELAYS": "<NOSTR_RELAYS>",
"NWC_URI": "<NWC_URI>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"bray": {
"command": "npx",
"args": [
"-y",
"nostr-bray"
],
"env": {
"NOSTR_SECRET_KEY": "<NOSTR_SECRET_KEY>",
"NOSTR_RELAYS": "<NOSTR_RELAYS>",
"NWC_URI": "<NWC_URI>"
}
}
}
}Environment variables
NOSTR_SECRET_KEYNOSTR_RELAYSNWC_URI
Replace the placeholders with your own credentials and keep them out of version control.