YantrikDB MCP
YantrikDB MCP 서버
AI 에이전트를 위한 인지 메모리입니다. Claude Code, Cursor, Windsurf 및 모든 MCP 호환 클라이언트와 함께 작동합니다.
웹사이트: yantrikdb.com · 문서: yantrikdb.com/guides/mcp · GitHub: yantrikos/yantrikdb-mcp
설치
pip install yantrikdb-mcpRelated MCP server: memex
구성
이 MCP 서버는 세 가지 배포 모드를 지원합니다. 사용 환경에 맞는 모드를 선택하세요.
모드 1 — 로컬 (기본값, 단일 사용자에게 권장)
MCP 서버는 로컬 SQLite 데이터베이스를 사용하여 엔진을 인프로세스(in-process) 방식으로 실행합니다. 빠르고 개인적이며 별도의 의존성이 없습니다.
{
"mcpServers": {
"yantrikdb": {
"command": "yantrikdb-mcp"
}
}
}설정은 이것으로 끝입니다. 에이전트가 자동으로 컨텍스트를 불러오고, 결정을 기억하며, 모순을 감지합니다. 별도의 프롬프트가 필요하지 않습니다.
모드 2 — HTTP 클러스터 (공유/다중 머신 설정에 권장)
임베디드 엔진을 사용하는 대신 모든 도구 호출을 YantrikDB HTTP 클러스터로 전달합니다. MCP 서버는 가벼운 상태 비저장(stateless) 클라이언트 역할을 하며, 모든 메모리는 클러스터에 저장되어 어떤 머신에서든 접근할 수 있습니다.
장점: 머신 간 메모리 공유, 고가용성, 로컬 임베더 다운로드 불필요, 로컬 데이터베이스 불필요.
{
"mcpServers": {
"yantrikdb": {
"command": "yantrikdb-mcp",
"env": {
"YANTRIKDB_SERVER_URL": "http://node1:7438,http://node2:7438",
"YANTRIKDB_TOKEN": "ydb_your_database_token"
}
}
}
}Raft 클러스터 자동 검색을 위해 여러 노드를 쉼표로 구분하여 입력
장애 조치 시 자동 리더 팔로잉
15초 요청 타임아웃
클러스터에서 토큰 가져오기:
yantrikdb token create --db your_database
모드 3 — SSE 서버 (레거시, 단일 원격 인스턴스)
MCP 서버 자체를 자체 임베디드 데이터베이스를 갖춘 장기 실행 SSE 서버로 실행합니다. 클라이언트는 HTTP 스트리밍을 통해 연결합니다.
# Generate a secure API key
export YANTRIKDB_API_KEY=$(python -c "import secrets; print(secrets.token_urlsafe(32))")
# Start SSE server
yantrikdb-mcp --transport sse --port 8420{
"mcpServers": {
"yantrikdb": {
"type": "sse",
"url": "http://your-server:8420/sse",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}sse 및 streamable-http 전송을 지원합니다. 참고: SSE 연결은 유휴 상태에서 끊길 수 있으므로, 공유 배포 환경에서는 모드 2(HTTP 클러스터)가 더 안정적입니다.
환경 변수
변수 | 사용 모드 | 기본값 | 설명 |
| 클러스터 | (설정 안 함 → 로컬 모드) | 쉼표로 구분된 클러스터 노드 URL |
| 클러스터 | (없음) | 클러스터 데이터베이스용 Bearer 토큰 |
| 로컬 |
| 데이터베이스 파일 경로 |
| 로컬 |
| 문장 변환기 모델 |
| 로컬 |
| 임베딩 차원 |
| SSE 서버 | (없음) | SSE/HTTP 서비스 시 Bearer 토큰 |
왜 파일 기반 메모리가 아닌가요?
파일 기반 메모리(CLAUDE.md, 메모리 파일)는 모든 대화마다 모든 내용을 컨텍스트에 로드합니다. YantrikDB는 관련 있는 내용만 불러옵니다.
벤치마크: 15개 쿼리 × 4개 규모
메모리 수 | 파일 기반 | YantrikDB | 절감 효과 | 정확도 |
100 | 1,770 토큰 | 69 토큰 | 96% | 66% |
500 | 9,807 토큰 | 72 토큰 | 99.3% | 77% |
1,000 | 19,988 토큰 | 72 토큰 | 99.6% | 84% |
5,000 | 101,739 토큰 | 53 토큰 | 99.9% | 88% |
선택적 불러오기는 O(1)입니다. 파일 기반 메모리는 O(n)입니다.
메모리가 500개일 때, 파일 기반 방식은 32K 컨텍스트 윈도우를 초과합니다.
5,000개일 때는 200K를 포함한 어떤 컨텍스트 윈도우에도 맞지 않습니다.
YantrikDB는 쿼리당 약 70 토큰을 유지하며, 60ms 미만의 지연 시간을 보입니다.
데이터가 많아질수록 정확도가 향상됩니다. 이는 컨텍스트 스터핑(context stuffing)과는 정반대입니다.
직접 벤치마크 실행: python benchmarks/bench_token_savings.py
도구
15개의 도구, 전체 엔진 커버리지:
도구 | 작업 | 목적 |
| 단일 / 배치 | 메모리 저장 — 결정, 선호도, 사실, 수정 사항 |
| 검색 / 정제 / 피드백 | 의미론적 검색, 정제 및 검색 피드백 |
| 단일 / 배치 | 메모리 삭제 |
| — | 잘못된 메모리 수정 (기록 보존) |
| — | 통합 + 충돌 감지 + 패턴 마이닝 |
| 가져오기 / 목록 / 검색 / 중요도 업데이트 / 아카이브 / 하이드레이트 | 개별 메모리 관리 + 키워드 검색 |
| 관계 / 엣지 / 링크 / 검색 / 프로필 / 깊이 | 지식 그래프 작업 |
| 목록 / 가져오기 / 해결 / 재분류 | 모순 처리 및 대체 패턴 학습 |
| 보류 중 / 기록 / 확인 / 전달 / 실행 / 해제 | 선제적 통찰 및 경고 |
| 시작 / 종료 / 기록 / 활성 / 오래된 세션 폐기 | 세션 수명 주기 관리 |
| 오래된 / 예정된 | 시간 기반 메모리 쿼리 |
| 학습 / 표면화 / 강화 | 절차적 메모리 — 전략 학습 및 재사용 |
| 목록 / 멤버 / 학습 / 초기화 | 충돌 감지를 위한 대체 카테고리 |
| 가져오기 / 설정 | 메모리 패턴에서 AI 성격 특성 추출 |
| 통계 / 상태 / 가중치 / 유지 관리 | 엔진 통계, 상태, 가중치 및 인덱스 재구축 |
전체 문서는 yantrikdb.com/guides/mcp를 참조하세요.
예시
1. 대화 시작 시 자동 불러오기
사용자: "데이터베이스 마이그레이션에 대해 우리가 무엇을 결정했었지?"
에이전트가 자동으로 recall("database migration decision")을 호출하여 응답하기 전에 관련 메모리를 검색합니다. 수동 프롬프트가 필요 없습니다.
2. 결정 기억 + 지식 그래프 구축
사용자: "새 서비스에는 PostgreSQL을 사용하기로 했어. 마이그레이션은 Alice가 담당할 거야."
에이전트 호출:
remember(text="Decided to use PostgreSQL for the new service", domain="architecture", importance=0.8)remember(text="Alice owns the PostgreSQL migration", domain="people", importance=0.7)graph(action="relate", entity="Alice", target="PostgreSQL Migration", relationship="owns")
3. 모순 감지
"우리는 Python 3.11을 사용해"라고 저장한 후 나중에 "Python 3.12로 업그레이드했어"라고 하면, think() 호출 시 충돌이 감지됩니다. 에이전트가 이를 표면화합니다:
"모순을 발견했습니다: 이전에 Python 3.11을 사용한다고 하셨는데, 최근에 Python 3.12를 언급하셨습니다. 현재 어떤 것이 맞나요?"
그런 다음 conflict(action="resolve", conflict_id="...", strategy="keep_b")로 해결합니다.
개인정보 보호정책
YantrikDB MCP 서버는 모든 데이터를 사용자의 머신에 로컬로 저장합니다 (기본값: ~/.yantrikdb/memory.db). 외부 서버로 데이터가 전송되지 않으며, 텔레메트리(telemetry)가 수집되지 않고, 작동 중에 제3자 서비스와 통신하지 않습니다.
데이터 수집:
remember도구를 통해 명시적으로 저장하거나 AI 에이전트가 사용자를 대신하여 저장하는 데이터만 수집합니다.데이터 저장: 파일 시스템의 로컬 SQLite 데이터베이스.
YANTRIKDB_DB_PATH를 통해 경로를 제어할 수 있습니다.제3자 공유: 없음. 로컬(stdio) 모드에서는 데이터가 머신 밖으로 나가지 않습니다.
네트워크 모드: SSE/HTTP 전송을 사용할 경우, 데이터는 클라이언트와 직접 호스팅하는 서버 사이에서만 이동합니다. Anthropic이나 제3자 서버는 관여하지 않습니다.
임베딩 모델: 로컬 ONNX 모델(
all-MiniLM-L6-v2)을 사용합니다. 모델 파일은 처음 사용할 때 Hugging Face Hub에서 한 번 다운로드된 후 로컬에 캐시됩니다.보존: 데이터를 삭제(
forget도구)하거나 데이터베이스 파일을 삭제할 때까지 데이터가 유지됩니다.
전체 정책: yantrikdb.com/privacy
기여
venv 설정, pytest 실행 및 PR 오픈에 대해서는 CONTRIBUTING.md를 참조하세요.
지원
라이선스
이 MCP 서버는 MIT 라이선스를 따르며, 모든 프로젝트에서 자유롭게 사용할 수 있습니다.
참고: 이 패키지는 AGPL-3.0 라이선스를 따르는 yantrikdb(인지 메모리 엔진)에 의존합니다. AGPL은 엔진 자체에 적용됩니다. 엔진을 수정하여 배포하거나 네트워크 서비스로 제공하는 경우, 해당 수정 사항도 AGPL-3.0을 따라야 합니다. 이 MCP 서버를 통해 엔진을 있는 그대로 사용하는 것은 귀하의 코드에 AGPL 의무를 발생시키지 않습니다.
Available Tools
21 toolsatlasARead-onlyIdempotent
Export this store's Memory Atlas (a static page: every memory, its entity links, claims, revision history and tasks) and serve it on 127.0.0.1. Read-only; nothing leaves the machine.
ACTIONS:
"export": (default) export and serve; returns the local URL, the output directory and the exporter's report. Re-running refreshes the files under the same URL.
"status": the atlas servers this process is running.
Args:
out_dir: Output directory (default <store>.atlas/ beside the store).
port: Local port (0 = free one).
label: Provenance label shown in the page header.
open_browser: Also open the URL in the browser.
Embedded mode only (cluster mode: use the yantrikdb atlas CLI on a
node). Needs an engine that ships yantrikdb/atlas/.
Inputs: port, label, action, out_dir, +1 more. Returns: result
categoryADestructive
Substitution categories for conflict detection — list, inspect, teach, or reset.
ACTIONS:
"list": Show all categories with member counts.
"members": Show members of a specific category (needs category_name).
"learn": Teach new members (needs category_name + members as [[token, confidence], ...]).
"reset": Reset category to seed state (needs category_name).
EXAMPLES:
category() → list all categories
category(action="members", category_name="databases")
category(action="learn", category_name="databases", members=[["tidb", 0.35]])
category(action="reset", category_name="editors_tools")
Args: action: "list", "members", "learn", "reset". category_name: Required for members/learn/reset. members: For learn: [[token, confidence], ...]. source: For learn: "llm_suggested", "user_confirmed", "seed".
Inputs: action, source, members, category_name. Returns: result
conflictADestructive
Manage memory conflicts (contradictions) — list, resolve, dismiss, reclassify, or batch-burn-down the unambiguous ones (v0.8.0+).
ACTIONS:
"list": List conflicts. Optional status filter.
"get": Get single conflict by conflict_id.
"resolve": Resolve with strategy: "keep_a"/"keep_b"/"keep_both"/"merge"/"dismiss".
"reclassify": Reclassify conflict type.
"auto_resolve": v0.8.0 — burn down unambiguous conflicts in one pass. Set dry_run=False to actually persist.
Args: action: "list", "get", "resolve", "reclassify", "auto_resolve". conflict_id / status / strategy / winner_rid / new_text / resolution_note / new_type / limit: see action docs above. dry_run: For auto_resolve — preview without persisting.
Inputs: limit, action, status, dry_run, +6 more. Returns: result
conversationADestructive
Bounded encrypted working-memory ring buffer for raw conversation turns (v0.9.0 engine conversation primitive).
Unlike remember (which stores extracted semantic memories), this stores
verbatim turns — useful for short-horizon working memory, e.g. "what
exactly did the user say two messages ago". The ring is bounded per
namespace; oldest turns evict when max_turns is exceeded.
ACTIONS:
"record": Append a turn (needs role + content).
"recent": Retrieve last N turns, oldest-first.
"clear": Drop the buffer for a namespace.
Args: action: "record" | "recent" | "clear". namespace: Ring buffer namespace (separate buffers per agent / topic). role: "user" | "assistant" | "system" | "tool" — caller's choice. content: The verbatim turn text. max_turns: Ring size at record time (default 10). limit: How many recent turns to return.
Inputs: action (required), role, limit, content, +2 more. Returns: result
correctADestructive
Correct an existing memory in-place with a revision-history entry (engine v0.7.20+, Issue #47).
WHEN TO USE: When the user corrects a recalled fact.
"Actually, we're using Python 3.12, not 3.11" → correct the memory.
Preserves history via an append-only revision entry keyed on reason.
Entity relationships stay attached to the same rid (in-place mutation,
not a tombstone+new-rid dance).
Args: rid: The memory ID to correct. reason: Required — why the correction was made. Non-empty. Recorded on the revision-history entry so future recall + audit can reconstruct why the memory changed. new_text: Optional new text (pass None to keep existing). new_importance: Optional updated importance (0.0-1.0). new_valence: Optional updated valence (-1.0 to 1.0). metadata_merge: Optional dict to merge into existing metadata (None = keep as-is).
Inputs: rid (required), reason (required), new_text, new_valence, +2 more. Returns: result
forgetADestructiveIdempotent
Permanently forget (tombstone) one or more memories.
WHEN TO USE: When the user explicitly asks to forget something, or when a memory
is clearly wrong and correction isn't appropriate. Prefer correct over forget
when the memory just needs updating.
Args: rid: Single memory ID to forget. rids: List of memory IDs to forget (batch mode).
Inputs: rid, rids. Returns: result
gapsARead-onlyIdempotent
Surface knowledge gaps — frequently-asked, poorly-answered queries (v0.9.0 engine demand log).
The substrate logs every recall and tracks how often each query is asked
what top scores it surfaces.
knowledge_gaps()returns the queries that are asked often but answered poorly — the substrate's "known unknowns". Use this to drive proactive learning: when the agent sees a gap, it can ask the user, fetch info, or note the limitation.
Args: min_count: Only surface queries asked at least this many times. max_avg_top_score: Only surface queries whose best recall score averages below this (lower = poorer answer). limit: Max gaps to return.
Inputs: limit, min_count, max_avg_top_score. Returns: result
graphB
Knowledge graph operations — entity relationships, memory↔entity links, record-to-record links, co-occurrence auto-relate, and link-expanded recall.
ACTIONS:
"relate": Entity↔entity relationship (legacy).
"edges": Get all relationships for entity.
"link": Link a memory (rid) to an entity (legacy).
"search": Find entities by pattern.
"profile": Rich entity profile.
"depth": How deeply the system knows an entity.
"auto_relate": v0.8.0 — co-occurrence-driven edge backfill. Set dry_run=False to persist.
"record_link": v0.9.0 — add a record-to-record link (needs source_rid + target_rid + link_type).
"record_unlink": v0.9.0 — remove a record-to-record link.
"linked_records": v0.9.0 — traverse links from rid (direction = "outbound" | "inbound" | "both", optional link_type filter).
"recall_with_links": v0.9.0 — semantic recall with N-hop link expansion.
Args: action: One of the actions above. entity / target / relationship / weight / rid / pattern / limit / days / namespace: Legacy entity-graph args. source_rid / target_rid / link_type: For record_link / record_unlink. direction: For linked_records — "outbound" / "inbound" / "both". dry_run: For auto_relate — preview without persisting. max_edges: For auto_relate — cap edges proposed/created. query: For recall_with_links — natural language search. top_k: For recall_with_links — max seed results. expand_links: For recall_with_links — hop budget for traversal.
Inputs: action (required), rid, days, limit, +15 more. Returns: result
memoryA
Manage individual memories — get, list, search, update importance, archive, hydrate, relevance feedback, fetch a chain-shaped namespace's head, or query revision history.
ACTIONS:
"get": Retrieve a single memory by rid.
"list": Browse memories with filters.
"search": Keyword substring search.
"update_importance": Change a memory's importance score.
"archive": Move to cold storage.
"hydrate": Restore archived memory.
"feedback": v0.10 — relevance feedback on a recalled memory (needs rid + feedback="relevant"|"irrelevant"). Call after USING a recalled memory; it tunes future retrieval. (Moved here from recall, which is now read-only.)
"chain_head": The CURRENT value of a chain-shaped namespace (narrative / decision / config chains). Use this — not recall — for "what is the current/latest X": similarity search favors the most-similar revision, chain_head returns the newest.
"history": v0.8.0 — revision history for a single rid (needs rid).
Args: See action docs above. New args: namespace: Required for chain_head — the chain-shaped namespace. rid: Required for history/feedback — the record acted on. feedback: For feedback — "relevant" or "irrelevant". feedback_query: For feedback — the query that surfaced the memory. feedback_score / feedback_rank: For feedback — retrieval context.
Inputs: action (required), rid, limit, domain, +10 more. Returns: result
packADestructive
Signed, portable memory bundles — inspect, install, and trust packs.
A pack is a sealed corpus another agent or vendor published. Mounted pack memories are recallable alongside your own but are DOWN-WEIGHTED (tier_multiplier < 1.0): what the user told you locally always outranks imported knowledge.
READ ACTIONS (always available):
"list": Installed + mounted packs (id, name, origin, trust, rows).
"inspect": Read a pack file's manifest WITHOUT installing it. path=. Shows origin, signature, embedder, rows — always inspect before you install.
"publishers": Public keys this database trusts.
"embedder_identity": This database's embedding fingerprint. A pack must be sealed against a matching space to mount.
WRITE ACTIONS (operator-gated; set YANTRIKDB_ENABLE_PACK_WRITES=1):
"install": Install + mount a pack. path=.
"uninstall": Remove a pack and its rows. pack_id=.
"mount"/"unmount"/"unmount_all": Session-scoped mount control.
"trust": Trust a publisher key. pubkey=, label=.
"untrust": Revoke a publisher key. pubkey=.
Args: action: One of the read/write actions above. path: Pack file path (inspect / install / mount). pack_id: Pack identifier, e.g. "origin@1.0.0" (uninstall / unmount). pubkey: Publisher public key hex (trust / untrust). label: Human label for a trusted publisher (trust). allow_unverified_embedder: Mount despite an unverified embedder. Does NOT override a hard dimension mismatch.
Inputs: action (required), path, label, pubkey, +2 more. Returns: result
personalityAIdempotent
AI personality traits derived from memory patterns.
ACTIONS:
"get": Get current personality profile. Use recompute=True to refresh.
"set": Set a trait manually (needs trait_name + score).
Traits: warmth, depth, energy, attentiveness (0.0-1.0).
Args: action: "get" or "set". trait_name: For set: warmth, depth, energy, attentiveness. score: For set: 0.0-1.0. recompute: For get: re-derive from memory patterns first.
Inputs: score, action, recompute, trait_name. Returns: result
procedureA
Procedural memory — learn, surface, and reinforce strategies.
ACTIONS:
"learn": Store a procedure (needs text). What worked in a specific context.
"surface": Find relevant procedures (needs query). Returns ranked by effectiveness.
"reinforce": Update effectiveness (needs rid + outcome 0.0-1.0).
EXAMPLES:
procedure(action="learn", text="For this repo, always run tests before committing", domain="work")
procedure(action="surface", query="how to handle code review in this repo")
procedure(action="reinforce", rid="abc", outcome=0.9)
Args: action: "learn", "surface", "reinforce". text: Procedure description (for learn). query: What you're about to do (for surface). rid: Procedure ID (for reinforce). domain: Task domain. task_context: What kind of task (for learn). effectiveness: Initial effectiveness 0.0-1.0 (for learn). outcome: How well it worked 0.0-1.0 (for reinforce). top_k: Max results (for surface). namespace: Namespace.
Inputs: action (required), rid, text, query, +6 more. Returns: result
recallARead-onlyIdempotent
Search memories by semantic similarity, or refine low-confidence results.
MODES:
Search (default): recall("project architecture decisions")
Refine: recall("PostgreSQL vs MySQL decision", refine_from="database choice", refine_exclude=["rid1"])
ORDER: "recency" | "first_mention" (alias "chronological") | "certainty". Re-sorts the top_k already found; hints omitted. (Relevance feedback moved to memory(action="feedback") in v0.10 — recall is now purely read-only.)
WHEN TO USE: conversation start (summarize the user's first message); when the user references past decisions, people, preferences, or "last time"; when unsure about something the user assumes you know. Refine when first confidence < 0.5. After USING a recalled memory, reinforce it via memory(action="feedback", rid=..., feedback="relevant"). For "what is the CURRENT/latest X", prefer memory(action="chain_head") — similarity favors the most-similar revision, not the newest. For "what happened , in what order" ("tonight", "this week") use temporal(action="range") or since/until here — those words name the time frame, not the content; bare similarity cannot see the window.
QUERY: one short natural-language sentence (5-10 words), NOT a keyword list — keyword stuffing degrades quality. One focused question per call; separate calls for separate topics.
TRUST SIGNALS: each hit's why_retrieved may carry staleness warnings
("aged", "rarely confirmed", "superseded by a newer record"). Treat
flagged hits as weak evidence — prefer fresher results or chain_head,
and note the flag if you act on one anyway.
Args: query: Short natural language sentence (5-10 words). NOT a keyword list. top_k: Max results (default 10). 3-5 for focused, 10-20 for broad. memory_type: Filter: "semantic", "episodic", "procedural". domain: Filter: "work", "preference", "architecture", "people", etc. source: Filter: "user", "inference", "document", "system". namespace: Filter by namespace. include_consolidated: Include merged memories. include_superseded: v0.10 — recall EXCLUDES superseded records by default (current-by-default). Set True only for history / archaeology over a revision chain. expand_entities: Use knowledge graph boosting (default True). min_score_ratio: Drop hits scoring below this fraction of the TOP hit (0.8 = keep only near-as-good matches). Semantic search always returns top_k, even when one result is relevant and the rest are noise; this trims the tail instead of making you judge it. since: Only memories from this instant on — "2026-08-01", "2026-08-01T14:30:00Z", "6h"/"7d" (ago), or unix seconds. Filters BEFORE ranking: top_k is chosen inside the window. until: Window end (same formats; default now). Alone = up to then. refine_from: Original query text to refine from. query becomes the refinement. refine_exclude: Memory IDs to exclude when refining.
Inputs: query (required), order, since, top_k, +11 more. Returns: result
rememberA
Store one or more memories in persistent cognitive memory.
WHEN TO USE: Call proactively whenever the conversation reveals something worth remembering — decisions, preferences, facts about people, project context. Do NOT store ephemeral task details, code snippets, or git-derivable info.
SINGLE: remember(text="User prefers dark mode", domain="preference", importance=0.7) BATCH: remember(memories=[{"text": "Alice is DevOps lead", "domain": "people"}, ...]) DRAFT: remember(summary="...long end-of-session summary...") — v0.8.0+ engine atomizes the summary into linked semantic facts; useful for the end-of-session auto-capture pattern.
IMPORTANCE: 0.8-1.0 critical decisions | 0.5-0.7 useful context | 0.3-0.5 background
Args: text: Memory text (for single memory). Be specific and searchable. memory_type: "semantic" (facts), "episodic" (events), "procedural" (how-to). importance: 0.0-1.0. Higher = remembered longer. domain: "work", "preference", "architecture", "people", "infrastructure", "health", "finance", "general". source: "user", "inference", "document", "system". valence: Emotional tone (-1.0 to 1.0). 0.0 neutral. metadata: Optional key-value pairs. namespace: For per-project isolation. certainty: Confidence 0.0-1.0. emotional_state: joy, frustration, excitement, concern, neutral. memories: List of memory dicts for batch. summary: For draft mode — long summary that the engine atomizes. idempotency_key: v0.10 engine — makes the write exactly-once: retrying with the same key + same text returns the SAME rid with no second write; same key + different text is an error. Engine-embedder (bundled) backend only. On batch, the key scopes per item as "{key}:{index}" if the atomic batch path is unavailable. created_at: v0.14 engine — BACKDATE the memory to when it was actually true, not when you imported it. Use for backfill (chat logs, migrations). Without it every imported memory stamps "now", which makes temporal(action="as_of") report history that never happened and flattens staleness/decay. Same formats as as_of: "2026-08-01", "2026-08-01T14:30:00Z", "7d" (ago), or unix seconds. Omit for anything learned in the present conversation. claims: v0.19 engine — facts this memory states, as [{"subject", "relation", "object"}]; state one for any fact you want tracked (contradiction, succession, multi-hop). Subject and object must occur in the text, relation is snake_case; ungrounded ones are reported back, not stored. Batch items take their own "claims". A claim may carry "valid_from"/"valid_to" (created_at formats). event_time: when the memory is ABOUT, not when written (created_at formats). Time-travel recall reads it and every claim on the memory inherits it as valid_from, so an older fact is the predecessor of a newer one, not its contradiction.
Inputs: text, claims, domain, source, +12 more. Returns: result
sessionA
Session lifecycle — start, end, history, active check, stale cleanup, and the v0.9.0 boot-time digest.
ACTIONS:
"start": Begin a new session. Returns session_id.
"end": End a TRACKED session (needs session_id). Returns stats. This closes session bookkeeping — it does NOT capture memories.
"capture": Segment a free-text session summary into atomic candidate memories (needs summary; NO session_id — it operates on the text, not on tracked-session state). Returns drafted rids. Use at end of substantial work so the session leaves a trace.
"history": View past sessions.
"active": Check if there's a running session.
"abandon_stale": Clean up orphaned sessions older than abandon_stale_hours.
"digest": One-call boot-time briefing (v0.9.0) — narrative chain head, open decisions/conflicts/triggers, top stale memories. Call this at conversation start instead of N separate recalls. Set include_gaps=True to fold known-unknowns (frequently-asked, poorly-answered queries) into the briefing — the active-learning loop. Set scope to filter content aggregates to one namespace for a per-tenant digest.
Args: action: "start", "end", "capture", "history", "active", "abandon_stale", "digest". session_id: For end. namespace: Memory namespace. client_id: Client identifier. metadata: For start — optional dict. summary: For end — optional closing note. For capture — REQUIRED, the session summary to segment into memories. domain: For capture — domain stamped on drafted memories. limit: For history. abandon_stale_hours: For abandon_stale — max age in hours. narrative_namespace: For digest — namespace for the narrative chain. scope: For digest — filter content aggregates to one namespace (per-tenant isolation); omit for a whole-DB digest. include_gaps: For digest — fold top knowledge gaps into the briefing. max_gaps: For digest — cap on gaps surfaced when include_gaps=True. max_decisions / max_conflicts / max_triggers: For digest — surface caps. snippet_chars: For digest — text-snippet length per item.
Inputs: action (required), limit, scope, domain, +13 more. Returns: result
skillA
Substrate-native agent skill catalog — define, surface, record outcomes.
Skills are structured catalog entries (skill_id, applies_to, body,
type) — different from loose how-to memories (use procedure for those).
Writes go to the skill_substrate namespace so every yantrikdb consumer
(this MCP, yantrikdb-hermes-plugin, Lane B SDK, WisePick) sees the same
catalog.
Schema-validated at write time:
skill_id: lowercase dot-separated segments, e.g. "workflow.git.commit_clean"
body: 50–5000 chars
applies_to: 1–10 lowercase_underscore identifiers (no hyphens)
skill_type: one of procedure | reference | lesson | pattern | rule
ACTIONS:
"define": Create a skill (needs skill_id, body, skill_type, applies_to).
"surface": Find relevant skills (needs query). Returns ranked by score.
"outcome": Append a use outcome (needs skill_id, succeeded).
"get": Fetch a single skill by id.
"list": Catalog browse (filter by applies_to / skill_type).
EXAMPLE: skill(action="define", skill_id="workflow.git.commit_clean", body="Before commit: run pytest + lint...", skill_type="procedure", applies_to=["git", "release"]) — then surface(query=...) before similar work, and outcome(skill_id=..., succeeded=True/False) after using one.
Args: action: "define", "surface", "outcome", "get", "list". skill_id: Dot-separated id (for define/get/outcome). body: Skill body, 50–5000 chars (for define). skill_type: procedure|reference|lesson|pattern|rule (for define). applies_to: Non-empty identifier list ≤10 entries (for define; optional filter for surface/list). triggers: Optional list of trigger phrases (for define). on_conflict: "reject" (default) or "replace" if skill_id exists. version: Optional semver-shaped version string. supersedes: Optional skill_id this one replaces. query: Natural-language search (for surface). top_k: Max results for surface. succeeded: Outcome boolean (for outcome). note: Optional outcome note. limit: Max results for list.
Inputs: action (required), body, note, limit, +10 more. Returns: result
statsARead-onlyIdempotent
Engine statistics, health check, learned weights, privacy/leak audit, and skill substrate counts. Read-only — index maintenance moved to think(maintenance_op=...) in v0.10.
ACTIONS:
"stats": Detailed memory statistics (default).
"health": Quick health check with latency.
"weights": Show adapted recall scoring weights.
"audit_leak": v0.8.0 windowed leak-candidate audit — surfaces recent records that may have leaked sensitive content. Use for privacy review.
"skill_outcomes": v0.9.0 — total skill outcomes recorded in the durable timeline.
Args: action: One of the actions above. namespace: Filter for stats. max_rids: For audit_leak — max candidate rids to inspect.
Inputs: action, max_rids, namespace. Returns: result
taskADestructive
Substrate-backed task / chore store (v0.9.0 engine).
A thin general-purpose to-do tracker baked into yantrikdb — survives sessions, lives next to memories so future agents see open tasks at session_digest time.
ACTIONS:
"add": Create a task (needs title; optional priority + parent_id).
"get": Fetch one task by id.
"list": List tasks in a namespace, optionally filtered by status.
"update": Update status and/or priority (needs task_id).
"delete": Delete a task (needs task_id).
PRIORITY: "low" | "medium" | "high" — priority-ordered in list.
STATUS: typically "open" | "doing" | "done" | "blocked".
Args: action: "add" | "get" | "list" | "update" | "delete". namespace: Per-project / per-agent isolation. title: Task description (for add). priority: "low" | "medium" | "high" (for add / update). parent_id: Optional parent task id (for add — sub-task tree). task_id: Task id (for get / update / delete). status: Filter (for list) or new value (for update).
Inputs: action (required), title, status, task_id, +3 more. Returns: result
temporalARead-onlyIdempotent
Find stale or upcoming memories, recall the past, or scan a time window.
ACTIONS:
"stale": Important memories not accessed recently.
"upcoming": Memories with approaching deadlines/events.
"as_of": Time-travel recall — excludes anything recorded after
as_of, so you see the belief held then, not today's. Engine v0.12+."range": Everything in a time window, oldest first — the surface for "what happened tonight / this week, in what order". Period and sequence questions are SET queries over a window; similarity search cannot answer them — route them here.
Args:
action: "stale", "upcoming", "as_of", or "range".
days: Inactivity threshold (stale) or look-ahead window (upcoming).
limit: Max results.
namespace: Optional filter.
query: Search text (required for "as_of"; optional for "range":
given = relevance-selected within the window, omitted =
the window's newest limit records).
as_of: Past instant (required for "as_of"): "2026-08-01",
"2026-08-01T14:30:00Z", "7d"/"24h" (ago), or unix seconds.
since: Window start (required for "range"), same formats as as_of.
until: Window end for "range" — defaults to now.
Inputs: action (required), days, as_of, limit, +4 more. Returns: result
thinkA
Run incremental cognitive maintenance — processes a small batch per call.
DESIGNED TO BE CALLED OFTEN: Each call processes ~5 memories (configurable). Running regularly (e.g. at end of conversation) gradually maintains the entire database without blocking. Safe to call frequently.
MODES:
Default: incremental think() — consolidation + conflict scan + (optional) pattern mining on a small batch.
maintenance_cycle=True: run the v0.9.0 autonomous-hygiene "sleep cycle" — think + burn-down-conflicts + prune-triggers + recalibrate-importance + backfill-entities + auto-relate (+ optional split_oversized + repair_artifacts).
last_cycle_only=True: just fetch the last persisted maintenance-cycle summary (read-only, no work performed).
maintenance_op="backfill_entities"|"rebuild_vec_index"|"rebuild_graph_index": run ONE targeted index-maintenance op and return. (Moved here from stats in v0.10 so stats could become read-only.)
Args: run_consolidation: Merge similar memories (default on). run_conflict_scan: Detect contradictions (default on). run_pattern_mining: Mine cross-domain patterns (default off, slow). consolidation_time_window_days: Only consolidate memories within this window (default 7 days). consolidation_limit: Batch size — max memories to process per call (default 5). Keep small for fast returns. maintenance_cycle: Run the full autonomous hygiene cycle instead. last_cycle_only: Just fetch the last cycle summary (read-only). dry_run: For maintenance_cycle — preview without persisting changes. burn_down_conflicts / prune_triggers_too / max_pending_triggers / recalibrate_importance / backfill_entities / auto_relate_in_cycle / max_auto_relate_edges / split_oversized / split_min_chars / repair_artifacts: Maintenance-cycle knobs.
Inputs: dry_run, maintenance_op, last_cycle_only, split_min_chars, +15 more. Returns: result
triggerAIdempotent
Manage proactive triggers + v0.8.0 bounded-backlog pruning.
ACTIONS:
"pending": Get pending triggers (default).
"history": View past triggers.
"acknowledge": Mark trigger as seen.
"deliver": Mark as shown to user.
"act": Mark as acted upon.
"dismiss": Dismiss as irrelevant.
"prune": v0.8.0 — expire overdue triggers + evict oldest when over
max_pending. Set dry_run=False to actually persist.
Args: action: One of the actions above. trigger_id: Required for acknowledge/deliver/act/dismiss. trigger_type: Filter by type (for pending/history). limit: Max results. dry_run: For prune — preview without persisting. max_pending: For prune — soft cap on the pending backlog (default 64).
Inputs: limit, action, dry_run, trigger_id, +2 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Most tools target a distinct subsystem—write/retrieve/correct/forget memories, graph, temporal, conflicts, triggers, sessions, tasks—and action enums keep sub-operations separate. The main ambiguity is procedure vs skill, which both store and surface reusable knowledge, and memory/recall/temporal overlap in retrieval but with clear usage notes.
All tools are single lowercase tokens, which is a consistent style, but there's no verb_noun convention and names mix nouns (memory, graph) with verbs (remember, forget, recall, think). The action-based subcommands add internal consistency, so the overall pattern is predictable.
21 tools is on the heavy side for one server, and several tools (category, personality, pack) serve niche features. Still, the server's scope is broad—memory, graph, temporal, conflict, session, task, skill—so the count is defensible but borderline.
The surface covers the full memory lifecycle (create/read/update/delete/correct), multiple retrieval modes, graph relationships, conflict resolution, maintenance, sessions, tasks, and even pack import/export. There are no obvious dead ends for the stated purpose.
Maintenance
Related MCP Connectors
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
One memory, every AI: Claude, ChatGPT, Perplexity, Gemini, Cursor, OpenClaw, Hermes, any MCP client.
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
Private memory for AI agents: save and recall facts across Claude Code, Codex, Cursor and ChatGPT.
Related MCP Servers
- AlicenseAqualityDmaintenancePersistent memory and human approval for any AI agent. Give your AI agents the ability to remember across sessions and ask humans for approval before sensitive actions. Works with Claude, Cursor, OpenClaw, and any MCP-compatible client.6MIT
- AlicenseNot gradedqualityAmaintenanceZettelkasten-based persistent memory for AI coding agents. Auto-saves atomic knowledge cards with \[\[bidirectional links]] after tasks and auto-recalls before new ones. No vector DB — plain markdown files with git sync. Works as Claude Code plugin or MCP server for Cursor, VS Code Copilot, Codex, and Windsurf.332 npm144MIT

dakera-mcpofficial
AlicenseAqualityCmaintenanceSelf-hosted MCP-native agent memory server. Gives AI agents persistent, decay-weighted memory via 83 MCP tools — no cloud, full control. RocksDB+HNSW backend. Works with Claude Code, Cursor, and any MCP-compatible agent.149MIT- AlicenseAqualityBmaintenanceA local-first MCP server that gives AI coding agents persistent memory and controlled commands. Features a git-backed markdown knowledge vault with FTS5 search, surgical section edits, token-aware context budgeting, and a sandboxed command engine with human approval gates. Works with Claude Code, Cursor, Copilot, Gemini, and more.621Apache 2.0