코딩 에이전트를 위해 공유 컨텍스트를 정리, 중복 제거 및 보안 처리하는 로컬 우선 거버넌스 메모리 백엔드를 제공합니다.
다른 이름 irisxc4/memoryguard, agent-memguard
- 스타
- 4
- Tools
- —
- 다운로드, 30일
- 1,082
- 최신 버전
- 0.7.12
- 마지막 커밋
- 2026년 9월 30일
- 라이선스
- MIT
MemoryGuard MCP란?
MemoryGuard은(는) MCP server입니다. 코딩 에이전트를 위해 공유 컨텍스트를 정리, 중복 제거 및 보안 처리하는 로컬 우선 거버넌스 메모리 백엔드를 제공합니다.
프로젝트 README에서 생성된 요약
MemoryGuard MCP server 정보
MemoryGuard는 코딩 에이전트가 공유 컨텍스트를 관리할 수 있도록 설계된 로컬 우선 메모리 백엔드를 제공합니다. 에이전트와 메모리 사이에서 거버넌스 계층 역할을 수행하여 중복되거나 오래된 정보, 또는 모순된 정보가 쌓이는 것을 방지합니다. 모든 쓰기 작업을 정리함으로써 원격 서버나 외부 계정 없이도 공유 컨텍스트를 안전하고 유용하게 유지합니다.
개발자는 MCP stdio 또는 라이프사이클 훅을 통해 Claude Code, Cursor, Trae, Codex를 포함한 다양한 코딩 호스트에 이 서버를 통합할 수 있습니다. 아키텍처는 SQLite 도메인을 사용하여 메모리, 규칙, 근거 및 콘텐츠를 관리된 경계로 분리합니다. 점진적인 프로젝트 새로고침을 위한 CodeGraph 자동화와 인간의 감독을 위한 데스크톱 거버넌스 콘솔과 같은 특화된 기능을 포함합니다. 로컬 전용 방식이므로 원시 대화 기록을 향후 에이전트 컨텍스트로 유출하는 대신 격리된 아카이브에 보관하여 개인정보 보호를 최우선으로 합니다.
활용 사례
- 1컨텍스트 중복 방지AI 에이전트가 공유 메모리에 기록을 남기면 시스템이 자동으로 항목을 분류하고 중복을 제거합니다.
- 2민감 정보 보안시스템이 민감한 콘텐츠를 식별하고 격리하여 활성 메모리에서 사용되지 않도록 방지합니다.
- 3감사 추적 유지개발자는 보존된 근거 체인을 검토하여 특정 변경 사항이 왜 발생했는지 추적할 수 있습니다.
- 4프로젝트 인덱싱 자동화서버가 CodeGraph를 자동으로 구축하여 에이전트가 프로젝트 심볼과 파일 관계를 탐색할 수 있도록 돕습니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
MemoryGuard MCP 설치 방법
형식 확인: 2026년 11월 10일Claude Code에 MemoryGuard MCP 설치
$ claude mcp add memoryguard -- uvx agent-memguardCursor에 MemoryGuard MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"memoryguard": {
"command": "uvx",
"args": [
"agent-memguard"
]
}
}
}VS Code에 MemoryGuard MCP 설치
.vscode/mcp.json
{
"servers": {
"memoryguard": {
"type": "stdio",
"command": "uvx",
"args": [
"agent-memguard"
]
}
}
}Claude Desktop에 MemoryGuard MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"memoryguard": {
"command": "uvx",
"args": [
"agent-memguard"
]
}
}
}Codex에 MemoryGuard MCP 설치
~/.codex/config.toml
[mcp_servers.memoryguard] command = "uvx" args = ["agent-memguard"]
Gemini CLI에 MemoryGuard MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"memoryguard": {
"command": "uvx",
"args": [
"agent-memguard"
]
}
}
}자동 검사
2026년 11월 13일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능irisxc4/memoryguard is public and reachablegithub.com/irisxc4/memoryguard ↗통과
- 패키지가 이 저장소를 소스로 지정agent-memguard names irisxc4/memoryguard as sourcepypi.org/project/agent-memguard/ ↗통과
- 빌드 출처(Sigstore 증명)Sigstore attestation for agent-memguardpypi.org/project/agent-memguard/ ↗통과
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-09-30github.com/irisxc4/memoryguard ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음No popular package one edit away from agent-memguard통과
- 패키지와 의존성에 심각한 보안 권고 없음26 resolved dependencies checked; no critical advisoryosv.dev ↗통과
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 endpoint가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기Let agents write without turning shared memory into an unreviewed pile. MemoryGuard organizes each write, preserves the evidence behind changes, and keeps governance decisions reversible.
No account. No remote server. No remote telemetry. Local-only usage telemetry is optional and stores bounded, privacy-preserving aggregates locally.
What's New in v0.7.15
- Automatic CodeGraph builds: Trusted bootstrap starts a project's first build in a background process. Default and per-project switches persist; disabling automation preserves the graph. Supported file-write events trigger incremental refresh.
- Clear graph navigation: Switch between a file overview and symbols, filter by file, inspect neighboring relations, and use zoom controls.
- Bounded temporary storage: Ordinary graph queries read SQLite directly instead of retaining full-database copies. Validation and installation temporary files use the owning project/deployment cache and are cleaned up when the operation ends.
See the v0.7.15 release note and CodeGraph automation details. Reconnect or restart hosts after upgrading and repairing their provider integration.
Earlier governance improvements
v0.7.13 strengthens mandatory-rule replacement and recovery, improves audience-aware identity handling, and improves conflict resolution:
- Safe mandatory-rule replacement: Replacements validate the final mandatory package against audience matching, canonical rules, deduplication, sensitivity checks, and publication budgets. Equivalent unlocked predecessors retire in the same transaction; failed validation rolls back the complete update. See the replacement and recovery details.
- Native Agent/group audience matching: Matching and deduplication no longer split the same native audience solely by provider or runtime role. Distinct Agent identities remain separate, and project-scoped audiences retain their project boundaries. Provider repair uses the verified identity for its target provider.
- Readable, atomic conflict resolution: Conflict views preserve readable peer information, and resolution keeps peer groups intact while applying the selected changes atomically. Ambiguous conflicts remain unresolved.
- Cursor Hook protection: Cursor MemoryGuard Hooks now use a 30-second
timeout, up from 15 seconds, with
failClosed: true.
v0.7.14 only corrects release metadata for the GitHub repository rename; it does not change runtime behavior. See the v0.7.14 release note.
See the v0.7.13 release note and release history.
Earlier release details are kept in the Changelog and GitHub release records.
Token evidence and demo
Usage events distinguish measured_cached_input from
measured_cache_write_input. measured_cache_coverage.cache_read and
cache_write report complete, partial, or unavailable; measured zero
remains 0, while missing provider data remains None/unavailable.
Character-based estimates remain explicitly labelled
estimated mg_deterministic_unit, never provider tokens.
Run the benchmark only against an authorized local workspace:
python scripts/benchmark_usage_telemetry.py --workspace . --window-days 7 --sync
Read the benchmark guide for measured, estimated, derived, and unsupported semantics. Use the demo recording checklist for a sanitized walkthrough. The repository's synthetic graph artwork is not a live product capture; it is not evidence of usage or savings.
Major V2 refactor in v0.6.0
v0.6.0 was a production data-plane refactor, not a storage-only upgrade:
- Authoritative V2 domains: Memory, Rules, Evidence, Content, Runtime, Projection, Assets, CodeGraph, Skills, and System state are separated into explicit SQLite domains with governed boundaries.
- Explicit cutover:
V1_ACTIVE → V2_BUILDING → V2_READY → V2_ACTIVEis fail-closed; V2 never silently falls back to legacy stores or dual-writes after READY/ACTIVE. - Lossless migration: frozen-source preparation uses coherent SQLite online backups, validates source/target evidence, rechecks live-source drift, and preserves V1 data plus migration backups for rollback.
- Native routing: MCP, CLI, GUI, and Hook surfaces are classified explicitly; the release closed the 233-surface cutover with 138 implemented routes, 95 retired routes, and zero neutral/blocker routes.
- Governed intelligence: Rule lifecycle and RuleMerge, extraction/enrichment, External MCP import, provider control-plane, conversation history, Knowledge Library, and GUI governance all use the V2 evidence and decision paths.
- Operational evidence: Reference Audit, per-domain SQLite health, guarded maintenance, rollback evidence, and safe unbound diagnostics are part of readiness and operations.
Why MemoryGuard
Persistent memory solves storage. It does not solve governance.
When several coding agents write into the same context, records become duplicated, stale, contradictory, over-broad, or unsafe to reuse. MemoryGuard sits between coding agents and their shared memory to keep that context usable.
| Without governance | With MemoryGuard |
|---|---|
| Notes accumulate without a canonical state | Writes are classified, deduplicated, superseded, or surfaced as conflicts |
| A correction silently destroys the old value | Evidence and supersede chains preserve what changed and why |
| Tokens and credentials can remain active | Sensitive-looking content is quarantined from active memory |
| Every write needs manual approval | Agents write normally; people review exceptions and outcomes |
| Raw chat logs leak into future context | Conversation history remains a separate, explicitly read evidence archive |
System architecture
%%{init: {"theme":"base","themeVariables":{"background":"#071521","fontFamily":"Arial, sans-serif","fontSize":"14px","primaryTextColor":"#EEF4F8","lineColor":"#557287","edgeLabelBackground":"#071521","clusterBkg":"#0A1A29","clusterBorder":"#27445A"},"flowchart":{"htmlLabels":true,"curve":"basis","nodeSpacing":32,"rankSpacing":48,"padding":14}}}%%
flowchart TB
Hosts["CODING-AGENT HOSTS<br/>Claude Code · Codex · Cursor · TRAE "]:::host
Gateway["LOCAL INTEGRATION<br/>MCP stdio · redirect rules · lifecycle hooks "]:::gateway
subgraph Core["GOVERNANCE CORE "]
direction LR
Identity["TRUST<br/>identity · scope "]:::core
MemoryAPI["MEMORY<br/>governed I/O "]:::active
Rules["RULES<br/>scope · assignment "]:::rule
HistoryAPI["HISTORY<br/>search · timeline "]:::history
Security["SAFETY<br/>validate · quarantine "]:::danger
Identity --> MemoryAPI
Identity --> Rules
Identity --> HistoryAPI
MemoryAPI --> Security
end
subgraph Stores["LOCAL GOVERNED STORES "]
direction LR
SharedDB[("V2 DOMAIN STORES<br/>Memory · Rules · Evidence · Content ")]:::store
HistoryDB[("HISTORY STORE<br/>isolated conversations ")]:::historyStore
AuditDB[("RECOVERY STORE<br/>versions · receipts · backups ")]:::store
end
Bootstrap["BOUNDED CONTEXT BOOTSTRAP<br/>mandatory rule pack · relevant recall "]:::bootstrap
Control["HUMAN CONTROL<br/>CLI · desktop governance console "]:::surface
Hosts --> Gateway --> Identity
MemoryAPI --> SharedDB
Rules --> SharedDB
HistoryAPI --> HistoryDB
Security --> AuditDB
SharedDB --> Bootstrap
Control --> Identity
classDef host fill:#12243A,stroke:#38D5C8,color:#EEF4F8,stroke-width:1.4px;
classDef gateway fill:#0D3338,stroke:#38D5C8,color:#EEF4F8,stroke-width:2.4px;
classDef core fill:#12243A,stroke:#557287,color:#EEF4F8,stroke-width:1.4px;
classDef active fill:#0D383A,stroke:#38D5C8,color:#EEF4F8,stroke-width:2px;
classDef rule fill:#3B2C18,stroke:#F3B562,color:#EEF4F8,stroke-width:1.8px;
classDef history fill:#102F45,stroke:#73C7F5,color:#EEF4F8,stroke-width:1.8px;
classDef danger fill:#3A2028,stroke:#EA6A6A,color:#EEF4F8,stroke-width:1.8px;
classDef bootstrap fill:#EEF4F8,stroke:#38D5C8,color:#071521,stroke-width:2.4px;
classDef store fill:#0B1624,stroke:#7F96A8,color:#EEF4F8,stroke-width:1.4px;
classDef historyStore fill:#102436,stroke:#73C7F5,color:#EEF4F8,stroke-width:1.4px;
classDef surface fill:#EEF4F8,stroke:#38D5C8,color:#071521,stroke-width:2px;
style Core fill:#081827,stroke:#27445A,stroke-width:1px,color:#EEF4F8
style Stores fill:#081827,stroke:#27445A,stroke-width:1px,color:#EEF4F8
linkStyle default stroke:#557287,stroke-width:1.4px;
Quick start
MCP Registry metadata
This package exposes a local stdio MCP server as io.github.MerakOsiris/memoryguard.
Registry metadata is kept in server.json, and the marker above
ships with the PyPI package README. Releases are published through GitHub OIDC
to PyPI and the official MCP Registry. Verify the current package version and
the Registry entry's active/latest state through their live public records.
1. Install
python -m pip install agent-memguard
For the desktop governance console:
python -m pip install "agent-memguard[gui]"
2. Authorize the current project
memoryguard source add .
3. Connect or repair your coding agent
Global provider configuration is rebuilt from the real binding in the canonical user data home. The command is idempotent and removes superseded MemoryGuard project-level overrides after a successful global takeover.
# Repair one provider
memoryguard provider repair claude
memoryguard provider repair codex
memoryguard provider repair cursor
memoryguard provider repair trae
# Repair every detected provider
memoryguard provider repair all
Restart the host after installation, then verify the integration:
memoryguard doctor
memoryguard mcp-status
memoryguard hooks status --provider all
Launch the desktop console:
memoryguard gui
memoryguard-gui . remains available for desktop shortcuts. A bare
memoryguard gui always opens the canonical user-level control directory
(default %LOCALAPPDATA%\MemoryGuard on Windows), so running it from a project
or from C:\Windows\System32 cannot silently switch databases.
MEMORYGUARD_WORKSPACE is an explicit operator override; an explicit
memoryguard gui <project-path> or memoryguard gui --workspace <project-path>
selects a specific workspace.
It does not remember a previously selected project or open a folder picker.
On Windows, memoryguard gui detaches the native window from the terminal, so
closing PowerShell does not close the GUI.
Provider-specific setup and behavior:
Stable Codex / Router binding
Codex/Router binds MemoryGuard to the stable local Codex program and control installation. An account profile is an endpoint/alias, not a new memory owner: switching profiles automatically discovers or repairs the profile and reuses the verified Agent binding and active group. Request identity remains fail-closed; this does not share records across machines or with arbitrary accounts.
Upgrade
MemoryGuard currently upgrades through Python's package manager:
python -m pip install --upgrade agent-memguard
memoryguard --version
memoryguard doctor
If you installed the GUI extra, keep it during the upgrade:
python -m pip install --upgrade "agent-memguard[gui]"
There is no package self-update command. The package manager is the
authoritative package-upgrade path; memoryguard upgrade below is the explicit
workspace migration flow, not a package updater.
Upgrade an existing V1 data home
Upgrade the package, then run the verified migration. No workspace, data-home, apply, or confirmation arguments are required for the normal user-level data home:
python -m pip install --upgrade agent-memguard
memoryguard --version # confirms installed version
memoryguard upgrade
memoryguard doctor
The command prepares V2, validates the frozen and live source evidence,
migrates Agent/Group control, activates only after all gates pass, and removes
only the backup batch belonging to that successful migration. Re-running it on
V2_ACTIVE is idempotent. For a zero-write report, use:
memoryguard upgrade --preview
Advanced explicit workspace/data-home options remain available for operators managing an isolated installation. A failed gate stays non-active and preserves its evidence; successful activation does not keep a redundant migration backup.
Existing pre-V2 workspaces: explicit V2 cutover
v0.6.0 never auto-activates an existing workspace. Upgrade the package first, then use the packaged operator CLI:
# Read-only manifest status
memoryguard-v2 status -w .
# Build a frozen-source V2 shadow and stop at V2_READY
memoryguard-v2 prepare -w . --apply
# Activate only after the prepare result is V2_READY / ready=true
memoryguard-v2 activate -w . --confirm V2_ACTIVE
The prepare step uses coherent SQLite online backups, preserves V1 and
migration-backups, and rechecks live-source drift before READY. Activation
performs another fresh drift check before changing the manifest. Do not delete
legacy V1 data or migration backups as part of the upgrade.
Knowledge Library
The desktop console can turn a selected folder or file set into one governed local knowledge library. Source files remain where they are; MemoryGuard stores the searchable index in its user data home instead of copying a runtime database into every source project. Knowledge metadata never becomes a second source-body store.
| Capability | Current behavior |
|---|---|
| File/folder ingestion | Add a folder as a book or selected files as documents |
| Structure | Parse documents, preserve chapter/section context, and create traceable chunks |
| Retrieval | Full-text search, optional embeddings, and a layered knowledge graph |
| Natural synchronization | Re-ingest changed files; a partial or failed scan does not silently remove previously indexed content |
| Lifecycle | Move a book to the library trash, restore it, or explicitly purge its recovery snapshot |
| Memory candidates | Preview evidence-backed candidates before accepting them into governed long-term memory |
Open the desktop console and choose Knowledge Library. Remote embedding or model-backed indexing is opt-in and requires explicit authorization; local full-text retrieval remains available without sending source text to a remote provider. Background imports, re-ingests, and smart rebuilds have durable task receipts: retrying the same request reuses its task, while reusing that key for a different request is rejected. A live task for a different request reports busy rather than claiming that work was accepted.
CodeGraph refresh
The first CodeGraph build is an explicit, confirmed full build. After a scope
has been built, each successful trusted file write can trigger an incremental
refresh for that scope, subject to strict source-path and active-binding
validation. Unchanged content hashes are a no-op; deleted files are retired;
the next context receives one bounded affected receipt. MemoryGuard does not
run a daemon or watcher for this path and does not infer paths from shell or
free-form text. A projectless MCP caller first builds an already-bound directory
source, then passes its codegraph_source_id to select that exact scope for
query, status, update, and graph reads.
Desktop console surfaces
The GUI has eight visible navigation entries: seven governance pages plus a separate Token usage-and-savings view:
- Governance Overview
- Data Sources & Agents
- Memory Core
- CodeGraph
- Rules & Habits
- Conversation History
- Risk Signals & Governance Console
- Token Usage & Savings (separate from the seven governance pages)
Agent lists use readable program/provider names; the underlying ID remains available in the detail view. Empty data is shown as an explicit empty state.
Write and governance lifecycle
%%{init: {"theme":"base","themeVariables":{"background":"#071521","fontFamily":"Arial, sans-serif","fontSize":"14px","primaryTextColor":"#EEF4F8","lineColor":"#557287","edgeLabelBackground":"#071521","clusterBkg":"#0A1A29","clusterBorder":"#27445A"},"flowchart":{"htmlLabels":true,"curve":"basis","nodeSpacing":30,"rankSpacing":42,"padding":14}}}%%
flowchart TD
subgraph Intake["01 · INTAKE "]
direction LR
Write(["Memory write "]):::entry
Scope["Resolve identity<br/>scope · audience "]:::core
Validate{"Authorized? "}:::decision
Reject["Reject<br/>no persistence "]:::danger
Write --> Scope --> Validate
Validate -- NO --> Reject
end
subgraph Organize["02 · ORGANIZE "]
direction TB
Secret{"Sensitive? "}:::decision
Quarantine["Quarantine<br/>outside active set "]:::danger
Compare["Classify · compare<br/>governed records "]:::active
Relation{"Relationship "}:::decision
New["NEW<br/>create active record "]:::result
Duplicate["DUPLICATE<br/>merge provenance "]:::result
Correction["CORRECTION<br/>supersede old record "]:::rule
Conflict["CONFLICT<br/>preserve both sides "]:::danger
Secret -- YES --> Quarantine
Secret -- NO --> Compare --> Relation
Relation --> New
Relation --> Duplicate
Relation --> Correction
Relation --> Conflict
end
subgraph Govern["03 · GOVERN "]
direction LR
Receipt[("Evidence event<br/>version receipt ")]:::store
Review["CLI or desktop review "]:::surface
Action["Correct · merge<br/>restore · delete "]:::rule
Snapshot["Reversible<br/>snapshot "]:::active
Receipt --> Review --> Action --> Snapshot
end
Validate -- YES --> Secret
Quarantine --> Receipt
New --> Receipt
Duplicate --> Receipt
Correction --> Receipt
Conflict --> Receipt
classDef entry fill:#EEF4F8,stroke:#38D5C8,color:#071521,stroke-width:2.4px;
classDef core fill:#12243A,stroke:#557287,color:#EEF4F8,stroke-width:1.5px;
classDef decision fill:#0D3338,stroke:#38D5C8,color:#EEF4F8,stroke-width:2px;
classDef active fill:#0D383A,stroke:#38D5C8,color:#EEF4F8,stroke-width:2px;
classDef result fill:#12243A,stroke:#38D5C8,color:#EEF4F8,stroke-width:1.6px;
classDef rule fill:#3B2C18,stroke:#F3B562,color:#EEF4F8,stroke-width:1.8px;
classDef danger fill:#3A2028,stroke:#EA6A6A,color:#EEF4F8,stroke-width:1.8px;
classDef store fill:#0B1624,stroke:#7F96A8,color:#EEF4F8,stroke-width:1.4px;
classDef surface fill:#EEF4F8,stroke:#38D5C8,color:#071521,stroke-width:2px;
style Intake fill:#081827,stroke:#27445A,stroke-width:1px,color:#EEF4F8
style Organize fill:#081827,stroke:#27445A,stroke-width:1px,color:#EEF4F8
style Govern fill:#081827,stroke:#27445A,stroke-width:1px,color:#EEF4F8
linkStyle default stroke:#557287,stroke-width:1.4px;
The console is not an approval queue. Agents keep moving. MemoryGuard records the outcome and exposes the evidence needed to correct it later.
What you can govern
| Signal | Governance action |
|---|---|
| Duplicate or stale memory | Inspect the canonical record and supersede chain; restore an earlier version when needed |
| Conflicting memories | Keep both visible until the conflict is resolved deliberately |
| Secrets, tokens, or credentials | Quarantine the record so it cannot enter active shared memory |
| Incorrect automatic organization | Correct, merge, lock, restore, or roll back with evidence |
| Multiple coding agents | Bind agents to one shared group while preserving source identity and scope |
| Mandatory rules | Assign rules to an Agent, project, provider, runtime role, or shared group |
MemoryGuard MCP 질문
MemoryGuard MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add memoryguard -- uvx agent-memguard를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
MemoryGuard MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
MemoryGuard가 데이터를 원격 서버로 전송하나요?
아니요, 원격 서버나 원격 텔레메트리 없이 로컬에서만 작동하는 솔루션입니다.
MemoryGuard는 민감한 정보를 어떻게 처리하나요?
정보 유출을 방지하기 위해 민감해 보이는 콘텐츠를 활성 메모리에서 격리할 수 있습니다.
에이전트가 메모리에 수행한 변경 사항을 취소할 수 있나요?
네, 시스템이 변경 사항에 대한 근거를 보존하며 거버넌스 결정 사항을 되돌릴 수 있도록 유지합니다.
어떤 코딩 에이전트를 지원하나요?
Claude Code, Codex, Cursor, TRAE와 같은 호스트를 지원합니다.