convez.ai
MCP ServerAutomaçãoIntermediário
GalaxyRuler

Memory Fort

GalaxyRuler/memory-fort

Memória persistente local e privada para agentes de IA cross-tool

Ver no GitHub
BomPluginScore · de 0 a 100

Servidor MCP que fornece memória persistente compartilhada entre ferramentas de IA, mantendo todos os dados localmente em arquivos markdown. Integra-se automaticamente com Claude Code, Codex, ChatGPT e outras plataformas, permitindo que agentes de IA retenham contexto entre sessões sem depender de APIs externas ou bancos de dados.

Instalação

$npx convez-ai GalaxyRuler/memory-fort

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
5
Forks
1
Acompanhando
0
Saúde
57%
Último commit
há 3 meses
Versão
v0.14.0
Issues abertas
0
Contribuidores
1

Casos de uso

  • Manter contexto histórico em sessões de programação com IA
  • Criar uma base de conhecimento versionável em git para decisões de projetos
  • Recuperar informações relevantes em conversas com múltiplas ferramentas de IA
  • Construir um grafo de conhecimento privado integrado com Obsidian

Veredito

Solução bem pensada para o problema real de fragmentação de memória entre ferramentas de IA. Arquitetura sólida (markdown + BM25 + busca semântica) com foco em privacidade e portabilidade. Sem imposições de vendor lock-in — a integração com Obsidian é elegante.

README

A tradução para o português deste README ainda está na fila.

Memory Fort gives every AI coding session a shared long-term memory: observations flow in automatically from Claude Code, Codex, Antigravity, Hermes, Pi, ChatGPT, and OpenCode. MCP integrations, including OpenClaw in v1, can log and recall memory on demand; search results include detailed provenance receipts explaining ranking decisions; a curated wiki of markdown pages grows over time; and retrieval (BM25 + semantic + graph) surfaces the right context at session start. No database. No external service. No API key to get started.

Your memory is a folder of plain text files — a git repo, an Obsidian vault, and a typed knowledge graph all at once.


Why Memory Fort?

Memory Fort does not require a cloud account, a running database, or a paid API key to get started; its local vault and lexical search run from plain markdown files.

  • Your data, your machine. Everything lives under ~/.memory/ as markdown files you can read, edit, grep, and version-control.
  • No vendor lock-in. Open schema, plain text format, vault is just a git repo.
  • No account required to start. Lexical search (BM25 + graph) works on day one with zero API keys.
  • Obsidian-native. Open ~/.memory/ in Obsidian and get a knowledge graph, backlinks, and full-text search for free.
  • Cross-tool hooks. Claude Code, Codex, Antigravity, Hermes, Pi, ChatGPT, and OpenCode write to the same vault automatically.
  • MCP-only clients. OpenClaw uses the same vault through MCP without passive capture in v1.

Quickstart

npx memory-fort init

Interactive wizard asks ≤4 questions (all pre-defaulted), detects your installed tools, and wires everything. Press Enter to accept all defaults.

Prerequisites: Node.js ≥ 20. Nothing else. No Docker, no database, no API key.

# Search immediately (no key needed)
memory-fort grep "your query"

# Browse and search in the UI
memory-fort dashboard

How it works

System architecture

%%{init: {
  'theme': 'base',
  'themeVariables': {
    'primaryColor': '#1e293b',
    'primaryTextColor': '#f8fafc',
    'primaryBorderColor': '#475569',
    'lineColor': '#38bdf8',
    'secondaryColor': '#0f172a',
    'tertiaryColor': '#1e1b4b'
  }
}}%%
flowchart TD
    subgraph Tools ["🤖 AI Tools"]
        CC["Claude Code"]
        CX["Codex"]
        AG["Antigravity"]
        HE["Hermes"]
        PI["Pi"]
        OC["OpenClaw / CovenCave"]
        CD["Claude Desktop"]
        VS["VS Code"]
        GPT["ChatGPT"]
        OCODE["OpenCode"]
    end

    subgraph Capture ["📥 Capture"]
        H["⚡ Hook Scripts<br/>(PreToolUse · PostToolUse · UserPromptSubmit · Stop)"]
        MCP_IN["🔌 MCP Server<br/>(log_observation)"]
    end

    subgraph Vault ["💾 ~/.memory/ (vault)"]
        RAW["📝 raw/YYYY-MM-DD/<br/>session.md"]
        WIKI["📚 wiki/<br/>projects · decisions · lessons<br/>tools · threads · procedures"]
        IDX["🗂️ index.md · schema.md<br/>preferences.md"]
        EMB["🧠 embeddings/<br/>*.jsonl sidecars"]
    end

    subgraph Curation ["🧹 Curation"]
        COMPILE["⚙️ memory compile<br/>(distills raw → wiki)"]
    end

    subgraph Retrieval ["🔍 Retrieval (three routes)"]
        SS["① Session-start hook<br/>(automatic push)"]
        SEARCH["② MCP memory.search<br/>(BM25 + vector + graph + RRF)"]
        GREP["③ memory grep<br/>(ripgrep over raw + wiki)"]
    end

    CC & CX & HE & PI & OCODE -->|hooks fire| H
    AG & CD & VS & OC & GPT & OCODE -->|MCP calls| MCP_IN
    H --> RAW
    MCP_IN --> RAW
    RAW --> COMPILE
    COMPILE --> WIKI
    WIKI --> IDX
    IDX --> SS
    WIKI & RAW & EMB --> SEARCH
    RAW & WIKI --> GREP
    SS -->|context injected| Tools
    SEARCH -->|ranked results| Tools
    GREP -->|matching lines| Tools

    classDef tool fill:#0284c7,stroke:#0ea5e9,stroke-width:2px,color:#fff;
    classDef capture fill:#0f766e,stroke:#14b8a6,stroke-width:2px,color:#fff;
    classDef vault fill:#4c1d95,stroke:#7c3aed,stroke-width:2px,color:#fff;
    classDef curation fill:#b45309,stroke:#f59e0b,stroke-width:2px,color:#fff;
    classDef retrieval fill:#9d174d,stroke:#db2777,stroke-width:2px,color:#fff;

    class CC,CX,AG,HE,PI,OC,CD,VS,GPT,OCODE tool;
    class H,MCP_IN capture;
    class RAW,WIKI,IDX,EMB vault;
    class COMPILE curation;
    class SS,SEARCH,GREP retrieval;

