Nostr Tools for AI Agents MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
npm install
npm run build
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add nostr-mcp-server -- node "<FULL_PATH_TO_NOSTR_MCP_SERVER>/dist/index.js"

Replace <FULL_PATH_TO_NOSTR_MCP_SERVER>/dist/index.js with the actual folder you prepared in step 1.

README.md

23 tools for AI agents working with Nostr

nostr-mcp-server

A Nostr MCP (Model Context Protocol) server with NIP-46 remote signing support. Private keys never need to touch the AI context window.

Live Endpoint

Connect directly without running locally:

https://nostr.jorgenclaw.ai/mcp

Transport: Streamable HTTP (MCP spec 2025-03-26) — compatible with Claude Desktop, Cursor, Glama, Smithery, and any MCP client.

Legacy SSE endpoint (backward compat): https://nostr.jorgenclaw.ai/sse


NIP-05 Identity Service

Get a yourname@jorgenclaw.ai verified Nostr identity — registered by an AI agent over Lightning.

How to register:

  1. Open any Nostr client (Amethyst, Primal, Damus, etc.)
  2. DM this npub: npub16pg5zadrrhseg2qjt9lwfcl50zcc8alnt7mnaend3j04wjz4gnjqn6efzc
  3. Send the message: register yourname
  4. Pay the Lightning invoice that arrives in reply (1,000 sats)
  5. Done — yourname@jorgenclaw.ai resolves immediately on all Nostr clients

Uses NIP-17 gift-wrapped DMs. Works with all modern Nostr clients.


Features

  • NIP-46 bunker mode — Set NOSTR_BUNKER_URI once, all signing routes through your bunker
  • Direct key mode — Pass privateKey per-tool call (backwards compatible)
  • 23 tools — Notes, profiles, social actions, DMs (NIP-04/44), relay lists, zaps, fetch
  • MCP native — Works with any MCP-compatible client

Quick Start

npm install
npm run build

Direct key mode (no bunker)

node dist/index.js

Tools require privateKey parameter on each signing call.

Bunker mode (recommended)

NOSTR_BUNKER_URI="bunker://?relay=wss://relay.example.com&secret=abc" node dist/index.js

All signing tools use the bunker. privateKey parameter becomes optional.

Tools

Tool Description
postNote Create, sign, and publish a text note
createNote Create unsigned text note
signNote Sign a note event
publishNote Publish signed note to relays
createNostrEvent Create unsigned event of any kind
signNostrEvent Sign any unsigned event
publishNostrEvent Publish signed event to relays
createProfile Create Nostr profile (kind 0)
updateProfile Update existing profile
follow Follow a pubkey
unfollow Unfollow a pubkey
reactToEvent React to event (kind 7)
repostEvent Repost event (kind 6)
deleteEvent Delete events (kind 5)
replyToEvent Reply with NIP-10 threading
encryptNip04 / decryptNip04 NIP-04 encryption
sendDmNip04 Send NIP-04 DM
encryptNip44 / decryptNip44 NIP-44 encryption
sendDmNip44 Send NIP-44 DM
setRelayList Publish relay list (NIP-65)
getSignerInfo Check signing mode and pubkey
fetchProfile Fetch a Nostr profile
fetchEvents Fetch events from relays

NIP-46 Bunker URI

Format: bunker://<bunker-hex-pubkey>?relay=wss://relay.com&secret=optional

Compatible with: nsecbunker, Amber, any NIP-46 signer.

Also Available: Sovereign MCP (Paid)

For agents that need verifiable signed actions with a Lightning-gated audit trail:

https://mcp.jorgenclaw.ai/mcp

9 tools, sats per call, LCS-1 action receipts. No signup.

Dependencies

  • nostr-tools — Nostr protocol library (signing, encryption, NIP-46)
  • @modelcontextprotocol/sdk — MCP server framework
  • ws — WebSocket for Node.js relay connections
  • zod — Input validation

License

MIT

Tools (25)

postNoteCreate, sign, and publish a text note
createNoteCreate unsigned text note
signNoteSign a note event
publishNotePublish signed note to relays
createNostrEventCreate unsigned event of any kind
signNostrEventSign any unsigned event
publishNostrEventPublish signed event to relays
createProfileCreate Nostr profile (kind 0)
updateProfileUpdate existing profile
followFollow a pubkey
unfollowUnfollow a pubkey
reactToEventReact to event (kind 7)
repostEventRepost event (kind 6)
deleteEventDelete events (kind 5)
replyToEventReply with NIP-10 threading
encryptNip04NIP-04 encryption
decryptNip04NIP-04 decryption
sendDmNip04Send NIP-04 DM
encryptNip44NIP-44 encryption
decryptNip44NIP-44 decryption
sendDmNip44Send NIP-44 DM
setRelayListPublish relay list (NIP-65)
getSignerInfoCheck signing mode and pubkey
fetchProfileFetch a Nostr profile
fetchEventsFetch events from relays

Environment Variables

NOSTR_BUNKER_URIBunker URI for NIP-46 remote signing

Configuration

claude_desktop_config.json
{"mcpServers": {"nostr": {"command": "node", "args": ["/path/to/nostr-mcp-server/dist/index.js"], "env": {"NOSTR_BUNKER_URI": "bunker://<pubkey>?relay=wss://relay.example.com&secret=abc"}}}}

Try it

Post a new note to my Nostr feed saying 'Hello from my AI agent!'
Fetch the latest profile information for the user with pubkey <hex-pubkey>.
Send an encrypted NIP-44 direct message to <pubkey> saying 'This is a secure message from my AI'.
Follow the user with pubkey <hex-pubkey>.
Find all recent events from the relay matching the filter criteria.

Frequently Asked Questions

What are the key features of Nostr Tools for AI Agents?

NIP-46 remote signing support for secure key management. Support for both NIP-04 and NIP-44 encryption standards. Comprehensive toolset for social actions including posting, reacting, and reposting. Direct key mode and Bunker mode for flexible signing configurations. Native MCP compatibility for integration with Claude Desktop and other clients.

What can I use Nostr Tools for AI Agents for?

Automating social media presence by scheduling and posting Nostr notes. Managing secure, encrypted communications between AI agents and human users. Building AI-driven Nostr clients that can interact with the social graph. Automating profile updates and relay list management for consistent identity.

How do I install Nostr Tools for AI Agents?

Install Nostr Tools for AI Agents by running: npm install && npm run build

What MCP clients work with Nostr Tools for AI Agents?

Nostr Tools for AI Agents works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Nostr Tools for AI Agents docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare