Skip to main content
Glama
QuantmindSSI

Lumena MCP Server

by QuantmindSSI

Lumenaとは?

Lumenaは、LLMエージェントのためのローカルファーストなメモリストアです。エージェントの記憶を構造化された記憶の宮殿(ルーム、ロキ、チャンク)に整理し、ハイブリッド検索、管理された忘却、ネイティブ統合を提供します。クラウド依存なしで、すべてあなたのハードウェア上で動作します。

  • クラウド不要。 埋め込みはONNX Runtimeでローカルに実行。ストレージは単一ファイルのSQLiteです。

  • オプションのデーモン。 バックグラウンドスケジューラはlumena serveで自動起動し、lumena daemon startで単体実行することもできます。

  • ハイブリッド検索。 BM25(SQLite FTS5)、コサイン類似度ベクトル検索、任意のグラフ走査をRRF(相互ランキング融合)で結合。

  • 管理されたメモリライフサイクル。 3層の忘却メカニズム:時間ベースの減衰、類似性にである 干渉、予算に基づく追い出し。

  • インテグレーション。 LangGraphチェックポイントセーバー、LangChainメモリアダプター、MCPサーバー、FastAPI REST API。


Related MCP server: engram

クイックスタート

# Clone and install (lean runtime — no torch/CUDA)
git clone https://github.com/QuantumindSSI/lumena.git
cd lumena
pip install -e .            # runtime: sqlite-vec, onnxruntime, transformers tokenizer…

# Initialize
lumena init --device generic

# Start the server
lumena serve
# Dashboard at http://localhost:8848/dashboard
# API docs at http://localhost:8848/docs

初回は埋め込みモデルが必要です。 デフォルトではlumenaはモデルのエクスポートを試みるため、大規模な[export]ツールチェーンが必要になります。軽量で推奨される方法は、ビルド済みモデルバンドル(ツールチェーン不要)です。LUMENA_PREBUILT_MODEL_URLを設定するか、ワンコマンドインストーラを使用してください。

インストールオプション(extras)

基本インストールは意図的に軽量です(torch/CUDAなし)。必要な場合にだけextrasを追加してください:

インストール

追加されるもの

使用タイミング

pip install lumena

コアランタイム+推論

常に使用

pip install 'lumena[mcp]'

コーディングエージェント用 MCPサーバー

OpenCode/Copilot/Claude などを使う場合

pip install 'lumena[export]'

ONNXエクスポートツールチェーン (optimum → torch, ~2GB)

自分でモデルをビルドする場合のみ

pip install 'lumena[wizard]'

spaCyオンボーディングウィザード

lumena illuminate を使う場合

pip install 'lumena[localllm]'

オンデバイスLLM (llama-cpp)

ナラティブ統合向け

pip install 'lumena[langchain]' / [langgraph]

フレームワークアダプター

それらのフレームワークを使う場合

pip install 'lumena[full]'

上記すべて

全部入りのローカル開発用

保存と取得

from lumena.config import LumenaConfig
from lumena.data.schema import get_connection
from lumena.force.mnemonic.store import store_memory

config = LumenaConfig()
conn = get_connection(config)

chunk_id = store_memory(
    conn,
    content="User prefers dark mode and large fonts",
    room_name="preferences",
    config=config,
)
conn.close()
from lumena.config import LumenaConfig
from lumena.data.schema import get_connection
from lumena.conversation import ConversationMemory

config = LumenaConfig()
conn = get_connection(config)
memory = ConversationMemory(config=config, conn=conn)

turn = memory.retrieve_and_assemble("What UI settings does the user like?")
print(turn.assembled_context)
$ lumena status
Lumena Status
Device: generic
Rooms: 5
Active chunks: 58
Context budget: 2048 tokens
TFC → e=0.50 a=0.50 tau=7.0 r=3

APIエンドポイント

GET  /health            Liveness probe (unversioned)
GET  /dashboard         Effectiveness dashboard (HTML)
GET  /metrics           Machine-readable metrics
GET  /v1/status        Palace overview
POST /v1/search       Semantic + lexical hybrid search
POST /v1/store        Store a memory chunk
POST /v1/feedback     Log explicit or implicit feedback
POST /v1/assemble     Retrieve + assemble context in one call
POST /v1/turn         Store full conversation turn
GET  /v1/dashboard-data Dashboard data as JSON

アーキテクチャ