How memories reach your AI tools

%%{init: {
  'theme': 'base',
  'themeVariables': {
    'primaryColor': '#1e293b',
    'primaryTextColor': '#f8fafc',
    'primaryBorderColor': '#475569',
    'lineColor': '#38bdf8',
    'secondaryColor': '#0f172a',
    'tertiaryColor': '#1e1b4b'
  }
}}%%
flowchart LR
    subgraph V ["💾 ~/.memory/ (vault)"]
        S["📄 schema.md"]
        I["📄 index.md"]
        L["📄 log.md"]
        P["⚙️ wiki/preferences.md"]
        W["📂 wiki/projects/&lt;cwd&gt;.md"]
        WK["📚 wiki/ pages"]
        EM["🧠 embeddings/"]
        R["📝 raw/"]
    end

    subgraph Routes ["🔄 Retrieval routes"]
        R1["(1) Session-start<br/>automatic push<br/>every session"]
        R2["(2) MCP search<br/>on-demand pull<br/>BM25 + vectors + graph"]
        R3["(3) grep<br/>CLI / manual"]
    end

    subgraph AI ["🤖 AI Tool Context"]
        CTX["⚡ Session context<br/>(prompt prefix)"]
        TOOL["🔌 Agent tool call<br/>(MCP response)"]
        CLI2["💻 CLI output"]
    end

    S & I & L & P & W -->|reads on session start| R1
    WK & EM & R -->|hybrid retrieval + RRF| R2
    R & WK -->|ripgrep| R3

    R1 -->|stdout injected by tool| CTX
    R2 -->|ranked snippets| TOOL
    R3 -->|matching lines| CLI2

    classDef vault fill:#4c1d95,stroke:#7c3aed,stroke-width:2px,color:#fff;
    classDef route fill:#0f766e,stroke:#14b8a6,stroke-width:2px,color:#fff;
    classDef ai fill:#0284c7,stroke:#0ea5e9,stroke-width:2px,color:#fff;

    class S,I,L,P,W,WK,EM,R vault;
    class R1,R2,R3 route;
    class CTX,TOOL,CLI2 ai;

Route (1) fires automatically — you always get your top context injected. Routes (2) and (3) are on-demand (agent or human asks).


Supported tools

memory-fort install claude-code     # Claude Code (full hooks + plugin)
memory-fort install codex           # Codex desktop + CLI (hooks + MCP)
memory-fort install antigravity     # Google Antigravity / Gemini (MCP + live-capture plugin)
memory-fort install hermes          # Hermes agent (YAML hooks + MCP in ~/.hermes/config.yaml)
memory-fort install pi              # Pi coding agent (YAML hooks in ~/.pi/config.yaml)
memory-fort install chatgpt         # ChatGPT (HTTP/SSE bridge for ChatGPT Connectors)
memory-fort install openclaw        # OpenClaw (MCP server in ~/.openclaw/openclaw.json)
memory-fort install opencoven       # OpenCoven / CovenCave (read-only daemon readiness check)
memory-fort install opencode        # OpenCode (MCP config + selected event plugin)
memory-fort install claude-desktop  # Claude Desktop (MCP only)
memory-fort install vscode          # VS Code (MCP only)

See docs/cli.md for full CLI reference (all subcommands, flags, examples).

All installs are non-destructive and idempotent — sentinel-block writes, re-running is safe. The OpenCoven / CovenCave target is read-only: it checks the coven CLI and the local coven.daemon.v1 health contract, but does not launch sessions or write Memory Fort config. It is part of the OpenCoven family.

