Skip to main content
Protocols

What Is Nostr? A Plain Guide for Bitcoin Services

By Sats4AI · · 8 min read

Nostr is an open protocol for signed messages. Anyone can publish and anyone can read, with no account and no company in the middle. Bitcoin lets anyone pay without asking permission. Nostr lets anyone be found without asking permission.

NostrLightningL402ContextVMNo Account

This guide explains what Nostr is and what it can do for a Bitcoin service. It uses our own service, Sats4AI, as a working example. We run a set of AI tools that a human or an agent pays for one call at a time over Lightning. No account.

Why We Bother

We see very little activity from our Nostr work so far. That is not why we do it.

We are a Bitcoin company. We believe in open, decentralized and censorship-resistant technology, so we want to use it, test it and repair it in public. An open network gets better when people use it and report what breaks. We think that is good for us, and good for the Bitcoin community.

Nostr alone does not make a service censorship-proof: our API still runs on one server. But it takes gatekeepers out of discovery, and it can take them out of access. That is the part we want to help build, with real use and honest notes.

What Is Nostr? The Short Answer

Nostr stands for Notes and Other Stuff Transmitted by Relays. It has three parts.

A key is your identity

You make a key pair. The public half is your name. You sign every message with the private half. No company gives you an account, and no company can take it away.

Relays store and pass on messages

A relay is a simple server, and anyone can run one. You send a signed message to several relays. Readers ask several relays for it.

Clients show what they find

Different apps read the same messages and show them in different ways.

Every message is signed, so a relay cannot forge one. If one relay drops your message, another can still hold it. No single company owns the network.

What Can You Build With Nostr?

Social feeds came first. But a signed message can carry almost anything. People publish long articles. They list goods for sale. They send encrypted private messages. They send small Lightning tips, called zaps. They host whole static websites on relays. And now they let AI agents find tools and call them. The building blocks are public. They are called NIPs.

Why Nostr Fits a Bitcoin Service

Paying is only half of a purchase. First the buyer must find the seller. Today that usually means a search engine, an app store or a directory. Each one is a gatekeeper that can change the rules.

Lightning pays. Nostr finds. Neither needs an account, and neither has a gatekeeper. A Bitcoin service that lists itself on Nostr can be found by anyone's software and paid by anyone's wallet. Nobody has to ask permission, on either side.

How Sats4AI Uses Nostr Today

One rule first. Payment never goes through Nostr. A call is paid with a Lightning invoice that our own server creates and checks. Nostr carries discovery. We keep no customer keys, and we never use a public key to identify a customer.

One key signs everything we publish: npub1wk3gphw9vryhak6hvaeqd94lec7zvaarh3q4wj5wwl2wt8hvq63qrgpqyc. We sign and publish with the open-source library nostr-tools.

A capability event for each tool (kind 38400)

There are 41. Each one gives the name, the endpoint and how to pay. An agent can find a tool on a relay without knowing our domain.

A readable catalog (kind 30023)

The same list as an article, for people and for clients that show long-form posts.

A service listing (kind 31402)

One listing for the whole service, in the shape that L402 directories read. L402 is the standard that lets a client pay for an API call with Lightning (specification on GitHub). The listing shows a price only where a tool has one fixed price per call.

A front page on Nostr (nsite)

A static page held on relays and Blossom servers, built with nsite-clay. It has three paid demos: translation, a cover image and speech. The payments go to our server. Open the page.

What is an nsite?

An nsite is a website that lives on Nostr instead of on a web host. Its files sit on Blossom servers, a signed Nostr event lists them, and the owner's key is the address. Any nsite gateway can serve it, so no single hosting company or domain registrar controls it. Ours is a front door, not the service: every paid call still goes to our server, and if our server is down, the buttons on the page fail.

We also gave work back. The author of nsite-clay (jooray) merged our pull request and closed the three issues we opened. He also found a bug in our page, and we fixed it.

Lessons From Publishing to Nostr Relays

Four lessons for anyone who publishes to relays. They can save a builder a day.

An OK from a relay is not proof

One relay answered OK to a write and never returned the event. Two others stayed silent. Read the event back. Read it twice, because one read can miss an event that is there.

Treat a public event as permanent

We published a catalog with one wrong endpoint. We fixed the source and published a corrected event. A relay keeps the new version only if it accepts the write, and two relays did not answer, so they still serve the old text. Review an event before you publish it. In our repository, a test now fails when a listed endpoint is not a real route.

