
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 翻譯