Skip to main content
Glama
fc0web

rei-memory-mcp

by fc0web

rei-memory-mcp

Rei / Claude が Rei-AIOS の SEED_KERNEL(2026-08-19 時点で 1,677 以上の理論)を全文検索、ID、または STEP で照会できる読み取り専用 MCP サーバー。

Phase 1 — 読み取り専用。 書き込みパスは MCP ツールとして公開されません。取り込みは一度きりのスクリプトです。理論の追加と昇格は Phase 2(seed_propose ステージングテーブル)に属します。

設計原則

3 段階の分類(proven / hypothesis / speculative)は必須のスキーマフィールドです。段階のない理論は取り込めません。疫病衛生の規律は、人間の注意力ではなくスキーマによって強制されます。

Related MCP server: Ek-Chuah MCP

ツール

ツール

目的

seed_search(query, tier?, step_min?, step_max?, limit?)

タイトル+本文に対する FTS5 全文検索。日本語用の Trigram トークナイザー。

seed_get(theory_id, include_links?)

全文 + ファンアウトリンク(depends / contradicts / generalizes / related)。ID が存在しない場合 → {"error": "not_found", ...}

seed_list_steps(step_min?, step_max?)

STEP ごとの件数 + 段階の分布。現在の SEED_KERNEL 行のうち STEP マーカーを持つのはわずか ~3% で、残りは step: null バケットに分類されます。

セットアップ

Python 3.11+ と SQLite 3.34+(FTS5 trigram トークナイザー用 — Python 3.11+ に同梱)。

# from repo root
python -m venv .venv
.venv/Scripts/activate            # Windows
source .venv/bin/activate         # Unix
pip install -e '.[dev]'

データベースの構築

SEED_KERNEL は TypeScript ソースとして rei-aios/src/axiom-os/seed-kernel*.ts にあります。JSONL にダンプしてから取り込みます:

# 1. dump (run inside the rei-aios repo; script is bundled there)
cd path/to/rei-aios
npx tsx scripts/dump-seed-kernel-json.ts > /path/to/rei-memory-mcp/data/seed-kernel-dump.jsonl

# 2. ingest into SQLite
cd path/to/rei-memory-mcp
python scripts/ingest.py \
    --input data/seed-kernel-dump.jsonl \
    --db    data/seed_kernel.db

data/*.jsonldata/*.db はどちらも gitignore されています — 必要に応じて再生成してください。

MCP サーバーの実行

# stdio transport (default)
python -m rei_memory_mcp.server
# or via console script:
rei-memory-mcp

DB パスは REI_MEMORY_DB から取得されます(デフォルト: ./data/seed_kernel.db)。

Claude Desktop の設定

Claude Desktop の MCP 設定に追加します(パスは調整してください):

{
  "mcpServers": {
    "rei-memory": {
      "command": "python",
      "args": ["-m", "rei_memory_mcp.server"],
      "cwd": "C:/Users/user/rei-memory-mcp",
      "env": {
        "REI_MEMORY_DB": "C:/Users/user/rei-memory-mcp/data/seed_kernel.db"
      }
    }
  }
}

テスト

pytest

日本語クエリのテスト(test_search.py::test_japanese_query_hits)が要となるシグナルです — これが失敗した場合、trigram トークナイザーが壊れており、検索は静かに役に立たなくなっています。

正直な範囲

  • 読み取り専用。 書き込み MCP ツールは意図的に存在しません。誤った記憶が形成への近道を持つべきではありません。

  • Trigram 日本語。 2 文字以下のクエリは日本語テキストに一致しません(これが trigram トークナイザーの仕組みです)。3 文字以上のクエリを使用してください。

  • STEP カバレッジ。 現在の SEED_KERNEL エントリのうち、本文に STEP N マーカーを埋め込んでいるのはわずか ~3% です。seed_list_steps はこれを忠実に報告します。

  • id の形状。 現在の SEED_KERNEL は 3 つの ID パターン(T-\d+invented-*、kebab-case slug)を混在させています。3 つすべてが受け入れられ、再整形は行われません。

  • ベクトル検索なし。 FTS5 trigram が Phase 1 の検索のすべてです。不十分であることが判明した場合、Phase 2 で埋め込みを置き換えではなく併用として追加できます。

ロードマップ(未実装)

  • Phase 2seed_propose ステージングテーブル + 人間による承認 → theories への昇格。theories への直接書き込みはツールとして公開されません。

  • Phase 3 — 昇格履歴テーブル。理論の軌跡(hypothesis → proven)自体が成果物となります。

  • Phase 4 — ランキングのためのアクセス数減衰。immutable: true の行は対象外で、何も削除されることはありません。

ライセンス

AGPL-3.0(商用デュアルライセンス条件付き — LICENSE を参照)。rei-aios メインリポジトリと一致します。


急がず、ゆっくりと。種は育ちます。

A
license - permissive license
Not graded
quality - not tested
C
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
    A
    quality
    B
    maintenance
    An MCP server that enables LLMs to pull-based search through Clawket's RAG repository for exploratory and conditional queries. It provides read-only access to search artifacts, tasks, and decisions via HTTP API.
    5
    10
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Read-only MCP server that serves the Archivo Epistemico (epistemic graph), enabling AI to read and query the epistemic path autonomously via tools like search, get_via, resolve, and get_necesidad.
  • F
    license
    Not graded
    quality
    C
    maintenance
    Read-only MCP server for querying an evidence-aware knowledge vault with temporal and provenance-aware data, supporting agent memory and semantic graph projections.

View all related MCP servers

Related MCP Connectors

  • Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.

  • Read-only MCP server for ClassQuill, a tutoring-business-management platform.

  • Read-only MCP server for the WebAssembly spec: instructions, types, sections, search, proposals.

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/fc0web/rei-memory-mcp'

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