Nostr MCP Server
MCP-compliant server connecting AI models to the censorship-resistant Nostr network.
Key Features
Use Cases
README
🌐 Nostr MCP Server
A Model Context Protocol (MCP) server that enables AI models to interact with Nostr, allowing them to post notes and interact with the freedom of speech protocol.
Censorship resistance matters, even for LLMs.
BTW, you should join Nostr now!
🚀 Features
- 📝 Post notes to Nostr network
- 🔌 Connect to multiple relays
- 🤖 MCP-compliant API for AI integration
- 💸 Send Lightning zaps to Nostr users (WIP)
- 📡 Server-Sent Events (SSE) support for real-time communication
👷♂️ TODOs
- Add support for multiple simultaneous connections
- Implement stdin transport mode (configurable via environment variable)
📋 Prerequisites
- Node.js 18+
🛠️ Installation
Installing via Smithery
To install Nostr MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @AbdelStark/nostr-mcp --client claude
Manual Installation
- Clone the repository:
git clone https://github.com/AbdelStark/nostr-mcp
cd nostr-mcp
- Install dependencies:
npm install
- Create a
.envfile:
💡 You can copy the
.env.examplefile and modify it as needed.
# 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
🚦 Usage
Starting the Server
# Development mode with hot reload
npm run dev
# Production mode
npm start
Available Tools
post_note
Posts a new note to the Nostr network.
Example input:
{
"content": "Hello from Nostr! 👋"
}
send_zap
Sends a Lightning zap to a Nostr user.
Example input:
{
"nip05Address": "user@domain.com",
"amount": 1000
}
🔧 Development
Project Structure
nostr-mcp/
├── src/
│ ├── index.ts # Main server entry point
│ ├── nostr-client.ts # Nostr client implementation
│ └── types.ts # TypeScript type definitions
├── .env # Environment configuration
└── tsconfig.json # TypeScript configuration
Running Tests
npm test
🤝 Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
🔗 Resources
- Join Nostr
- Nostr Manifesto
- Nostr Specifications
- Model Context Protocol
- Visual testing tool for MCP servers
- Awesome MCP Servers
- Awesome MCP Clients
- MCP TypeScript SDK
- Nostr Development Kit (NDK)
📬 Contact
Feel free to follow me if you'd like, using my public key:
npub1hr6v96g0phtxwys4x0tm3khawuuykz6s28uzwtj5j0zc7lunu99snw2e29
Or just scan this QR code to find me:
Star History
Repository Owner
User
Repository Details
Programming Languages
Tags
Topics
Join Our Newsletter
Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.
Related MCPs
Discover similar Model Context Protocol servers
NWC MCP Server
Bridge your Bitcoin Lightning wallet with LLMs using Nostr Wallet Connect.
NWC MCP Server enables users to connect Bitcoin Lightning wallets to language models through Nostr Wallet Connect (NWC) and NIP-47 protocols. It leverages the official Model Context Protocol (MCP) TypeScript SDK and supports various transport modes such as STDIO, HTTP streamable, and SSE. The solution can be integrated with platforms like N8N, Claude Desktop, Goose, and Cline, and allows authentication and context management using NWC connection secrets. Although now deprecated in favor of Alby MCP, it provides tooling for leveraging Lightning payment workflows within AI agent interactions.
- ⭐ 12
- MCP
- getAlby/nwc-mcp-server
Opik MCP Server
A unified Model Context Protocol server for Opik with multi-transport IDE integration.
Opik MCP Server is an open-source implementation of the Model Context Protocol (MCP) designed for the Opik platform. It enables seamless integration with compatible IDEs and provides a unified interface to manage Opik's features such as prompts, projects, traces, and metrics. Supporting multiple transport mechanisms like stdio and experimental SSE, it simplifies workflow integration and platform management for LLM applications. The tool aims to streamline development and monitoring by offering standardized access and control over Opik's capabilities.
- ⭐ 182
- MCP
- comet-ml/opik-mcp
HackMD MCP Server
MCP server connecting LLM clients to the HackMD collaborative note platform.
HackMD MCP Server implements the Model Context Protocol (MCP) to provide a standardized interface between large language model (LLM) clients and the HackMD collaborative note service. Through HTTP and STDIO transports, it enables creation, retrieval, update, and deletion of notes, along with management of teams, user profiles, and history data. It supports deployment in both local and cloud environments, with secure API token-based authentication and configuration via environment variables or HTTP headers.
- ⭐ 43
- MCP
- yuna0x0/hackmd-mcp
Alby Bitcoin Payments MCP Server
Connect Bitcoin Lightning wallets to LLMs using Nostr Wallet Connect within the Model Context Protocol framework.
Alby Bitcoin Payments MCP Server provides a way to integrate Bitcoin Lightning wallets with large language models (LLMs) via the Model Context Protocol (MCP). This server supports Nostr Wallet Connect (NWC), LNURL, and L402, enabling secure payment and authentication flows. Leveraging the official MCP TypeScript SDK along with Alby SDKs and tools, it allows agents and clients to interact with lightning wallets using various transport protocols like SSE and HTTP Streamable. The server can be integrated with tools such as Claude, Goose, and Cline for seamless wallet operations within AI workflows.
- ⭐ 36
- MCP
- getAlby/mcp
Bitcoin & Lightning Network MCP Server
Enable AI models to safely interact with Bitcoin and Lightning Network in a standardized way.
The Bitcoin & Lightning Network MCP Server implements the Model Context Protocol, allowing AI models to interface with Bitcoin and Lightning Network functionalities such as key generation, address validation, transaction decoding, blockchain queries, and lightning payments. It provides standardized endpoints for AI model integration, including support for Claude Desktop and Goose. The solution supports querying blockchain data, parsing transactions and invoices, and managing cryptographic operations in a secure and extensible manner.
- ⭐ 65
- MCP
- AbdelStark/bitcoin-mcp
Nocodb MCP Server
Natural language access and management for NocoDB using the Model Context Protocol.
Nocodb MCP Server enables seamless CRUD operations and schema management on NocoDB databases via the Model Context Protocol (MCP). It allows users to perform database actions such as creating, reading, updating, deleting records, and altering table structures through natural language commands. The tool integrates easily with external platforms like Claude Desktop and supports both API and CLI usage. TypeScript-based, it provides modern maintainability and compatibility enhancements.
- ⭐ 54
- MCP
- edwinbernadus/nocodb-mcp-server
Didn't find tool you were looking for?