Nostr MCP 服务器是一个支持 AI 模型与 Nostr 网络交互的 Model Context Protocol (MCP) 服务器。它允许 AI 模型发布笔记,并与自由发言协议进行互动。在当今环境下,即便对于 LLM(大型语言模型)而言,抵制审查制度也具有重要意义。
顺便提一句,你应该现在就 加入 Nostr 网络!
通过 Smithery 可自动安装 Nostr MCP Server for Claude Desktop:
npx -y @smithery/cli install @AbdelStark/nostr-mcp --client claude
git clone https://github.com/AbdelStark/nostr-mcp
cd nostr-mcp
npm install
.env
文件:💡 你可以复制
.env.example
文件并按需修改。
# 日志级别(debug, info, warn, error)
LOG_LEVEL=debug
# 环境(development, production)
NODE_ENV=development
# Nostr 中继服务器列表
NOSTR_RELAYS=wss://relay.damus.io,wss://relay.primal.net,wss://nos.lol
# 你的 Nostr 私钥(以 nsec 开头)
NOSTR_NSEC_KEY=your_nsec_key_here
# 服务器模式(stdio 或 SSE)
SERVER_MODE=stdio
安装完成后,运行以下命令启动服务器:
npm run dev
默认情况下,服务器将在 ws://localhost:3001
和 http://localhost:3000
上运行。
通过 Smithery 自动安装 Nostr MCP Server for Claude Desktop:
npx -y @smithery/cli install @AbdelStark/nostr-mcp --client claude
git clone https://github.com/AbdelStark/nostr-mcp
cd nostr-mcp
npm install
.env
文件:💡 你可以复制
.env.example
文件并按需修改。
# 日志级别(debug, info, warn, error)
LOG_LEVEL=debug
# 环境(development, production)
NODE_ENV=development
# Nostr 中继服务器列表
NOSTR_RELAYS=wss://relay.damus.io,wss://relay.primal.net,wss://nos.lol
# 你的 Nostr 私钥(以 nsec 开头)
NOSTR_NSEC_KEY=your_nsec_key_here
# 服务器模式(stdio 或 SSE)
SERVER_MODE=stdio
.env
文件来调整服务器行为为 Nostr 社区用心打造