Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/sandwichfarm/nostr-watch/llms.txt

Use this file to discover all available pages before exploring further.

nostr-watch is a TypeScript monorepo implementing NIP-66 — the relay monitoring protocol for the Nostr network. It provides libraries for checking relay health, aggregating monitor data, and auditing NIP conformance, plus production-ready services for running your own relay monitors and consuming relay intelligence via REST or MCP.

Quickstart

Install the core libraries and run your first relay health check in minutes.

Architecture

Understand the three-layer monorepo structure and how packages relate.

nocap — Relay Checks

Pluggable adapter framework for WebSocket, DNS, SSL, geo, and NIP-11 checks.

route66 — Aggregation

Aggregate NIP-66 monitor data and query relay state across the network.

What you can build

nostr-watch powers relay discovery, health monitoring, and network intelligence for Nostr applications. Whether you’re building a relay picker, a monitoring dashboard, or an AI agent that needs relay data, the stack has you covered.

Relay health checks

Check WebSocket connectivity, DNS, TLS, NIP-11, and geolocation for any relay.

NIP conformance testing

Audit relays against NIP-01, NIP-42, NIP-50, and more with the Auditor library.

Monitor relay networks

Run relaymon to continuously monitor relays and publish NIP-66 events.

REST API

Query aggregated relay intelligence via standard HTTP endpoints.

MCP over Nostr

21 structured MCP tools for AI agents to query relay data over Nostr.

Raw NIP-66 events

Subscribe directly to NIP-66 events for trustless, decentralized data.

Get started

1

Install the libraries

Add @nostrwatch/nocap and @nostrwatch/route66 to your project via npm or pnpm.
2

Run your first relay check

Use the Nocap class with default adapters to check a relay’s WebSocket, DNS, and SSL status.
3

Aggregate NIP-66 data

Connect Route66 to a cache and WebSocket adapter to query live relay state from the network.
4

Deploy a monitor (optional)

Run relaymon via Docker to publish NIP-66 events and contribute to the monitoring network.
nostr-watch is an OpenSats grant recipient. All packages are MIT licensed and in active alpha development.

Build docs developers (and LLMs) love