Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
NOSTR_RELAYSYesComma-separated wss:// relays. Server refuses to start if empty.
NOSTR_LOG_PATHNoServer log path../nostr-mcp.log
NOSTR_NIP46_URINoNIP-46 bunker URI (recommended signer). Provide AT MOST ONE of NOSTR_NIP46_URI or NOSTR_PRIVATE_KEY.
NOSTR_READ_ONLYNoForce read-only — disables all write tools.false
NOSTR_AUDIT_PATHNoStructured audit log path../nostr-mcp-audit.log
NOSTR_PRIVATE_KEYNoRaw nsec1... private key (dev/legacy only). Provide AT MOST ONE of NOSTR_NIP46_URI or NOSTR_PRIVATE_KEY.
NOSTR_DM_ALLOWLISTNoHex pubkeys allowed as DM recipients. Empty = NOSTR_DM_TOOLS_ENABLED alone gates.
NOSTR_ALLOWED_KINDSYesComma-separated event-kind numbers the server may sign. Required when a signer is configured.
NOSTR_REQUIRE_CONFIRMNoTwo-step confirm: write tools return a token, nostr_confirm_publish executes.false
NOSTR_DM_TOOLS_ENABLEDNoOpt-in for DM tools (send_dm, list_dms, decrypt_dm).false
NOSTR_ALLOW_NSEC_DECODENoAllow nostr_decode to return raw private key material.false
NOSTR_MAX_DMS_PER_MINUTENoRolling 60s rate limit on DMs.5
NOSTR_MAX_EVENTS_PER_MINUTENoRolling 60s rate limit on writes.10

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
nostr_get_pubkeyA

Return the configured signer's public key as hex + npub. Errors clearly if no signer is configured (server is in read-only mode). For NIP-46 signers, this blocks until the bunker handshake completes.

nostr_list_relaysA

List the configured relay pool with each relay's current connection status.

nostr_decodeA

Decode a NIP-19 bech32-encoded identifier (npub / nsec / note / nevent / naddr / nprofile) into its raw fields. Local-only — no network call. Refuses nsec unless NOSTR_ALLOW_NSEC_DECODE=true; guards against accidentally surfacing a private key in tool output.

nostr_encodeA

Encode a raw NIP-19 record (npub / note / nevent / naddr / nprofile) into its bech32 form. Local-only — no network call. Does NOT support nsec encoding (private keys must not transit the agent).

nostr_query_eventsA

Query events from the configured relay pool using NIP-01 filters. Supports kinds, authors, since/until/limit, and tag filters (#e, #p, #d, #t). Returns an array of events as plain objects (id, kind, pubkey, created_at, content, tags, sig). The workhorse read tool.

nostr_get_profileA

Fetch and parse a NOSTR profile (kind:0 metadata) for the given pubkey or npub. Convenience wrapper over nostr_query_events with kinds=[0], limit=1. Returns the parsed JSON content (name, about, picture, nip05, lud16, etc.) plus the source event id and timestamp. Returns profile: null if no kind:0 event was found for that pubkey on the configured relay pool.

nostr_verify_nip05A

Verify a NIP-05 identifier resolves to the expected pubkey. Fetches https://{domain}/.well-known/nostr.json?name={name} and looks up names[name]. If expected_pubkey is provided, returns verified=true only if the resolved pubkey matches; otherwise returns verified=true on any successful resolution + the resolved pubkey. Also surfaces the recipient's relay hints if the well-known doc advertises them (NIP-65 outbox path).

nostr_publish_eventA

Sign and broadcast a raw NOSTR event of any allowed kind. The primitive write tool — other publish_* tools are convenience wrappers around this. Runs the full safety pipeline: read-only gate, signer presence, kind allowlist, rate limit, optional two-step confirmation.

nostr_publish_text_noteA

Convenience wrapper for publishing a kind:1 text note. Builds the e / p / t tags from the structured inputs (replies, mentions, hashtags) so the agent doesn't have to assemble them. Requires kind 1 to be in NOSTR_ALLOWED_KINDS.

nostr_publish_metadataA

Publish a kind:0 profile metadata event. Always demands two-step confirmation (regardless of NOSTR_REQUIRE_CONFIRM) because it overwrites your public profile and is hard to reason about safely from an LLM context. Requires kind 0 to be in NOSTR_ALLOWED_KINDS — explicitly opt in.

nostr_publish_addressable_eventA

Publish a parameterized-replaceable / addressable event (kind 30000–39999). The marketplace MCP's load-bearing bridge — NIP-15 stalls (kind 30017) and products (kind 30018) flow through this. Sets the d tag automatically from the d_tag input. Republishing with the same (kind, pubkey, d_tag) replaces the prior version on relays that honor replaceability.

nostr_delete_eventA

Publish a NIP-09 kind:5 deletion request for a previously-published event. Soft delete — relays may or may not honor it, and copies on relays you didn't reach stay. Requires kind 5 to be in NOSTR_ALLOWED_KINDS.

nostr_confirm_publishA

Execute a previously-prepared signed publish, identified by its one-time token. Only meaningful when NOSTR_REQUIRE_CONFIRM=true, or when called after publish_metadata (which always confirms). Token is consumed (single-use); the safety pipeline (read-only, signer, kind allowlist, rate limit, dm allowlist) re-runs before signing. Dispatches to the right execute path based on which tool issued the token (publish_event variants OR send_dm).

nostr_send_dmA

Encrypt + send a NIP-04 (kind:4) direct message. Defaults to NIP-44 encryption (current standard); pass version="nip04" only for legacy compatibility. Gated by NOSTR_DM_TOOLS_ENABLED + NOSTR_DM_ALLOWLIST + rate limit. For modern sealed DMs (NIP-17) wait for the next version.

nostr_list_dmsA

Fetch + decrypt the DM thread between the configured signer and a counterparty. Pulls kind:4 events in both directions (sent and received), decrypts each via the signer's encrypt/decrypt interface (auto-selects NIP-44 or NIP-04 based on the ciphertext), and returns the thread sorted oldest-first. Decryption failures are surfaced per-event instead of failing the whole call.

nostr_decrypt_dmA

Decrypt a single DM ciphertext using the signer's encrypt/decrypt interface. Useful when you already have a kind:4 event from elsewhere (e.g., nostr_query_events) and just need the plaintext. Auto-detects NIP-44 vs NIP-04 by default. Same NOSTR_DM_TOOLS_ENABLED gate as send/list — reading plaintext is still a confidentiality surface.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/llmops-pro/nostr-ops-mcp'

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