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! - ๐ Post notes to Nostr network - ๐ Connect to multiple relays - ๐ค MCP-compliant API for AI integration - ๐ธ Send Lightning zaps to Nostr users (WIP) - ๐ก S
Add this skill
npx mdskills install AbdelStark/nostr-mcpWell-documented MCP server enabling Nostr protocol integration with clear setup and useful social tools
1# ๐ Nostr MCP Server23A 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.45Censorship resistance matters, even for LLMs.67[](https://smithery.ai/server/@AbdelStark/nostr-mcp)8[](https://www.typescriptlang.org/)9[](https://github.com/modelcontextprotocol/typescript-sdk)10[](https://nostr.com/)1112BTW, you should [join Nostr now!](https://start.njump.me/?s=npub1hr6v96g0phtxwys4x0tm3khawuuykz6s28uzwtj5j0zc7lunu99snw2e29)1314## ๐ Features1516- ๐ Post notes to Nostr network17- ๐ Connect to multiple relays18- ๐ค MCP-compliant API for AI integration19- ๐ธ Send Lightning zaps to Nostr users (WIP)20- ๐ก Server-Sent Events (SSE) support for real-time communication2122## ๐ทโโ๏ธ TODOs2324- [ ] Add support for multiple simultaneous connections25- [ ] Implement stdin transport mode (configurable via environment variable)2627## ๐ Prerequisites2829- Node.js 18+3031## ๐ ๏ธ Installation3233### Installing via Smithery3435To install Nostr MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@AbdelStark/nostr-mcp):3637```bash38npx -y @smithery/cli install @AbdelStark/nostr-mcp --client claude39```4041### Manual Installation421. Clone the repository:4344```bash45git clone https://github.com/AbdelStark/nostr-mcp46cd nostr-mcp47```48491. Install dependencies:5051```bash52npm install53```54551. Create a `.env` file:5657> ๐ก You can copy the `.env.example` file and modify it as needed.5859```env60# Log level (debug, info, warn, error)61LOG_LEVEL=debug62# Node environment (development, production)63NODE_ENV=development64# List of Nostr relays to connect to65NOSTR_RELAYS=wss://relay.damus.io,wss://relay.primal.net,wss://nos.lol66# Your Nostr private key (starts with nsec)67NOSTR_NSEC_KEY=your_nsec_key_here68# Server mode (stdio or sse)69SERVER_MODE=sse70# Port for SSE mode71PORT=900072```7374## ๐ฆ Usage7576### Starting the Server7778```bash79# Development mode with hot reload80npm run dev8182# Production mode83npm start84```8586### Available Tools8788#### `post_note`8990Posts a new note to the Nostr network.9192Example input:9394```json95{96 "content": "Hello from Nostr! ๐"97}98```99100#### `send_zap`101102Sends a Lightning zap to a Nostr user.103104Example input:105106```json107{108 "nip05Address": "user@domain.com",109 "amount": 1000110}111```112113## ๐ง Development114115### Project Structure116117```text118nostr-mcp/119โโโ src/120โ โโโ index.ts # Main server entry point121โ โโโ nostr-client.ts # Nostr client implementation122โ โโโ types.ts # TypeScript type definitions123โโโ .env # Environment configuration124โโโ tsconfig.json # TypeScript configuration125```126127### Running Tests128129```bash130npm test131```132133## ๐ค Contributing1341351. Fork the repository1362. Create your feature branch (`git checkout -b feature/amazing-feature`)1373. Commit your changes (`git commit -m 'Add some amazing feature'`)1384. Push to the branch (`git push origin feature/amazing-feature`)1395. Open a Pull Request140141## ๐ License142143This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.144145## ๐ Resources146147- [Join Nostr](https://start.njump.me/?s=npub1hr6v96g0phtxwys4x0tm3khawuuykz6s28uzwtj5j0zc7lunu99snw2e29)148- [Nostr Manifesto](https://fiatjaf.com/nostr.html)149- [Nostr Specifications](https://github.com/nostr-protocol/nips)150- [Model Context Protocol](https://modelcontextprotocol.io/introduction)151- [Visual testing tool for MCP servers](https://github.com/modelcontextprotocol/inspector)152- [Awesome MCP Servers](https://github.com/punkpeye/awesome-mcp-servers)153- [Awesome MCP Clients](https://github.com/punkpeye/awesome-mcp-clients)154- [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)155- [Nostr Development Kit (NDK)](https://github.com/nostr-dev-kit/ndk)156157## ๐ฌ Contact158159Feel free to follow me if you'd like, using my public key:160161```text162npub1hr6v96g0phtxwys4x0tm3khawuuykz6s28uzwtj5j0zc7lunu99snw2e29163```164165Or just **scan this QR code** to find me:166167168169---170171<p align="center">172 Made with โค๏ธ for the Nostr community173</p>174
Full transparency โ inspect the skill content before installing.