nostr-bray
nostr-bray
面向 AI 与人类的信任感知 Nostr MCP。 涵盖 27 个类别的 238 个工具。模型无关。适用于 Claude、ChatGPT、Gemini、Cursor、Windsurf 或任何 MCP 客户端。
快速开始
全局安装或通过 npx 运行:
npm install -g nostr-bray添加到您的 MCP 客户端配置中:
{
"mcpServers": {
"nostr": {
"command": "npx",
"args": ["nostr-bray"],
"env": {
"NOSTR_SECRET_KEY": "nsec1...",
"NOSTR_RELAYS": "wss://relay.damus.io,wss://nos.lol"
}
}
}
}然后让您的 AI 调用 whoami 以验证其是否正常工作。
对于生产环境,建议使用 Heartwood 或任何 NIP-46 bunker(您的密钥绝不会离开签名设备):
{
"mcpServers": {
"nostr": {
"command": "npx",
"args": ["nostr-bray"],
"env": {
"BUNKER_URI": "bunker://...",
"NOSTR_RELAYS": "wss://relay.damus.io,wss://nos.lol"
}
}
}
}认证等级(从优到劣)
等级 | 方法 | 密钥暴露风险 |
Heartwood | 专用签名设备 ( | 密钥绝不会离开签名设备。支持 nsec-tree 派生、按客户端权限控制及设备支持的证明。 |
软件 bunker | 任何 NIP-46 bunker ( | 密钥由独立进程持有。bray 无法直接访问。 |
ncryptsec | NIP-49 加密密钥 ( | 密钥在静态存储时加密,启动时在内存中解密。 |
密钥文件 | 文件路径 ( | 密钥存储在磁盘上,读取一次后删除环境变量。 |
环境变量 | 内联密钥 ( | 密钥在进程环境中可见。仅限开发使用。 |
Related MCP server: nwc-mcp
工具分组
分组 | 工具数 | 关键示例 |
身份 (Identity) | 16 |
|
社交 (Social) | 15 |
|
私信 (Direct Messages) | 4 |
|
信任 (Trust) | 22 |
|
调度 (Dispatch) | 13 |
|
中继 (Relay) | 13 |
|
审核 (Moderation) | 16 |
|
市场 (Marketplace) | 16 |
|
安全 (Safety) | 14 |
|
Blossom | 10 |
|
隐私 (Privacy) | 10 |
|
闪电支付 (Zap) | 9 |
|
保险库 (Vault) | 9 |
|
工作流 (Workflow) | 7 |
|
印记 (Signet) | 7 |
|
社区 (Communities) | 5 |
|
徽章 (Badges) | 4 |
|
群组 (NIP-29) | 4 |
|
文章 (Articles) | 3 |
|
日历 (Calendar) | 3 |
|
维基 (Wiki) | 3 |
|
搜索 (Search) | 3 |
|
排程 (Scheduling) | 4 |
|
社区 NIPs | 2 |
|
实用工具 (Utility) | 19 |
|
处理器 (Handler) | 2 |
|
目录 (Catalog) | 2 |
|
使用 search-actions 按关键字查找工具,然后使用 execute-action 运行它们。
调度:AI 间协作
调度功能允许 AI 代理通过加密的 Nostr 私信进行协作。任何支持 MCP 的客户端都可以向其他代理发送结构化任务并接收结果。
13 种消息类型: send, check, reply, ack, status, cancel, refuse, failure, query, propose, capability-publish, capability-discover, capability-read。
NIP-89 能力发现: 代理发布其功能。其他代理按主题发现能力,然后自动将任务路由给合适的协作者。
dispatch-send("alice", "think", "Analyse the trade-offs of NIP-44 vs NIP-04")
dispatch-check() → inbox with pending tasks
dispatch-reply(taskId, result) → send results back encrypted所有消息均采用 NIP-44 加密。接收者通过名称、NIP-05、npub 或十六进制公钥解析。
身份解析器
每个接受接收者的工具都使用通用身份解析。您无需手动查找十六进制公钥。
支持的格式:
名称 --
"alice"(从您的调度联系人中解析)NIP-05 --
"alice@example.com"(HTTP 查询)npub --
"npub1abc..."(NIP-19 解码)十六进制 --
"a1b2c3..."(64 字符直接传递)
定时发布
现在签名事件,稍后发布。事件会立即使用您当前的密钥签名,然后保留在队列中,直到预定时间。
post-schedule("Good morning!", "2026-04-01T08:00:00Z")
post-queue-list() → view pending scheduled posts
post-queue-cancel(id) → cancel before it publishesNIP 覆盖范围
nostr-bray 实现或集成了以下 NIP:
NIP | 内容 |
NIP-01 | 事件、签名、中继协议 |
NIP-02 | 关注列表 |
NIP-05 | DNS 身份(查询、验证、中继提示) |
NIP-09 | 事件删除 |
NIP-11 | 中继信息 |
NIP-17 | 私信(默认使用 gift wrap) |
NIP-19 | bech32 编码 (npub, nsec, nprofile, nevent, naddr) |
NIP-23 | 长文(kind 30023) |
NIP-29 | 群聊 |
NIP-32 | 标签 |
NIP-40 | 过期标签 |
NIP-42 | 中继认证 |
NIP-44 | 加密载荷 v2 |
NIP-45 | 事件计数 |
NIP-46 | Nostr Connect (bunker) |
NIP-49 | 私钥加密 (ncryptsec) |
NIP-50 | 搜索 |
NIP-51 | 列表(静音、置顶、关注集、书签) |
NIP-52 | 日历事件 |
NIP-54 | 维基页面 |
NIP-57 | 闪电支付 (Zap) |
NIP-58 | 徽章 |
NIP-65 | 中继列表元数据 |
NIP-72 | 社区 |
NIP-78 | 应用特定数据 |
NIP-85 | 信任排名 |
NIP-89 | 推荐应用(调度能力发现) |
NIP-96 | HTTP 文件存储 (Blossom) |
NIP-99 | 分类列表 |
NIP-A7 | 咒语 (kind 777 — 执行保存的查询) |
NIP-VA | 可验证证明 (kind 31000) |
配置
配置文件(推荐)
创建 ~/.config/bray/config.json (或 ~/.nostr/bray.json):
{
"bunkerUriFile": "/Users/you/.nostr/bunker-uri",
"relays": ["wss://relay.damus.io", "wss://nos.lol"],
"trustMode": "annotate"
}密钥通过文件路径 (bunkerUriFile, secretKeyFile, nwcUriFile) 引用,因此它们永远不会出现在配置文件本身中。
搜索顺序:BRAY_CONFIG 环境变量 > $XDG_CONFIG_HOME/bray/config.json > ~/.nostr/bray.json。
环境变量
变量 | 描述 |
| 配置文件路径 |
| NIP-46 bunker URL(最安全) |
| bunker URI 文件路径 |
| nsec, 十六进制, 或 BIP-39 助记词 |
| 密钥文件路径 |
| NIP-49 加密密钥 |
| ncryptsec 密码 |
| 逗号分隔的中继 URL |
| Tor 的 SOCKS5h 代理 |
| 设置为 |
|
|
| HTTP 端口(默认 3000) |
所有密钥环境变量在解析后会立即从 process.env 中删除。
CLI
npx nostr-bray whoami # show your npub
npx nostr-bray post "hello from bray!" # publish a note
npx nostr-bray persona work # derive a work persona
npx nostr-bray prove blind # create a linkage proof
npx nostr-bray --help # see all commands文档
给 AI 助手
请参阅 llms.txt 获取针对 AI 上下文窗口优化的简洁摘要,或参阅 llms-full.txt 获取包含参数详情的完整工具文档。
ForgeSworn 工具包的一部分
ForgeSworn 为 Nostr 构建开源的加密身份、支付和协作工具。
库 | 功能 |
确定性子身份派生 | |
secp256k1 上的 SAG/LSAG 环签名 | |
Pedersen 承诺范围证明 | |
抗胁迫的口头验证 | |
人类可读的验证令牌 | |
L402 支付中间件 | |
带有多边形覆盖的地理哈希工具包 | |
NIP-VA 可验证证明 | |
基于纪元的加密访问控制 | |
隐私保护的信任网 |
许可证
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Agent registry with Nostr identity, reputation, escrow, observability, and Lightning payments.
Trust checks for MCP servers: trust scores, tool-drift detection, signed diligence receipts. Free.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
No-key MCP: audit/certify MCPs, signed trust history; join Gold Rush Town & build with your LLM.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceLightning Network trust oracle for AI agents. Provides real-time node reachability checks, trust scores, and personalized pathfinding for 17,000+ Lightning nodes via 12 MCP tools.3AGPL 3.0
- AlicenseAqualityCmaintenanceMCP server exposing a Lightning wallet to LLM agents over Nostr Wallet Connect (NIP-47): balance, invoices, LN address/LNURL payments, batch pay, and keysend. All spend tools are wrapped in a defense-in-depth safety stack — budget caps, allowlist, two-step confirmation, audit log.1361MIT
- AlicenseNot gradedqualityCmaintenanceA read-only MCP server for AI agents to access Nostr profiles, notes, search, and relay lists through user-chosen relays, without requiring an account or keys.MIT
- AlicenseNot gradedqualityAmaintenanceScoped, revocable data delegation to agentic workflows over nostr, mounted as an MCP server.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/forgesworn/bray'
If you have feedback or need assistance with the MCP directory API, please join our Discord server