OpenClaw support is MCP-only in v1: the installer preserves/updates its MCP config, but it does not install passive capture hooks or automatic observation capture.

OpenCode support features MCP config wiring and selected event plugin installation for hook capture, with CLI diagnostics integration.

ChatGPT connects through an HTTP/SSE bridge server (default localhost:3100) that translates MCP stdio into HTTP Server-Sent Events, which ChatGPT's "Connectors" feature can consume. You can manage the bridge via the CLI (memory-fort chatgpt-bridge start|stop|status) or configure the port in ~/.memory/config.yaml under chatgpt.bridge_port. Autostart on Windows is supported via the HKCU Run registry key (best-effort).

# Undo any integration cleanly
memory-fort uninstall claude-code
memory-fort uninstall chatgpt
memory-fort disconnect --all

Retrieval modes

ModeNeedsWhen to use
Lexical (default)NothingDay 1, offline, private projects
Voyage embeddingsVOYAGE_API_KEYHosted semantic retrieval
OpenAI embeddingsOPENAI_API_KEYAlternative to Voyage
Ollama (local)Ollama running locallyFull local, no cloud at all

Switch any time: edit ~/.memory/config.yaml or re-run memory-fort init.

Search results include provenance receipts showing BM25, embedding, and graph signals — visible in the dashboard and MCP API.

When Voyage embeddings are enabled, Memory Fort uses contextualized text embedding: each wiki page is embedded with a graph-topology header (path, type, relations, tags, backlinks) prepended, improving recall for graph-aware queries. Enable via retrieval.embeddings.contextualized: true in config.yaml.


Evidence posture

Memory Fort avoids reproduced-score and third-party benchmark claims unless they have been reproduced locally. Vendor-reported benchmark numbers must stay labeled as vendor-reported, and public claims should point to release evidence or implemented local behavior.

Current local evidence is intentionally narrower than a benchmark claim:

AreaCurrent public claimEvidence status
Default storageMarkdown + YAML files under ~/.memory/Implemented local package behavior
Default searchLexical search works without an API keyImplemented local package behavior
Search provenanceSearch results include detailed provenance receipts showing ranking decisionsImplemented in MCP response (provenance field) and dashboard UI
Optional retrievalSemantic and graph-assisted retrieval are available when configuredLocal smoke evidence is recorded in docs/release-evidence/2026-06-06-v1.1-credibility.md
Package surfacePackage uses the files whitelist in package.jsonLocal npm pack --dry-run --json evidence is recorded in the release evidence note

Memory Fort does not currently publish a reproduced LongMemEval score or a reproduced third-party benchmark row. Use vendor benchmark numbers only as vendor-reported claims, not as Memory Fort certification.


Wiki schema

Memory Fort organizes curated knowledge by entity type:

TypeDirectoryPurpose
projectswiki/projects/Codebases and work efforts
decisionswiki/decisions/Architecture and tooling choices, with alternatives
lessonswiki/lessons/Reusable facts learned from incidents
referenceswiki/references/Papers, posts, talks
toolswiki/tools/Libraries and services
threadswiki/threads/Narrative arcs across a stretch of work
procedureswiki/procedures/Reusable step-by-step workflows

Pages link via typed graph edges (uses, depends_on, supersedes, contradicts, caused_by, fixed_by, derived_from). Plain YAML frontmatter — no database required.


Dashboard

memory-fort dashboard
# → http://127.0.0.1:4410/memory/

Built-in React dashboard:

  • Browse the wiki, search (BM25 + semantic + graph), review proposed pages, inspect graph health metrics.
  • Audit ranking decisions using search provenance receipts (expandable detail showing BM25, embedding, and graph weights).
  • Manage integrations using client toggles to enable or disable individual clients (configured via clients.* map in config.yaml, with verify checks automatically skipping disabled clients).
  • Securely manage API credentials via API key management (masked secrets fields stored outside the vault with test-then-save validation flow).
  • Check and manage the ChatGPT bridge status (verify checks: chatgpt.bridge.running and chatgpt.bridge.mcp).
  • Review lifecycle proposals (wiki/compile-proposed/) — dispute and supersede candidates staged for human review before any wiki edit.

Roadmap

  • Optional SQLite-FTS index — rebuildable cache for sub-10ms lexical search at large vault sizes
  • Community integrations — pull requests welcome; hook pattern documented in docs/architecture.md

License

Memory Fort is open source under the GNU General Public License v3.0 (GPL-3.0-only).

Commercial use is permitted under the GPLv3 terms. There is no separate commercial license requirement for this repository.

For contributors / private dev repo

After cloning, install the pre-push gate:

npm run install:dev-hooks

This gates every git push origin through scan:leaks so personal tokens can never accidentally reach the public repo.


Ver o original no GitHub

Bom para

Relacionados