A relay can refuse you

One large relay refused our writes after a short burst of events. It accepted them again later. Publish to several relays, and do not send a burst.

One key, one identity

A replaceable event is unique for each key and identifier, so a second key makes a second article. We publish everything from one key. Our newer publish scripts refuse any other key.

ContextVM: MCP Over Nostr, and Why We Will Try It

MCP (specification on GitHub) is the common way for an AI agent to call tools. Normally the agent reaches an MCP server at a web address. ContextVM carries the same MCP messages inside Nostr events instead. A gateway sits in front of the server. The agent sends a request as a signed event, and the gateway answers the same way.

This is what it could give a service like ours:

Reach without a web address

The agent needs a key and a few relay addresses. It does not need our domain. In theory it could still reach us where our domain is blocked or a directory has dropped us, if it can reach one relay. We have not tested that case.

No account

The agent proves who it is with a key, and it can use a fresh key for each task.

No change to the tools

The gateway carries the same MCP tools we already offer. Our MCP server is open source: sats4ai-mcp-server.

An open door

Anyone can write a client. Nobody has to ask us first.

We tested it on one computer against our public MCP server, with throwaway keys. A client with only its own key, relay addresses and the gateway's public key listed all 58 of our MCP tools in 2.6 seconds. It then called a free read tool. No paid call went through it.

Next we will run a gateway beside our app. Payment stays on our own flow: the agent asks for an invoice, pays over Lightning, and repeats the call. We will not put payment inside the Nostr message. We will start small, and we will write down what we learn.

Where This Can Go for Bitcoin Services and Their Users

We are early, and the benefit today is small. This is what we think the same pieces can give us and our users over time.

A shelf agents can browse

Software that picks its own tools needs somewhere to look. Open listings on relays are a shelf that no single company controls. We want to be on it from the start. We wrote about how agents discover tools in another post.

A backup rail

If a search engine, an app store or a domain stops working for us or for a customer, relays still carry our listing, and a gateway could carry the calls.

Private contact

A customer could give a key for one job, and we could send an encrypted note to it. For example, it could say where to claim a refund, with no email address involved. We are studying this design. It is not built.

A network that grows with use

Every client, wallet and agent that learns to read a listing can use every service that publishes one. We would rather help build that than wait for it.

Nostr FAQ

What is Nostr?

Nostr stands for Notes and Other Stuff Transmitted by Relays. It is an open protocol for signed messages. You hold a key, you sign messages with it, and relays pass the messages on. No company owns it, and no account is needed.

Is Nostr a blockchain?

No. Nostr has no chain, no token and no mining. A message is a signed event that relays store and pass on.

What is a Nostr relay?

A relay is a simple server that stores signed events and sends them to clients that ask. Anyone can run one. Clients use several relays at once, so a message dropped by one relay can still be found on another.

What is an nsite?

An nsite is a website that lives on Nostr instead of on a web host. Its files sit on Blossom servers, a signed Nostr event lists them, and the owner's key is the address. Any nsite gateway can serve it, so no single hosting company or domain registrar controls it.

Do you need Bitcoin to use Nostr?

No. Nostr works without any payment. Many Nostr apps add Bitcoin over Lightning for tips, called zaps, because both are open and need no account.

What is L402?

L402 is a standard that lets a client pay for an API call with Lightning. The server answers a request with HTTP 402 and a Lightning invoice. The client pays the invoice and repeats the request with proof of payment.

What is ContextVM?

ContextVM carries MCP messages inside Nostr events. A gateway sits in front of an MCP server, and an AI agent talks to it with a key and relay addresses instead of a web address.

Can AI agents use Nostr?

Yes. An agent can find a tool from a listing on relays, and it can call an MCP tool through a ContextVM gateway. It can pay for the call over Lightning. In our design, payment stays outside the Nostr message.

Tell Us What Breaks

If you build a Nostr client, an L402 directory or an agent, we want to hear what breaks. Reply to this post on Nostr.

Projects and Specs Mentioned in This Guide

All of them are open source or open specifications. Read the code, and tell the authors what you find.

Tools an Agent Can Pay For

Real-world tools your agent can pay for with Lightning. No signup, no API key. Authorized by payment, not by account.