벡터 데이터베이스 대신 Markdown과 YAML을 사용하여 AI 코딩 어시스턴트를 위한 파일 우선, 로컬 우선 메모리 레이어를 제공합니다.
다른 이름 elViRafa/agentic-memory, agentic-memory, memory-fabric
- 스타
- 1
- Tools
- 17
- 다운로드, 30일
- 637
- 최신 버전
- 1.4.5
- 마지막 커밋
- 2026년 11월 2일
- 라이선스
- MIT
Memory Fabric MCP란?
Memory Fabric은(는) MCP server입니다. 벡터 데이터베이스 대신 Markdown과 YAML을 사용하여 AI 코딩 어시스턴트를 위한 파일 우선, 로컬 우선 메모리 레이어를 제공합니다. 17개 도구를 제공합니다. 예: initialize_memory_fabric_tool, read_combined_context_tool, read_section_tool.
프로젝트 README에서 생성된 요약
Memory Fabric MCP server 정보
Memory Fabric는 Claude Code, Cursor, GitHub Copilot과 같은 AI 코딩 어시스턴트를 위해 설계된 로컬 우선 메모리 레이어입니다. 클라우드 계정이나 벡터 데이터베이스에 의존하는 대신, 프로젝트 내에 YAML 프론트매터가 포함된 사람이 읽을 수 있는 Markdown 파일 형태로 컨텍스트를 직접 저장합니다. 이 접근 방식은 프로젝트 지식을 검사 가능하고, 커밋할 수 있으며, 완전히 오프라인 상태로 유지할 수 있도록 보장합니다.
개발자는 Model Context Protocol을 사용하여 MCP server를 선호하는 IDE 또는 CLI에 연결할 수 있습니다. 이 시스템은 사실(fact)이 전용 디렉토리에 저장되는 store-first 아키텍처를 통해 메모리를 관리하며, architecture.md와 같은 루트 맵을 자동으로 생성합니다. 사실을 저장하기 위한 write_memory_store_tool 및 메모리 유지 관리와 통합을 수행하는 dream_tool과 같은 특화된 도구를 포함합니다. 파일 기반이므로 Git과 자연스럽게 통합되며, 브랜치 간의 메모리 충돌을 처리하기 위한 커스텀 머지 드라이버도 제공합니다.
활용 사례
- 1에피소드 메모리 캡처 자동화에이전트의 수동 개입 없이 모든 git commit을 메모리 항목으로 자동 기록합니다.
- 2높은 메모리 품질 유지저장된 메모리가 AI 어시스턴트에게 유용하고 적절한 형식으로 구성되었는지 확인하기 위해 평가를 실행합니다.
- 3파편화된 프로젝트 지식 통합Dreaming 기능을 사용하여 딥(deep) 또는 라이트(light) 유지 관리 작업을 수행하고 메모리 파일을 정리 및 조직화합니다.
- 4반복적인 에러 로그 방지특화된 도구를 사용하여 동일한 에러의 여러 인스턴스를 하나의 확장되는 기록으로 병합합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
Memory Fabric MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 Memory Fabric MCP 설치
$ claude mcp add agentic-memory -- uvx memory-fabricCursor에 Memory Fabric MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"agentic-memory": {
"command": "uvx",
"args": [
"memory-fabric"
]
}
}
}VS Code에 Memory Fabric MCP 설치
.vscode/mcp.json
{
"servers": {
"agentic-memory": {
"type": "stdio",
"command": "uvx",
"args": [
"memory-fabric"
]
}
}
}VS Code CLI에 Memory Fabric MCP 설치
$ code --add-mcp '{"name":"agentic-memory","type":"stdio","command":"uvx","args":["memory-fabric"]}'Claude Desktop에 Memory Fabric MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"agentic-memory": {
"command": "uvx",
"args": [
"memory-fabric"
]
}
}
}Codex에 Memory Fabric MCP 설치
$ codex mcp add agentic-memory -- uvx memory-fabricCodex config.toml에 Memory Fabric MCP 설치
~/.codex/config.toml
[mcp_servers.agentic-memory] command = "uvx" args = ["memory-fabric"]
Gemini CLI에 Memory Fabric MCP 설치
$ gemini mcp add -s user agentic-memory uvx -- memory-fabricGemini settings.json에 Memory Fabric MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"agentic-memory": {
"command": "uvx",
"args": [
"memory-fabric"
]
}
}
}Memory Fabric MCP 도구 17
README에서 감지됨initialize_memory_fabric_toolread_combined_context_toolread_section_toolkeyword_search_toolwrite_local_memory_toolpropose_memory_patch_tooldream_toolprepare_dream_payload_toolapply_dream_results_toolevaluate_memory_fabric_toolevaluate_dream_quality_toolwrite_memory_store_tool
| initialize_memory_fabric_tool | — | |
| read_combined_context_tool | — | |
| read_section_tool | — | |
| keyword_search_tool | — | |
| write_local_memory_tool | — | |
| propose_memory_patch_tool | — | |
| dream_tool | — | |
| prepare_dream_payload_tool | — | |
| apply_dream_results_tool | — | |
| evaluate_memory_fabric_tool | — | |
| evaluate_dream_quality_tool | — | |
| write_memory_store_tool | — |
도구 17개 모두 보기도구 수 줄이기
read_memory_store_toollist_memory_store_tooldelete_memory_store_toolwrite_session_journal_toolwrite_failure_memory_tool
| read_memory_store_tool | — | |
| list_memory_store_tool | — | |
| delete_memory_store_tool | — | |
| write_session_journal_tool | — | |
| write_failure_memory_tool | — |
자동 검사
2026년 11월 13일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능elvirafa/agentic-memory is public and reachablegithub.com/elvirafa/agentic-memory ↗통과
- 패키지가 이 저장소를 소스로 명시검사되지 않음
- 빌드 출처(Sigstore 증명)Sigstore attestation for memory-fabricpypi.org/project/memory-fabric/ ↗통과
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-11-02github.com/elvirafa/agentic-memory ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음No popular package one edit away from memory-fabric통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음1 resolved dependencies checked; no critical advisoryosv.dev ↗통과
- 모델에 대한 숨겨진 지침 없음17 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기Memory Fabric
File-first, local-first memory layer for MCP-compatible AI coding assistants.
Memory Fabric gives AI tools like Claude Code, Cursor, and GitHub Copilot a consistent, project-aware context layer without locking you into one model, editor, cloud provider, or operating system.
Memory is stored as human-readable Markdown with YAML frontmatter. No vector database. No cloud account. No embeddings required.
Features
- MCP-native: exposes memory tools through the standard Model Context Protocol
- File-first: Markdown files are the source of truth, inspectable and commit-ready
- Local-first: core reads and writes work offline
- Store-first: facts live in
memory-store/, one per file; root maps (architecture.md,decisions.md, ...) are generated views rebuilt by Dreaming, never hand-written - Captures itself: every git commit is recorded as episodic memory automatically — no agent cooperation required — via an opt-in post-commit hook
- Git-native merge: an optional custom merge driver lets two branches' memory merge as cleanly as their code, instead of conflicting on a shared timestamp line
- Self-verifying: memories can cite the file/line/commit they depend on;
ai-memory verifyflags citations that rotted - Learns from failure:
write_failure_memory_tooldeduplicates repeat occurrences of the same error into one growing record instead of scattering near-duplicates - Secret-safe: API keys and credentials are redacted before writing
- Token-budget aware: assembles context within limits; never slices files mid-document
- Quality eval: scores memory usefulness and Dreaming before/after results locally
- Unicode-safe: works with any human language
- Graceful degradation: works without
rg, git hooks, or Dreaming configured
Status
v1.4.5 — field diary pack/analyze and live posture pinning.
Live on PyPI.
Core CLI and MCP tools work end-to-end. See ROADMAP.md for what
shipped, what's in progress, and what's next.
Demo

The CLI and self-capture flow: initialize a project, write a memory as a plain
Markdown file in your repo, and watch a git commit record itself as episodic
memory with no agent cooperation. The cross-tool moment — an agent writes memory
in one tool and a different tool reads it back — is storyboarded in
DEMO.md for the full video.
Privacy — no telemetry
Memory Fabric never sends data anywhere. There is no account, no cloud, no
analytics, no phone-home. The core read and write paths make no network calls at
all; the only optional network requests are a PyPI version-drift check and an
LLM-provider preflight, both of which you can turn off with --offline. Your
memory is plain Markdown in your own git history — it never leaves your machine
unless you push it.
An optional, off-by-default field diary can record operational counts on
your machine after you run ai-memory diary approve. That is not the session
journal, and it is not telemetry: nothing is transmitted. MEMORY_FABRIC_DIARY=0
is a kill switch. ai-memory diary pack builds a shareable folder under the
app data field-packs/ directory (Windows: %APPDATA%/memory-fabric/field-packs/);
you copy that folder yourself. ai-memory diary analyze scores product signals
from a pack or the local diary. This is a deliberate guarantee, not a default
we might change.
Installation
From PyPI (recommended)
Requires Python ≥ 3.11.
pipx install memory-fabric # CLI only
pipx install "memory-fabric[mcp]" # CLI + MCP server
Or with plain pip (inside a virtual environment):
pip install memory-fabric # CLI only
pip install "memory-fabric[mcp]" # CLI + MCP server
Zero-install one-off run (requires uv):
uvx --from "memory-fabric[mcp]" memory-fabric-mcp # starts the MCP server on stdio
From GitHub (latest, pre-release)
# CLI only
pipx install "git+https://github.com/elViRafa/agentic-memory.git"
# CLI + MCP server
pipx install "memory-fabric[mcp] @ git+https://github.com/elViRafa/agentic-memory.git"
Or with plain pip (inside a virtual environment):
pip install "git+https://github.com/elViRafa/agentic-memory.git" # CLI only
pip install "memory-fabric[mcp] @ git+https://github.com/elViRafa/agentic-memory.git" # + MCP
Upgrading
Because Memory Fabric is in active development, we recommend upgrading regularly:
-
Upgrade the Package:
# If installed via pipx: pipx upgrade memory-fabric # If installed in a virtual environment via pip: pip install --upgrade "memory-fabric[mcp]" # If installed from GitHub (pre-release): pipx install --force "memory-fabric[mcp] @ git+https://github.com/elViRafa/agentic-memory.git" -
Refresh the MCP client config (uvx installs): If your client config launches the server via
uvx(the default written by olderai-memory installruns), uv serves the build it cached the first time and never re-resolves an unpinned spec — restarting the client is not enough and can leave the server several releases behind without any signal. After upgrading, either:# Re-write the client config (now pins the exact installed version, or points # at the local memory-fabric-mcp binary when one sits next to the CLI): ai-memory install --client <your-client> --project # ...or drop the stale cached build so uvx re-resolves: uv cache clean memory-fabricai-memory doctorwarns when the local version drifts from the latest on PyPI or when a differentai-memoryinstallation shadows this one on PATH. -
Restart MCP Clients: After upgrading, restart your IDE (Cursor, VS Code) or assistant process (Claude Code) to ensure the client reloads the updated
memory-fabric-mcpserver. -
Refresh Local Projects (Optional): If you have projects initialized with older versions of Memory Fabric, navigate to the project directory and run:
ai-memory init --install-hooksThis will safely refresh starter templates and local git hook integration to the latest format without overwriting your existing memory markdown files.
Windows terminals: the CLI emits UTF-8 (memory content legitimately contains em-dashes and bullets). Windows Terminal and PowerShell 7 render it out of the box; on legacy consoles (PowerShell 5.1 with an OEM code page) set
chcp 65001orPYTHONUTF8=1if you see replacement characters.
Or clone and install in editable mode for local development:
git clone https://github.com/elViRafa/agentic-memory.git
cd agentic-memory
pip install -e . # CLI only
pip install -e ".[mcp]" # CLI + MCP server
Quick Start
1. Initialize a project
ai-memory init
Creates .ai-memory/ in the current directory with starter sections and a .gitignore.
2. Check health
ai-memory doctor
3. Evaluate memory quality
ai-memory eval
ai-memory eval --json
eval scores whether memories are useful for coding assistants. It checks section coverage, starter-template content, summary quality, metadata, retrieval readiness, and likely secrets.
If .ai-memory/ exists, reports are saved under ignored local files:
.ai-memory/evals/latest.json
.ai-memory/evals/latest.md
.ai-memory/evals/<timestamp>-memory.json
.ai-memory/evals/<timestamp>-memory.md
If .ai-memory/ does not exist yet, eval prints a pre-init report only and creates no files.
4. Query memory
ai-memory query "authentication"
5. Run maintenance (Dreaming)
ai-memory dream --mode light
ai-memory dream --mode deep
Dreaming creates a snapshot before maintenance. You can evaluate whether a Dreaming run improved memory quality:
ai-memory eval --dream latest
ai-memory dream --mode light --eval
Dream eval compares the pre-dream snapshot to current memory and reports score delta, changed files, improvements, and regressions.
MCP Server — Install
One command per client. Safe to re-run: merges with your existing config, never overwrites it, and backs up the original file if it can't be parsed.
One-click install
These call uvx --from "memory-fabric[mcp]" memory-fabric-mcp under the hood — same
canonical invocation as ai-memory install, just without the CLI step. Requires
uv.
| Client | Command |
|---|---|
| Claude Code | ai-memory install --client claude-code |
| Claude Desktop | ai-memory install --client claude-desktop |
| VS Code | ai-memory install --client vscode |
| Cursor | ai-memory install --client cursor |
| Windsurf | ai-memory install --client windsurf |
| Codex | ai-memory install --client codex |
| Antigravity | ai-memory install --client antigravity |
| Gemini CLI | ai-memory install --client gemini-cli |
| Cline | ai-memory install --client cline |
| All detected clients | ai-memory install --client all |
Add --project to write project-scoped config instead of the global/user config
(where the client supports it). Add --dry-run to preview the change as a unified
diff without writing anything. Add --uninstall to remove only the memory-fabric
entry, leaving everything else in the file untouched.
Available MCP Tools
| Tool | Description |
|---|---|
initialize_memory_fabric_tool |
Create .ai-memory/ scaffolding in a project |
read_combined_context_tool |
Load Tier 0 directives + prioritized memory within token budget |
read_section_tool |
Read a single memory section by name |
keyword_search_tool |
Search memory with ripgrep or Python fallback |
write_local_memory_tool |
Update steering sections (framework-rules, ubiquitous-language) only. Writing facts or root maps is rejected (store-first) — root maps are generated from memory-store/; use write_memory_store_tool |
propose_memory_patch_tool |
Preview proposed memory changes without applying |
dream_tool |
Run memory maintenance / consolidation (--mode light |
prepare_dream_payload_tool |
Prepare candidate snapshot and return consolidation prompt for client-driven dreaming |
apply_dream_results_tool |
Apply LLM consolidated JSON output to candidate snapshot and save changes |
evaluate_memory_fabric_tool |
Evaluate local memory quality |
evaluate_dream_quality_tool |
Evaluate a Dreaming run against a snapshot |
write_memory_store_tool |
Write a memory file to a semantic store path (e.g. architecture/decisions/auth); accepts an optional evidence citation list |
read_memory_store_tool |
Read a single memory-store file by its semantic path |
list_memory_store_tool |
List files in the memory store, optionally filtered by prefix/tags |
delete_memory_store_tool |
Remove a memory-store file by its semantic path |
write_session_journal_tool |
Append a timestamped session journal entry (episodic memory) |
write_failure_memory_tool |
Record an error → fix pair; repeat occurrences of the same error accumulate onto one entry |
Agentic Architecture (making agents use Memory Fabric automatically)
Registering the MCP server is necessary but not sufficient — AI agents will not use its tools unless explicitly instructed to do so.
Memory Fabric provides an automated Agentic Architecture to handle this for you.
When you run ai-memory init in your project, the CLI automatically deploys a complete suite of agent instruction files tailored for every major AI tool:
| Target | File(s) Created |
|---|---|
| Gemini CLI / Codex / Antigravity | AGENTS.md |
| Grok (TUI / Build / Agent harness) | AGENTS.md (primary project rules); full docs + MCP registration in ~/.grok/config.toml or .mcp.json; see also .grok/docs/user-guide/13-memory-fabric.md when installed for the client |
| Cursor IDE | .cursor/rules/memory-fabric.mdc |
| Windsurf IDE | .windsurf/rules/memory-fabric.md |
| Cline / Generic IDE Agents | .agents/rules/memory-store.md, .agents/rules/dreaming.md |
| Claude Code | CLAUDE.md (created or appended) |
| GitHub Copilot | .github/copilot-instructions.md (created or appended) |
Single Source of Truth (Syncing)
All these files are generated from two canonical content blocks inside the Memory Fabric Python package. Running ai-memory sync-agents regenerates every platform file from these templates, guaranteeing perfect consistency. If you used ai-memory init --install-hooks, a pre-commit git hook runs this sync automatically on every commit.
In the shared user files (AGENTS.md, CLAUDE.md, .github/copilot-instructions.md) the fabric content lives inside managed marker blocks (<!-- >>> memory-fabric:… >>> --> … <!-- <<< memory-fabric:… <<< -->); sync only ever rewrites content between the markers, so anything you add outside them is preserved byte-for-byte.
Project Directives (v1.1)
Beyond the package's own protocol instructions, you can define project directives — hand-curated development guidelines shared by every AI agent working on the repo. A directive is simply a root section file .ai-memory/<name>.md with role: steering frontmatter (like the built-ins framework-rules and ubiquitous-language), plus two optional boolean routing keys:
| Key | Meaning | Default |
|---|---|---|
sync |
include the directive in the per-tool files generated by sync-agents |
true |
context |
inject the directive as Tier 0 into read_combined_context |
true for the built-ins; false for user directives (file-reading agents already get the synced copy) |
ai-memory sync-agents composes every sync: true steering section into one project-directives document and distributes it as .agents/rules/project-directives.md, .cursor/rules/project-directives.mdc, .windsurf/rules/project-directives.md, and a managed marker block in AGENTS.md/CLAUDE.md/.github/copilot-instructions.md — so AGENTS.md-only readers (Codex, OpenCode, Gemini) receive them too. Deleting the last synced directive tears all of that down again.
For CI, ai-memory sync-agents --check is a drift gate: it writes nothing and exits 1 when any generated file is out of date. ai-memory doctor additionally warns when the always-loaded context surface exceeds its token budget (default 3000, MEMORY_FABRIC_DIRECTIVE_BUDGET), when a hand-edited steering file contains something that looks like a secret, and when a stale pre-1.1 fabric block sits outside the managed markers.
For full details on the architecture, see AGENTIC_ARCHITECTURE.md.
Why this matters
Without these instruction files, agents will often explain they "don't use MCP tools automatically," or worse, they will write memory markdown files directly using native file-system tools—bypassing secret scanning, token budgeting, and background Dreaming management.
By simply running ai-memory init, you get zero-configuration, plug-and-play capability across the entire agent ecosystem.
Using Memory Fabric in Other Projects
You can use a single installed instance of Memory Fabric across all your coding projects:
-
Scaffold the target project: Navigate to your target project's root folder and initialize it:
cd /path/to/other-project ai-memory init --install-hooksThis automatically creates
.ai-memory/, deploys the Agentic Architecture rule files, sets up.gitignore, and installs the git post-commit hooks. -
Global MCP Configuration: Verify your AI assistant's configuration points to your globally installed
memory-fabric-mcpexecutable. The MCP tools automatically parse and use the active project's path passed by the assistant as thecwdargument, enabling a single global MCP server registration to support all your local workspaces.
Project Memory Layout
Memory Fabric is store-first: memory-store/ is the only place agents write facts by
hand, one fact per file. The root map files (architecture.md, decisions.md, debt.md,
schemas.md, index.md) are generated views rebuilt by Dreaming from their matching
memory-store/<category>/ subtree — never edit them directly, they carry generated: true
frontmatter and a hand edit gets folded back into the store for review on the next Dream.
The exception is the steering tier: any root section with role: steering frontmatter
(the built-ins framework-rules.md and ubiquitous-language.md, plus any project
directives you create) is hand-curated — humans and agents may edit these files directly
(review via MR). The built-ins are always loaded into context in full, never generated
and never evicted by the token budget; user directives default to context: false and
reach agents through the sync-agents per-tool files instead.
.ai-memory/
|-- index.md # generated discovery index
|-- architecture.md # generated map of memory-store/architecture/
|-- schemas.md # generated map of memory-store/schemas/
|-- decisions.md # generated map of memory-store/decisions/
|-- debt.md # generated map of memory-store/debt/
|-- ubiquitous-language.md # hand-curated steering directive (always loaded)
|-- framework-rules.md # hand-curated steering directive (always loaded)
|-- memory-store/ # the source of truth — one fact per file
| |-- index.md # generated store-wide index
| |-- architecture/...
| |-- decisions/...
| |-- debt/...
| |-- schemas/...
| |-- failures/<slug>.md # error -> fix pairs, deduplicated by normalized signature
| |-- episodic/<date>.md # agent-written session journals
| `-- episodic/commits/<date>/<short-hash>.md # one passively captured commit each
|-- evals/ # ignored local quality reports
|-- snapshots/ # ignored rollback baselines
|-- private/ # ignored personal notes + session markers
`-- .gitignore
All memory files use YAML frontmatter:
---
store_path: architecture/decisions/auth-service
summary: "One-line fallback used when the file exceeds the token budget."
priority: high
tags: [api, auth]
schema_version: "1.3"
last_updated: 2026-06-01T12:00:00-04:00
evidence: [src/auth.py:42, "commit:abc1234"]
---
Your memory content here.
The optional evidence field lets a memory cite what it depends on — a file, a
file:line, or a commit:<hash>. Run ai-memory verify to check those citations still
resolve; a memory citing a file that was renamed or deleted gets flagged instead of
quietly rotting.
Memory Fabric MCP 질문
Memory Fabric MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add agentic-memory -- uvx memory-fabric를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
Memory Fabric MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
Memory Fabric MCP는 어떤 도구를 제공하나요?
17개 도구를 제공합니다. 예: initialize_memory_fabric_tool, read_combined_context_tool, read_section_tool, keyword_search_tool, write_local_memory_tool.
Memory Fabric는 벡터 데이터베이스가 필요한가요?
아니요, 벡터 데이터베이스나 임베딩 대신 YAML 프론트매터가 포함된 사람이 읽을 수 있는 Markdown을 사용합니다.
데이터가 클라우드로 전송되나요?
아니요, Memory Fabric는 로컬 우선 방식이며 데이터를 클라우드, 계정 또는 분석 서비스로 전송하지 않습니다.
git commit은 어떻게 처리하나요?
선택 사항인 post-commit hook을 통해 모든 git commit을 에피소드 메모리로 자동 기록할 수 있습니다.