nostr
A Model Context Protocol (MCP) server that provides Nostr capabilities to AI agents
claude mcp add --transport stdio austinkelsay-nostr-mcp-server npx nostr-mcp-server
How to use
This MCP server exposes a comprehensive set of Nostr capabilities as MCP tools that you can query from your LLMs (e.g., Claude) or integration layer. It includes reading and querying tools (e.g., getProfile, getKind1Notes, getReceivedZaps, queryEvents), identity and profile management (createKeypair, createProfile, updateProfile), note creation and publishing (createNote, signNote, publishNote, postNote), generic event tooling (createNostrEvent, signNostrEvent, publishNostrEvent), social interactions (setRelayList, follow, unfollow, reactToEvent, repostEvent, deleteEvent, replyToEvent), messaging (encryptNip04, decryptNip04, sendDmNip04, getDmConversationNip04, encryptNip44, decryptNip44, sendDmNip44, decryptDmNip44, getDmInboxNip44), anonymous tools (sendAnonymousZap, postAnonymousNote), and NIP-19 tooling (convertNip19, analyzeNip19). All tools support both hex public keys and npub formats, with clear, human-friendly identifiers.
To use the server, install it in your environment and run the MCP server process. Your MCP-capable client (or Claude/Cursor/Goose integration) can then query the mcpServers.nostr entry to discover and invoke the available tools. For example, you can request a list of available tools or perform actions such as creating and publishing a signed note, querying a profile, or converting a NIP-19 entity. The server is designed to be integrated into tooling that consumes MCP tool metadata and results for Nostr-related workflows.
How to install
Prerequisites:
- Node.js and npm (or bun) installed on your system
- Git for cloning the repository (if installing from source)
- Optional: Bun if you plan to use Bun-based setup
Option 1 — Install from npm (recommended):
Install globally
npm install -g nostr-mcp-server
Run the server (default invocation via MCP tooling)
nostr-mcp-server
Option 2 — Install from source using Bun (recommended):
Clone the repository
git clone https://github.com/austinkelsay/nostr-mcp-server.git cd nostr-mcp-server
Install dependencies with Bun
bun install
Build the project
bun run build
Start the server (assuming the build outputs to build/index.js)
bun run start || node build/index.js
Option 3 — Install from source using npm (classic):
Clone the repository
git clone https://github.com/austinkelsay/nostr-mcp-server.git cd nostr-mcp-server
Install dependencies
npm install
Build the project
npm run build
Start the server (adjust path if needed)
node build/index.js
Additional notes
- The MCP server exposes 40 tools for Nostr across reading, identity, note creation, event publishing, social interactions, messaging, anonymous tools, and NIP-19 utilities. All tools support both hex public keys and npub formats.
- If you install from npm, you can configure clients to invoke the server via the npx-based command: { command: 'npx', args: ['nostr-mcp-server'] }.
- If you install from source, you typically run the built index.js with node and point your MCP client to the compiled path (e.g., /ABSOLUTE/PATH/TO/nostr-mcp-server/build/index.js).
- When integrating with Claude or other desktop clients, add the server to your mcpServers configuration in the respective client’s config, using either the npm-based invocation or a direct node path for source installations.
- Common issues: ensure network access to Nostr relays, valid keys for signing, and that the build artifacts exist at the expected path after npm/bun build.
- Environment variables can be used to customize endpoints or relay lists; you can add an env map under the mcp_config to document required or optional variables.
Related MCP Servers
supermemory
Your memories are in ChatGPT... But nowhere else. Universal Memory MCP makes your memories available to every single LLM. No logins or paywall. One command to set it up.
obsidian -tools
Add Obsidian integrations like semantic search and custom Templater prompts to Claude or any MCP client.
Security-Detections
MCP to help Defenders Detection Engineer Harder and Smarter
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
dvmcp
DVMCP is a bridge implementation that connects Model Context Protocol (MCP) servers to Nostr's Data Vending Machine (DVM) ecosystem