User Input → Intent Router → Parallel Retrieval (BM25 + Dense + Graph)
                                  │
                                  ▼
                          RRF Fusion × V(m) × Recency
                                  │
                                  ▼
                          Context Assembly (Jinja2)
                                  │
                                  ▼
                    Consolidation → Decay / Interference / Eviction

プロジェクトの現状

Lumenaは本番運用可能なソフトウェアです。APIバージョニング、網羅的なテスト、文書化されたセキュリティ上の制限を備えエンドツーエンドで動作します。本番環境、評価、開発、信頼されたLANへの展開に適しています。

次元

状況

詳細

テスト

320成功、7スキップ

カバレッジ25%。テストファイル43件。

ストレージ

動作中

WAL、FTS5、bi時刻追跡、来歴チェーンを備えたSQLite。

検索

動作中

BM25+さらに+RRF融合によるグラフ。

忘却

動作中

L1減衰(エビラウス)、L2干渉、L3予算追い出し。

PII検出

動作中

保存時に正規表現ベースのスキャン。ブロック/削除/ハッシュ化を設定可能。

監査記録

動作中

リクエストトレーシング付きSQLite監査テーブル。

APIサーバー

動作中

/v1/バージョニング、オプトインAPIキー認証(LUMENA_API_KEYを設定するまではオフ)、POSTエンドポイントのレート制限、CORS、セキュリティヘッダーを備えたFastAPI。

MCPサーバー

動作中

7つのツール(search、store、assemble、turn、feedback、status、dashboard式)。

LangChain

動作中

Lumena築ChatMemoryアダプター(langchainパッケージが必要)。

LangGraph

動作中

LumenaCheckpointSaver(langgraphパッケージが必要)。

保存時の暗号化

実装済み、オプトイン

LUMENA_DATABASE_ENCRYPTION_MODEによるSQLCipher(共有全体)またはFernet(フィールド単位)。デフォルトはnoneです。有効化するか、OSレベルのディスク暗号化を使用してください。

BEIRベンチマーク

一部評価済み

500ドキュメント/20クエリのサブセット結果が利用可能。全文コーパスの評価はHPCに延期になります。

P2P共有

動作中

AES-256-C拡張時のビームプロトコル、HMAC-SHA256署名、リリップ保護。p2p鍵が必要。


ベンチマークスイート

すべてリポジトリルートから単一のコマンドで実行できます:

スイート

コマンド

ステータス

検索 (R@k、nDCG、MRR)

python -m benchmarks.retrieval.run

実行済み(合成コーパス)

E2Eメモリ品質

python -m benchmarks.e2e.run

実行済み(28クエリ)

ナビゲーション効率

python -m benchmarks.navigation.run

実行済み

アブレーション(成分分離)

python -m benchmarks.ablation.run

実行済み

忘却(行日間の生存率)

python -m benchmarks.forgetting.run

実行済み(結果あり)

パフォーマンス(遅延/フットプリント)

python -m benchmarks.perf.run

実行済み(結果あり、x86_64)

BEIRサブセット評価

python -m benchmarks.beir.run

実行済み(50ドキュメント/20クエリのサブセット結果あり)

光学劣化

python -m benchmarks.optical.run

実行済み(結果あり)

TFC感度

python -m benchmarks.tfc.run

実行済み(結果あり)

ストレス(バルク縁取り込み)

python -m benchmarks.stress.run

実行済み(20kチャンクの結果あり;x86_64)

クロスシステム(Chroma/FOISS比較)

python -m benchmarks.cross_system.run

ハーネス準備済み;まだ結果なし

全スイート

python -m benchmarks.run_all

全11スイートをラップする

結果の注意事項: 検索ベンチマークは、合成キーワード重複コーパスを(1000パッセージ、50クエリ)とBEIRサブセット評価(5つの標準データセットにまたがる500パッセージ、20クエリのサブセット)を使用します。合成コーパスは意図的に簡単です(BM25がnDCGをほぼ飽和させる)。したがって、これらの数値は検索品質の主張ではなく、ハーネスの健全性チェックとして扱ってください。重要な信号はBEIRサブセットです。コミットされた検索物は、実際のエンベッダー(all-MiniLM-L6-v2 と BAAI/bge-small-en-v1.5)で再生成されました。ベンチマークはモック埋め込みでは実行を拒否します。


統合

統合

機能

使用方法

MCPサーバー

