Back to MCP Catalog

Nostr Protocol Integration MCP Server

CommunicationTypeScript
Interact with the Nostr protocol to post notes and send zaps
Available Tools

post_note

Posts a new note to the Nostr network

content

send_zap

Sends a Lightning zap to a Nostr user

nip05Addressamount

A Model Context Protocol server that enables AI models to interact with the Nostr network, a decentralized and censorship-resistant social protocol. This integration allows AI assistants to post notes to the Nostr network and send Lightning zaps to Nostr users, promoting freedom of speech for AI systems. The server connects to multiple Nostr relays, providing reliable access to the network. It supports both Server-Sent Events (SSE) and standard I/O communication modes, making it flexible for different integration scenarios.

Overview

The Nostr Protocol Integration MCP server allows AI assistants to interact with the Nostr network, a decentralized protocol for censorship-resistant social media. This integration is particularly valuable for ensuring AI systems have access to open communication channels.

Installation

Prerequisites

  • Node.js 18 or higher

Installation Options

Option 1: Using Smithery (Recommended for Claude Desktop)

npx -y @smithery/cli install @AbdelStark/nostr-mcp --client claude

Option 2: Manual Installation

  1. Clone the repository:
git clone https://github.com/AbdelStark/nostr-mcp
cd nostr-mcp
  1. Install dependencies:
npm install
  1. Create a .env file with the following configuration:
# Log level (debug, info, warn, error)
LOG_LEVEL=debug
# Node environment (development, production)
NODE_ENV=development
# List of Nostr relays to connect to
NOSTR_RELAYS=wss://relay.damus.io,wss://relay.primal.net,wss://nos.lol
# Your Nostr private key (starts with nsec)
NOSTR_NSEC_KEY=your_nsec_key_here
# Server mode (stdio or sse)
SERVER_MODE=sse
# Port for SSE mode
PORT=9000

Important: You'll need a Nostr private key (nsec) to use this MCP. If you don't have one, you can create a Nostr account through services like start.njump.me.

Running the Server

For development with hot reload:

npm run dev

For production:

npm start

Configuration

The server can be configured through environment variables:

  • LOG_LEVEL: Sets the logging verbosity (debug, info, warn, error)
  • NODE_ENV: Environment mode (development, production)
  • NOSTR_RELAYS: Comma-separated list of Nostr relay WebSocket URLs
  • NOSTR_NSEC_KEY: Your Nostr private key
  • SERVER_MODE: Communication mode (sse or stdio)
  • PORT: Port number for SSE mode

Client Configuration

To add this MCP to your AI client (like Claude Desktop), add the following to your client's configuration:

{
  "mcpServers": {
    "nostr": {
      "command": "npm",
      "args": ["start"],
      "cwd": "/path/to/nostr-mcp"
    }
  }
}

Replace /path/to/nostr-mcp with the actual path where you've installed the server.

Troubleshooting

  • If you encounter connection issues, verify that the Nostr relays in your configuration are operational
  • Ensure your Nostr private key is valid and properly formatted
  • Check the server logs for detailed error information

Resources

For more information about Nostr:

Related MCPs

YouTube Transcript
CommunicationTypeScript

Retrieve transcripts from YouTube videos

iMessage Query
CommunicationPython

Access and analyze your iMessage conversations through a secure MCP server

Slack Integration
CommunicationTypeScript

Enables AI assistants to interact with Slack workspaces

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.