Back to Browse

Bray MCP Server

Developer ToolsLow Risk10.0MCP RegistryLocal
Free

Server data from the Official MCP Registry

Trust-aware Nostr for AI agents -- 235 tools covering social, DMs, zaps, trust, and identity

About

Trust-aware Nostr for AI agents -- 235 tools covering social, DMs, zaps, trust, and identity

Security Report

10.0
Low Risk10.0Low Risk

Valid MCP server (2 strong, 0 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry. Trust signals: trusted author (5/5 approved).

4 files analyzed · 1 issue found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

What You'll Need

Set these up before or after installing:

Nostr secret key (nsec, hex, or BIP-39 mnemonic)Required

Environment variable: NOSTR_SECRET_KEY

Comma-separated list of Nostr relay WebSocket URLsOptional

Environment variable: NOSTR_RELAYS

Nostr Wallet Connect URI for Lightning zapsRequired

Environment variable: NWC_URI

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "dev-forgesworn-bray": {
      "env": {
        "NWC_URI": "your-nwc-uri-here",
        "NOSTR_RELAYS": "your-nostr-relays-here",
        "NOSTR_SECRET_KEY": "your-nostr-secret-key-here"
      },
      "args": [
        "-y",
        "nostr-bray"
      ],
      "command": "npx"
    }
  }
}

Documentation

View on GitHub

From the project's GitHub README.

nostr-bray

Trust-aware Nostr MCP for AI and humans. 253 tools across 28 groups. Model-agnostic. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf, or any MCP client.

npm CI licence TypeScript GitHub Sponsors

Quick Start

Install globally or run via npx:

npm install -g nostr-bray

New to Nostr? Mint a key first -- this works before anything is configured and prints your npub plus a 24-word mnemonic (write it down; it is the key):

npx nostr-bray create

Add to your MCP client config:

{
  "mcpServers": {
    "nostr": {
      "command": "npx",
      "args": ["nostr-bray"],
      "env": {
        "NOSTR_SECRET_KEY": "nsec1...",
        "NOSTR_RELAYS": "wss://relay.damus.io,wss://nos.lol"
      }
    }
  }
}

Then ask your AI to call whoami to verify it works.

For production use, prefer Heartwood or any NIP-46 bunker (your key never leaves your signing device):

{
  "mcpServers": {
    "nostr": {
      "command": "npx",
      "args": ["nostr-bray"],
      "env": {
        "BUNKER_URI": "bunker://...",
        "NOSTR_RELAYS": "wss://relay.damus.io,wss://nos.lol"
      }
    }
  }
}

Auth tiers (best to worst)

TierMethodKey exposure
HeartwoodDedicated signing appliance (BUNKER_URI)Key never leaves the signing device. Supports nsec-tree derivation, per-client permissions, and device-backed attestations.
Software bunkerAny NIP-46 bunker (BUNKER_URI)Key held by a separate process. Never seen by bray.
ncryptsecNIP-49 encrypted key (NOSTR_NCRYPTSEC)Key encrypted at rest, decrypted in memory at startup.
Key fileFile path (NOSTR_SECRET_KEY_FILE)Key on disk, read once, env var deleted.
Env varInline secret (NOSTR_SECRET_KEY)Key visible in process environment. Use only for development.

Tool Groups

GroupToolsKey examples
Identity16whoami, identity-derive-persona, identity-switch, identity-prove, nip05-lookup
Social15social-post, social-reply, social-feed, contacts-follow, social-notifications
Direct Messages4dm-send, dm-read, dm-conversation
Trust22trust-attest, trust-ring-prove, trust-spoken-challenge, trust-attest-chain
Dispatch13dispatch-send, dispatch-check, dispatch-reply, dispatch-capability-discover
Relay13relay-query, relay-set, relay-discover, cast-spell, relay-health
Moderation16label-create, list-mute, list-bookmark, list-followset-create, moderation-filter
Marketplace16marketplace-discover, marketplace-call, listing-create, listing-search
Safety14canary-session-create, canary-group-create, canary-duress-signal, safety-activate
Blossom10blossom-upload, blossom-mirror, blossom-verify, blossom-repair
Privacy10privacy-commit, privacy-prove-range, privacy-prove-age, privacy-publish-proof
Zap9zap-send, zap-balance, zap-make-invoice, zap-decode
Vault9vault-create, vault-encrypt, vault-share, vault-rotate
Workflow7trust-score, verify-person, identity-setup, relay-health, feed-discover
Signet7signet-badge, signet-vouch, signet-credentials, signet-challenge
Communities5community-create, community-feed, community-post, community-approve
Badges4badge-create, badge-award, badge-accept, badge-list
Groups (NIP-29)20group-inspect, group-invite-create, group-forum-comment, group-delete
Articles3article-publish, article-read, article-list
Calendar3calendar-create, calendar-read, calendar-rsvp
Wiki3wiki-publish, wiki-read, wiki-list
Search3search-notes, search-profiles, hashtag-feed
Scheduling4post-schedule, post-queue-list, post-queue-cancel, publish-event
Community NIPs2nip-publish, nip-read
Utility20decode, validate-event, verify-event, nip44-encrypt, tombstone
Sync (NIP-77)1sync-plan (pull/push are explicit CLI and SDK operations)
Handler2handler-publish, handler-discover
Catalog2search-actions, execute-action

Use search-actions to find tools by keyword, then execute-action to run them.

Protocol foundations: semantic event validation, NIP-77 reconciliation, and relay-scoped NIP-29 groups.

Dispatch: AI-to-AI Collaboration

Dispatch lets AI agents collaborate over encrypted Nostr DMs. Any MCP-capable client can send structured tasks to other agents and receive results back.

13 message types: send, check, reply, ack, status, cancel, refuse, failure, query, propose, capability-publish, capability-discover, capability-read.

NIP-89 capability discovery: Agents publish what they can do. Other agents discover capabilities by topic, then route tasks to the right collaborator automatically.

dispatch-send("alice", "think", "Analyse the trade-offs of NIP-44 vs NIP-04")
dispatch-check()                    → inbox with pending tasks
dispatch-reply(taskId, result)      → send results back encrypted

All messages are NIP-44 encrypted. Recipients are resolved by name, NIP-05, npub, or hex.

Identity Resolver

Every tool that accepts a recipient uses universal identity resolution. You never need to look up hex pubkeys manually.

Accepted formats:

  • Name -- "alice" (resolved from your dispatch contacts)
  • NIP-05 -- "alice@example.com" (HTTP lookup)
  • npub -- "npub1abc..." (NIP-19 decode)
  • Hex -- "a1b2c3..." (64-character passthrough)

Scheduled Posting

Sign events now, publish later. Events are signed immediately with your current key, then held in a queue until the scheduled time.

post-schedule("Good morning!", "2026-04-01T08:00:00Z")
post-queue-list()          → view pending scheduled posts
post-queue-cancel(id)      → cancel before it publishes

NIP Coverage

nostr-bray implements or integrates the following NIPs:

NIPWhat
NIP-01Events, signing, relay protocol
NIP-02Follow lists
NIP-05DNS identity (lookup, verify, relay hints)
NIP-09Event deletion
NIP-11Relay information
NIP-17Private DMs (gift wrap, default)
NIP-19bech32 encoding (npub, nsec, nprofile, nevent, naddr)
NIP-23Long-form articles (kind 30023)
NIP-22Schema-correct comments for group forums
NIP-29Relay-scoped groups, chat, forums, invitations and administration
NIP-32Labels
NIP-40Expiration tags
NIP-42Relay auth
NIP-44Encrypted payloads v2
NIP-45Event counts
NIP-46Nostr Connect (bunker)
NIP-49Private key encryption (ncryptsec)
NIP-50Search
NIP-51Lists (mute, pin, follow sets, bookmarks)
NIP-52Calendar events
NIP-54Wiki pages
NIP-57Lightning zaps
NIP-58Badges
NIP-65Relay list metadata
NIP-72Communities
NIP-77Negentropy ID reconciliation with truthful REQ fallback
NIP-78Application-specific data
NIP-85Trust rankings
NIP-89Recommended applications (dispatch capability discovery)
NIP-96HTTP file storage (Blossom)
NIP-99Classified listings
NIP-A7Spells (kind 777 — cast saved queries)
NIP-VAVerifiable attestations (kind 31000)

Configuration

Config file (recommended)

Create ~/.config/bray/config.json (or ~/.nostr/bray.json):

{
  "bunkerUriFile": "/Users/you/.nostr/bunker-uri",
  "relays": ["wss://relay.damus.io", "wss://nos.lol"],
  "trustMode": "annotate"
}

Secrets are referenced by file path (bunkerUriFile, secretKeyFile, nwcUriFile) so they never appear in the config itself.

Search order: BRAY_CONFIG env var > $XDG_CONFIG_HOME/bray/config.json > ~/.nostr/bray.json.

Environment variables

VariableDescription
BRAY_CONFIGPath to config file
BUNKER_URINIP-46 bunker URL (safest)
BUNKER_URI_FILEPath to bunker URI file
NOSTR_SECRET_KEYnsec, hex, or BIP-39 mnemonic
NOSTR_SECRET_KEY_FILEPath to secret key file
NOSTR_NCRYPTSECNIP-49 encrypted key
NOSTR_NCRYPTSEC_PASSWORDPassword for ncryptsec
NWC_URI_FILEPath to a private 0600 file containing the NWC bearer URI
NOSTR_RELAYSComma-separated relay URLs
TOR_PROXYSOCKS5h proxy for Tor
NIP04_ENABLEDSet 1 to enable legacy NIP-04 DMs
TRANSPORTstdio (default) or http
PORTHTTP port (default 3000)

All secret env vars are deleted from process.env before parsing can fail. Raw NWC_URI is refused; use NWC_URI_FILE or wallet connect <nwc-file> so the bearer credential never appears in a process environment, command argument or MCP tool argument.

CLI

npx nostr-bray whoami                    # show your npub
npx nostr-bray post "hello from bray!"   # publish a note
npx nostr-bray persona work              # derive a work persona
npx nostr-bray prove blind               # create a linkage proof
npx nostr-bray --help                    # see all commands

Documentation

  • Usage Guide -- walkthroughs for identity, DMs, attestations, payments, and duress
  • Examples -- MCP config files and CLI workflow scripts
  • Contributing -- setup, architecture, testing, and conventions

For AI Assistants

See llms.txt for a concise summary optimised for AI context windows, or llms-full.txt for complete tool documentation with parameter details.

Part of the ForgeSworn Toolkit

ForgeSworn builds open-source cryptographic identity, payments, and coordination tools for Nostr.

LibraryWhat it does
nsec-treeDeterministic sub-identity derivation
ring-sigSAG/LSAG ring signatures on secp256k1
range-proofPedersen commitment range proofs
canary-kitCoercion-resistant spoken verification
spoken-tokenHuman-speakable verification tokens
toll-boothL402 payment middleware
geohash-kitGeohash toolkit with polygon coverage
nostr-attestationsNIP-VA verifiable attestations
dominionEpoch-based encrypted access control
nostr-veilPrivacy-preserving Web of Trust

Licence

MIT

Reviews

No reviews yet

Be the first to review this server!