
Lightning Memory
io.github.singularityjason由 GitHub 账号 singularityjason 发布v0.4.1更新于 Oct 24, 2026
Decentralized agent memory for the Lightning economy. Nostr identity, L402 payments.
发布方自己的服务:Memory.fit
概览
本地 MCP 服务器,为 AI 代理提供持久记忆、供应商信誉、支出异常检测和闪电网络/L402 支付预算闸门。
- 可以做什么
- 存储、检索、列出、编辑、导出代理记忆(交易、供应商、偏好、决策),并可同步到 Nostr 中继
- 评估供应商信誉、汇总支出结构、检测异常高额支付
- 执行支付前预检闸门,设置并检查按供应商的预算限额
- 生成供应商信任档案、发布信任证明、存储与核验代理证明、导出合规报告
- 发现远程 Lightning Memory 网关并通过 L402 小额支付查询
- 适用场景
- 适合通过闪电网络/L402 付款、需要记住历史购买、判断供应商与价格是否可信并执行支出上限的代理。也适合构建自主比特币/闪电网络代理、希望本地优先存储记忆并可选同步到 Nostr 中继的开发者。
- 运行要求
- 以 pip 安装的 Python 包形式在本机运行;无需账号或 API 密钥,身份为本地生成的 Nostr 密钥对。同步 Nostr 中继需要访问默认中继的网络连接。可选的 L402 网关需要 Phoenixd 节点、已注资的通道,以及配置文件中或 PHOENIXD_PASSWORD 环境变量里的 Phoenixd 密码。语义搜索需额外安装。
安装
在 SourceWeft 中
- 打开 控制台中的 Lightning Memory,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Lightning Memory
[PyPI version] [Python 3.10+] [License: MIT]
Persistent memory for AI agents in the Lightning economy.
The Problem
AI agents spend sats over Lightning via L402 — but they can't remember what they bought. Every session starts from zero. Every vendor is a stranger. Every price is accepted at face value. An agent that paid 500 sats yesterday doesn't know if today's 5,000 sat invoice is a price spike or normal.
The Solution
Lightning Memory gives agents persistent memory, vendor intelligence, and payment safety gates. Agents learn from their spending history, track vendor reputations, detect price anomalies, enforce budgets, and share trust signals with other agents.
Interactive Demo — watch an agent learn, get rugged, and route around bad actors.
Building the Agent Economy — trust, budgets, compliance, and the memory marketplace.
Who Is This For
- Agents making L402 payments that need vendor reputation and spending discipline
- Developers building autonomous agents on Bitcoin/Lightning
- Anyone running an MCP-compatible AI agent (Claude, GPT, or any MCP client)
Quick Start
Configure in Claude Code
Configure in Claude Desktop
How It Compares
Tools (22)
Memory
Lightning Intelligence
Payment Safety
Trust & Compliance
Marketplace
Architecture
- Nostr identity: Agent identity = Nostr keypair (BIP-340). No accounts, no API keys.
- Local-first: SQLite with FTS5 full-text search + optional ONNX semantic search. Works offline.
- Nostr sync: Memories written as NIP-78 events to relays. Portable, tamper-proof.
- L402 payments: Pay-per-query gateway. 1-10 sats per operation.
- Memory quality: Deduplication, contradiction detection, noise filtering, recency-weighted ranking, access tracking.
L402 Gateway
Run an L402 pay-per-query HTTP gateway. Other agents pay Lightning micropayments to access your agent's memory — no API keys, no accounts.
How L402 Works
Endpoints
Phoenixd Setup
- Download and run Phoenixd (listens on
localhost:9740) - Fund it with ~10,000 sats for initial channel opening
- Configure:
~/.lightning-memory/config.json→{"phoenixd_password": "<from ~/.phoenix/phoenix.conf>"} - Start:
lightning-memory-gateway
Docker
CLI Commands
Relay Configuration
Default relays: wss://relay.damus.io, wss://nos.lol, wss://relay.nostr.band
Customize in ~/.lightning-memory/config.json:
Optional: Semantic Search
Add ONNX-based semantic similarity search alongside FTS5 keyword search:
Queries then use hybrid ranking: FTS5 BM25 + cosine similarity with reciprocal rank fusion. "Which vendors are reliable for transcription" matches memories containing "whisper API" and "audio-to-text" even without exact keyword overlap.
Data Storage
Roadmap
- Phase 1: MCP server with local SQLite storage
- Phase 2: Lightning intelligence (vendor reputation, spending summary, anomaly detection)
- Phase 3: Nostr relay sync (NIP-78, Schnorr signing, bidirectional sync)
- Phase 4: L402 payment gateway (macaroons, Phoenixd, HTTP gateway)
- Phase 5: Compliance & trust (budget enforcement, vendor KYC, community reputation, pre-flight gate)
- Phase 6: Memory marketplace (gateway discovery, remote L402 queries, gateway client)
- Phase 7: Agent reliability (semantic search, deduplication, contradiction detection, circuit breakers)
Star History
License
MIT
来源:README.md,提交 16ce82e
工具
0版本历史
1- v0.4.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
其他 Memory 集成

Memory.fit
fit.memory官方发布者
托管式 Memory.fit 服务器,让 AI 读取你的训练、睡眠、恢复与饮食数据,并写回每周计划、每日目标和饮食计划。
pg.ddx.io: the PostgreSQL community's memory
io.ddx.pg官方发布者
pg.ddx.io: the PostgreSQL community's memory 的托管 MCP 服务,由 pg.ddx.io 发布;无需登录;Streamable HTTP;29 个工具。
var.gg Naming Memory
gg.var官方发布者
远程 MCP 服务器,可根据领域概念推荐并检索韩、日、中、越、英多语言的代码标识符名称,并提供 ERD 结构查询。

Counterparts
ai.counterparts
面向 Claude Code 与 Claude Desktop 的本地优先长期记忆:助手自行写下关于你和项目的笔记,并在之后的会话中回忆起来。

LAHZE - Persian AI Memory Platform
由 GitHub 账号 pedramgholizadeh 发布
以波斯语为先的地理记忆平台:发现地点,起草并发布仅限波斯语的记忆。AI 翻译