OpenCode、Claude DesktopへLumenaのツールを公開する

python -m lumena.integrations.mcp_server

LangChain

LumenaChatMemoryアダプター

pip install langchain

LangGraph

グラフ状態のためのLumenaCheckpointSaver

pip install langgraph

FastAPI

認証/レート制限付きREST API

lumena serve

OpenCode

メモリワークフロー用ネイティブスキル

INTEGRATIONS.mdを参照


プロジェクト構成

lumena/
├── config.py          Configuration (pydantic-settings)
├── search.py          Search pipeline orchestration
├── fusion.py          RRF fusion + reranking
├── controller.py      Twin-Force state controller
├── conversation.py    Context assembly + turn tracking
├── repair.py          Self-healing retrieval
├── intent.py          Intent router (keyword + optional LR)
├── api/               FastAPI server + dashboard
├── cli/               Typer CLI
├── data/              Schema, migrations, backup
├── force/
│   ├── mnemonic/      Store, retrieval, decay, interference, eviction, provenance
│   └── contextual/    Embedding, token budget, assembly
├── integrations/      LangChain, LangGraph, MCP server
├── p2p/               Beam P2P sharing protocol
├── sovereign/         FRQAD, optical quantization, local LLM
├── brand/             Error hierarchy
└── compliance/        Safety forgetting, PII audit
tests/                43 test files, 327 tests
benchmarks/           11 benchmark suites

コントリビューション

コントリビューションを歓迎します。始めるための最良の方法は:

  1. CONTRIBUTING.mdを読む — セットアップ、ブランチ命名、コード規約。

  2. issues トラッカーから good first issue を選ぶ

  3. テストを実行する: pytest tests/(カバレッジ50%以上で必須)。

  4. main に対してPRを送る

インパクトの大きい貢献領域

      • BEIR全体アーネスを実行する** — リーダーボード規模の検索ベンチマーク結果を生成する。

  • 実機でパフォーマンススイートを実行する — メモリ/レイテンシの数値検証を実測で行う(RPi5、Jetson、x86_64)。

  • テストを追加する — 現在テストファイルのないモジュールがあります。どれか1つ選んでカバレッジを増やしてください。

開発環境のセットアップ

python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest tests/                        # Run full suite
pytest tests/ --cov=lumena            # With coverage
ruff check lumena/ tests/             # Lint

ドキュメント

ドキュメント

目的

DEPLOYMENT.md

本番展開ガイド

CONTRIBUTING.md

コントリビューション方法

SECURITY.md

セキュリティポリシーと既知の制限

INTEGRATIONS.md

各プラットフォームの統合ガイド

ROADMAP.md

開発予定とオープンタスク

docs/Lumena_Whitepaper.md

導入ホワイトペーパー


コミュニティ


ライセンス

Lumena は デュアルライセンス です:

  • コミュニティエディションAGPL-3.0-or-later。無料かつオープンソースです。 変更を加えた Lumena をネットワークサービスとして実行する場合、AGPL はその ソースをユーザーが利用できるようにすることを要求します。

  • Pro / 商用エディション — AGPL の義務を排除し、Pro 機能を解放する QuantumindSSI の商用ライセンスです。COMMERCIAL-LICENSE.md を 参照してください。

v1.0.0 までのバージョンは Apache 2.0 (LICENSES/Apache-2.0.txt) のもとでリリースされました。これらの リリースに対するその許諾は撤回できません。商用のお問い合わせ:licensing@quantumindssi.com


A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    An MCP-native, local-first memory server that gives AI agents persistent, structured memory across sessions and tools, enabling them to maintain identity and context without reconfiguration.
    3
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides persistent, local-first AI memory across sessions via MCP tools for storing, searching, and retrieving context from past interactions.
    1
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Provides persistent memory for AI coding agents via MCP, enabling agents to store and semantically recall facts, events, and lessons across sessions, all running locally without cloud dependencies.
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    Local-first AI memory layer with hybrid retrieval and brain-inspired namespaces. Enables agents to save, search, and manage memories directly via MCP tools.
    5
    MIT

View all related MCP servers

Related MCP Connectors

  • Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.

  • Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.

  • Shared long-term memory vault for AI agents with 20 MCP tools.

View all MCP Connectors

Latest Blog Posts

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/QuantmindSSI/lummenna'

If you have feedback or need assistance with the MCP directory API, please join our Discord server