Nostr MCP

v1.0.0Communicationstable

A Model Context Protocol server that enables LLMs like Claude to interact with the Nostr social network, allowing for fetching user profiles, text notes, and zap payment information.

mcpnostr
Share:
36
Stars
0
Downloads
0
Weekly
0/5

What is Nostr MCP?

Nostr MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol server that enables llms like claude to interact with the nostr social network, allowing for fetching user profiles, text notes, and zap payment information.

A Model Context Protocol server that enables LLMs like Claude to interact with the Nostr social network, allowing for fetching user profiles, text notes, and zap payment information.

This server falls under the Communication and APIs categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A Model Context Protocol server that enables LLMs like Claud

Use Cases

Fetch user profiles and text notes from the Nostr social network.
Access zap payment information via Nostr protocol.
Interact with decentralized social media through LLMs.
AustinKelsay

Maintainer

LicenseMIT License
Languagetypescript
Versionv1.0.0
UpdatedApr 4, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx nostr-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Nostr MCP

Nostr MCP Server is a Model Context Protocol server that connects LLMs like Claude to the Nostr decentralised social network, enabling retrieval of user profiles, text notes, relay information, direct messages, and Lightning zap payment data. It exposes around 40 tools that map to core Nostr operations, making it straightforward for an AI assistant to browse or interact with the open, censorship-resistant social protocol. Developers and Bitcoin/Lightning users will find it useful for building AI-powered Nostr clients or automating social interactions on the protocol.

Prerequisites

  • Node.js 18 or later installed
  • An MCP-compatible client such as Claude Desktop
  • A Nostr private key (nsec) or the npub/hex public key of profiles you want to query
  • Access to at least one public Nostr relay (e.g. wss://relay.damus.io)
1

Run the server with npx

The server can be started directly using npx without a global install. Note that the project is no longer actively maintained; the successor is nostr-agent-interface.

npx nostr-mcp-server
2

Obtain a Nostr key pair

To perform write operations (posting notes, sending DMs, zapping), you need a Nostr private key in nsec or hex format. For read-only profile and note queries you only need the target public key (npub or hex).

3

Add the server to your MCP client config

Edit claude_desktop_config.json to register the Nostr MCP server. Pass your private key in the env block if you want write access.

{
  "mcpServers": {
    "nostr": {
      "command": "npx",
      "args": ["nostr-mcp-server"]
    }
  }
}
4

Restart Claude Desktop

Fully quit and reopen Claude Desktop so it picks up the new server configuration and establishes connections to Nostr relays.

5

Query Nostr profiles and notes

The server exposes tools for fetching profiles, listing notes from a public key, retrieving relay lists, reading direct messages, and accessing zap receipt data. Ask Claude to use these tools with a specific npub or hex public key.

Nostr MCP Examples

Client configuration

Claude Desktop configuration block for the Nostr MCP Server.

{
  "mcpServers": {
    "nostr": {
      "command": "npx",
      "args": ["nostr-mcp-server"]
    }
  }
}

Prompts to try

Example prompts for interacting with the Nostr social network through Claude.

- "Fetch the Nostr profile for npub1a2b3c... and summarise their bio."
- "Show the last 10 notes posted by this Nostr public key: <hex>."
- "List the relays this Nostr user is subscribed to."
- "Get the zap receipts for this npub and tell me the total amount received."
- "Fetch any direct messages in the Nostr inbox for my public key."

Troubleshooting Nostr MCP

Relay connection errors or empty results when fetching notes

Nostr relies on publicly available relays. If the default relay is unreachable, specify an alternative public relay (e.g. wss://nos.lol or wss://relay.nostr.band) in the server's relay configuration or as a parameter in the tool call.

The project appears unmaintained and missing features

This repository is no longer actively maintained. Consider migrating to the successor project nostr-agent-interface (npm install -g nostr-agent-interface), which offers 48 tools and active development.

Write operations (posting notes, zapping) fail

Write operations require a valid Nostr private key. Ensure your nsec or hex private key is correctly configured and that you are using a relay that accepts authenticated events.

Frequently Asked Questions about Nostr MCP

What is Nostr MCP?

Nostr MCP is a Model Context Protocol (MCP) server that model context protocol server that enables llms like claude to interact with the nostr social network, allowing for fetching user profiles, text notes, and zap payment information. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Nostr MCP?

Follow the installation instructions on the Nostr MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Nostr MCP?

Nostr MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Nostr MCP free to use?

Yes, Nostr MCP is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Communication MCP Servers

Explore all communication servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "nostr-mcp-server": { "command": "npx", "args": ["-y", "nostr-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Nostr MCP?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides