khwan-mcp
Officialkhwan-mcp
세션이 끝나도 유지되는 지속성 메모리. MCP 서버가 Khwan — 순수한 AI 메모리 레이어 — 을 Claude Code, Claude Desktop, 또는 모든 MCP 클라이언트에 연결합니다.
Khwan은 모델을 실행하지 않습니다. 클라이언트가 곧 모델입니다. Khwan의 역할은 중요한 것을 저장하고 정제해서, 나중 세션에서 다시 기억하거나 서브에이전트의 시드로 사용할 수 있는 뇌로 만드는 것입니다. 재생되는 대화 기록이 아니라, 압축되고 한계가 분명한 사실 묶음입니다. 계정 하나에는 격리된 여러 개의 core(브레인)가 담길 수 있고, 유료 플랜에서는 최종 사용자별 격리된 서브 브레인도 둘 수 있습니다.
토큰을 절약하는 방법 (그리고 절약되지 않는 경우)
메커니즘을 솔직하게 말하면, MCP는 호스트의 컨텍스트에 추가할 뿐이며 호스트가 이미 전송하는 대화 기록을 대체할 수 없습니다. 그러므로:
열려 있는 하나의 세션 안에서는 토큰을 절약하지 못합니다. Claude Code는 점점 커지는 히스토리를 캐시하므로(캐시 읽기 ≈ 0.1×), 매 턴마다 메모리를 다시 주입하는 것은 용량만 늘릴 뿐입니다. 여기서 그렇게 하지 마세요.
세션 사이와 서브에이전트 사이에서는 절약합니다. 캐시는 수 분 안에 만료되고, 세션은 끝납니다. Khwan은 정제된 사실을 영구히 저장하므로 다음 실행이 저렴하게 그것들을 다시 가져올 수 있습니다 — 이전 기록을 처음부터 다시 재생할 필요가 없고, 이미 컨텍스트에서 벗어난 사실도 다시 찾을 수 있습니다.
토큰 스마트한 패턴: 캐싱 호스트의 매 턴마다 전체 루프를 실행하는 대신, 한 번 시드하고 지속성 있는 사실을 기록하세요(아래 참조). 전체 prepare → record 루프는 여전히 비캐싱 호스트의 커스텀 에이전트에서 빛을 발합니다. 거기서는 기록을 정제된 메모리로 대체해 턴당 비용을 직접 경계 지어 줍니다.
Related MCP server: memory-mcp
설치
pip install khwan-mcp # or: uvx khwan-mcpClaude Code에 연결
claude mcp add khwan --scope project \
-e KHWAN_CORE=default \
-- khwan-mcp--scope project는 .mcp.json을 저장소 안에 작성하므로, 설정이 프로젝트와 함께 이동합니다. 이 명령에 없는 것이 무엇인지 눈여겨보세요: 바로 키(key)입니다.
키를 저장소에서 분리하기
claude mcp add -e KHWAN_API_KEY=…는 그 리터럴 값을 .mcp.json에 기록합니다. 그런데 그 파일은 커밋되는 게 목적인 파일입니다. 이를 피하는 방법은 두 가지이고, 두 번째가 어디에서나 동작하는 방법입니다.
셸 환경. KHWAN_API_KEY를 설정에 전혀 넣지 말고, claude를 실행하는 셸에서 내보냅니다. 서버가 그 값을 상속합니다.
export KHWAN_API_KEY=kwk_live_xxx런처(데스크톱 앱에서도 동작). 데스크톱 앱은 로그인 셸이 아니라 독이나 메뉴에서 시작되므로, 여러분의 셸 내보내기를 하나도 상속하지 않으며, 위 방식은 조용히 키가 없는 상태가 됩니다. 대신 파일에서 키를 읽게 만드세요:
mkdir -p ~/.khwan && chmod 700 ~/.khwan
printf 'KHWAN_API_KEY=kwk_live_xxx\n' > ~/.khwan/env && chmod 600 ~/.khwan/env
cat > ~/.khwan/khwan-mcp <<'SH'
#!/bin/sh
set -a
[ -f "$HOME/.khwan/env" ] && . "$HOME/.khwan/env"
set +a
exec khwan-mcp "$@"
SH
chmod 700 ~/.khwan/khwan-mcp그런 다음 설정을 런처를 가리키도록 바꾸고, 비밀이 아닌 값만 인라인으로 남겨 두세요:
claude mcp add khwan --scope project \
-e KHWAN_CORE=acme -e KHWAN_USER=Web \
-- ~/.khwan/khwan-mcp이제 .mcp.json은 커밋해도 안전하며, 새 저장소마다 키 복사 붙여넣기 대신 두 줄만 필요합니다. 팀의 다른 사람은 각자 자신의 ~/.khwan/env를 만들어 쓰면 됩니다.
프로젝트마다 하나의 브레인
메모리는 이 프로젝트의 메모리가 돌아와야만 쓸모가 있습니다. 축이 두 가지이며, 둘 다 완전한 격리를 제공합니다:
선택 기준 | 비용 | |
core |
| 플랜에 포함된 core 하나 |
서브 브레인 |
| 무료 — 유료 플랜에서는 무제한 |
서브 브레인은 필터가 아니라 완전히 분리된 브레인입니다: account::acme::@Web은 account::acme::@Api와 아무것도 공유하지 않습니다. 따라서 여러 저장소를 사용하는 클라이언트는 core를 저장소마다처럼 두지 않고, 하나의 core 안에 저장소별 서브 브레인 하나씩 두면 됩니다:
# in ~/code/acme-web
claude mcp add khwan --scope project -e KHWAN_CORE=acme -e KHWAN_USER=Web -- ~/.khwan/khwan-mcp
# in ~/code/acme-api
claude mcp add khwan --scope project -e KHWAN_CORE=acme -e KHWAN_USER=Api -- ~/.khwan/khwan-mcpcore는 지정하기 전에 반드시 존재해야 합니다 — 존재하지 않는 core는 404를 반환합니다. 대시보드에서 생성하세요. 서브 브레인은 첫 쓰기 때 생성됩니다.
권장 패턴 (토큰 스마트형)
Claude Code 같은 캐싱 호스트에서는 매 턴 루프보다 시드 + 기억하기를 선호하세요:
시드 — 세션이나 서브에이전트 시작 시:
"
khwan_recall(query="<the task>")를 호출하고, 반환된seed_text를 컨텍스트로 사용하세요."기억 — 지속해야 할 사실이 드러나면:
"그것은 계속 유지될 결정입니다 —
khwan_remember(fact="…")를 호출하세요."
이것을 프로젝트의 CLAUDE.md에 강화해 넣으세요. 예:
- At the start of a task, call `khwan_recall` to seed relevant memory.
- When a durable decision/preference/fact emerges, call `khwan_remember`.
- Don't call prepare/record every turn — it adds tokens without saving them here.서브에이전트 시드가 가장 효과가 분명한 곳입니다. 전체 대화 대신 한정된 브랜드를 넘겨주세요:
"
khwan_recall(query="deploy runbook")로 배포 메모리를 불러온 후, 그seed_text에 작업을 더한 브랜드를 가진 서브에이전트를 생성하세요."
Claude Desktop에 연결
Claude Desktop과 Claude Code는 별도의 MCP 설정을 유지합니다. 한쪽에 추가한 서버는 다른 쪽에 보이지 않으며, claude mcp add도 이 파일을 건드리지 않습니다. claude_desktop_config.json에 추가하세요:
{
"mcpServers": {
"khwan": {
"command": "/Users/you/.khwan/khwan-mcp",
"env": {
"KHWAN_CORE": "acme",
"KHWAN_USER": "Web"
}
}
}
}절대 경로를 사용하세요. 데스크톱 앱도 여러분의 셸 PATH를 가져오지 않으므로, 맨 khwan-mcp는 경로가 풀리지 않을 수 있습니다. 앱 전체에서 하나의 core가 선택됩니다. 이곳에는 프로젝트별 스위치가 없으므로, 폭넓은 core 하나를 골라 두세요.
구성 (환경 변수)
변수 | 필수 | 설명 |
| 예 | Khwan 대시보드에서 발급한 키 ( |
| 아니요 | 격리된 core/브레인 선택 (기본값: 계정의 기본 core). |
| 아니요 | 최종 사용자별 격리된 서브 브레인(유료); |
| 아니요 | API 베이스 URL을 덮어씁니다 — 예: 로컬 엔진 |
도구
도구 | 언제 |
| 세션/서브에이전트 시드 — 합성된 |
| 이후 세션을 위한 지속 가능한 fact/선호도를 저장합니다. |
| 전체 루프, 답변 전 — 메모리 컨텍스트 + |
| 전체 루프, 답변 후 — 턴을 저장해 Khwan이 학습하게 합니다. |
| 브레인이 현재 기억하고 있는 내용을 확인합니다. |
| 계정에 있는 격리된 core 목록을 보여줍니다. |
khwan_recall / khwan_remember는 캐싱 호스트를 위한 토큰 스마트 쌍이고, khwan_prepare / khwan_record는 커스텀 에이전트를 위한 전체 루프입니다(이 정확한 turn_token 준비에서 record로 전달하세요).
무엇이 반환되며, 빈 답변이 의미하는 바
khwan_recall은 최대 세 개의 사실을 반환합니다 — 그 상한은 서버의 것이므로 limit는 낮출 수 있어도 높힐 수는 없습니다 — 그리고 많은 과거 턴에서 합성 모듈이 정제한 lessons도 함께 반환하지. lessons가 seed_text의 앞에 옵니다: 몇 달에 걸쳐 얻은 규칙이 인덱스에서 근처에 있다고 마침 우연히 지나간 한번의 턴보다 우위에 있습니다.
검색에는 관련성 하한값이 적용되므로 빈 facts도 하나의 답변입니다: 브레인에 이 질문과 가까운 내용이 없다는 뜻입니다. 그것을 실패가 아닌 "여기서는 알 수 없다"고 읽고, 가장 가까운 사실 하나에 의하지 그 빈 곳을 메우지 마세요.
그 하한값은 의도적으로 낮게 잡혀 있습니다. 잘못 버려진 기억은 발견할 수 없지만, 잘못 보관된 기억은 그렇지 않기 때문입니다. 반환된 사실이 대체로 관련되어 있다고 생각하고, 확실히 관련 있다고 생각하지 말며, 신뢰하기 전에 반드시 읽어보세요.
이미 해둔 작업으로 브레인 시드하기
새 브레인은 아무것도 모르기 때문에 처음 몇 주는 기억이 흐미합니다. 그런데 정답은 이미 호스트의 트랜스크립트 속에 읽히지 않은 채 있는 경우가 많습니다. examples/backfill/을(를) 통해 Claude Code 트랜스크립트를 브레인에 재생합니다: 결정적이며, 모델 호출이 없고, 기본적으로 dry-run입니다.
python3 examples/backfill/backfill_claude_code.py --map cores.json항상 켜져 있는 메모리 (Claude Code hooks)
위 도구들은 Claude가 결정할 때만 호출됩니다. 모델에 의존하지 않는 결정적 메모리가 필요하다면, examples/claude-code-hooks/에 있는 hook preset을 쓰세요. UserPromptSubmit 훅이 모든 프롬트에 메모를 주입하고 Stop 훅이 모든 답변을 기록합니다.
⚠️ 캐싱 호스트에 있다면, 이것은 값음 싼 옵션이 아니라 철저한 옵션입니다. 매 턴 토큰이 늘어납니다. 토큰 책임보다 회수 신뢰성이 더 중요할 때(또는 비캐싱 클라이언트를 쓸 때) 이 방식을 우선하세요. 그렇지 않으면 세션 시작부터
khwan_recall을 사용하세요.
소스
github.com/khwanlabs/khwan-mcp — 이 서버는 여러분의 컴퓨터에서, 여러분의 키로, 여러분의 입력을 읽을 실행됩니다. 설치하기 전에 먼저 읽어 보신..
License
MIT — © Khwan Labs. LICENSE를 참조하세요.
Available Tools
6 toolskhwan_coresA
List the isolated cores (brains) available on this account.
Each core is a fully isolated brain — its own memory, identity and learning.
HOW A CORE IS SELECTED DEPENDS ON HOW YOU CONNECTED, and the two are not interchangeable:
stdio (this package run locally): the
KHWAN_COREenvironment variable, read once at startup. Changing it needs a restart.remote (a hosted URL): the path —
/mcp/{core}/{user}. The path asks, the token answers.KHWAN_COREdoes NOTHING here; setting it and expecting the brain to change is a silent no-op.
On a remote connection, do not advise KHWAN_CORE. To reach a different
brain, point the client at a different URL — usually by adding a second MCP
server entry for it, so each keeps its own credentials and no re-auth is
needed to switch.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does so thoroughly. It discloses the startup-only read of KHWAN_CORE, the restart requirement, the silent no-op on remote connections, and the /mcp/{core}/{user} path-and-token model. This is exceptional transparency for a list tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The purpose is front-loaded in the first sentence, and the bulleted structure makes the connection-mode distinctions easy to scan. The description is longer than average, but every section addresses a real behavioral pitfall or selection rule; only the mild flourish 'The path asks, the token answers' is expendable, and it is not harmful.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter list tool with an output schema, this description is complete: it explains what is listed, how the result is determined, the silent-failure trap, and how to switch brains on remote connections. There are no annotation or output-format gaps that the description would need to fill.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameters, so there is nothing for the description to add beyond the schema. The conceptual explanation of cores is useful but is not parameter semantics; the baseline of 4 for a zero-parameter tool applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('List') and a specific resource ('isolated cores available on this account') while also defining what a core is. The listing intent is unmistakable and distinct from the sibling tools, which all perform memory-related actions rather than enumeration.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides clear context for how the tool's result is determined by connection mode, and gives explicit when-not guidance: on a remote connection, do not advise KHWAN_CORE and instead point the client at a different URL. It does not name sibling alternatives, but none of the siblings are listing tools, so the primary usage ambiguity is well covered.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
khwan_memoryA
Inspect what this brain currently remembers, newest first.
A DEBUGGING window on the brain, not a way to seed a session. It returns
recent entries in time order and ignores what you are working on, so it
answers "is anything in here / did that write land" — not "what is relevant
to this task". For the latter use khwan_recall, which ranks by meaning
and returns a bounded set. No model is called.
Reach for it when a recall came back empty and you want to know whether the
brain is empty or merely has nothing close, when confirming a
khwan_remember persisted, or when the user asks what Khwan knows.
Args: limit: max entries to return, newest first (default 20).
Returns: The brain's recent memory entries, in the order they were written.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fully bears the responsibility of explaining behavior. It goes beyond expected by stating 'No model is called,' 'ignores what you are working on,' and positions the tool as a debugging window rather than a session-guiding tool. These details illuminate performance, context-invariance, and safety in ways annotations and schema could not.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Every sentence earns its place: primary behavior, key caveat, usage contexts, args, and returns. It is concise enough to parse quickly yet complete enough to avoid misinference, and its most important disambiguation against khwan_recall appears early instead of buried at the bottom.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter, read-only inspection tool with an output schema present, the description covers everything needed to call correctly: order of results, context sensitivity, why to invoke it, and what it returns. The explicit when-not-to-use guidance and sibling reference make it complete in context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Because schema description coverage is 0%, the description is essential and it fully compensates. It explicitly defines limit as 'max entries to return, newest first (default 20),' adding meaningful semantics beyond the schema's bare 'Limit' integer. For a single parameter, this is complete.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening line uses a specific verb and resource: 'Inspect what this brain currently remembers, newest first.' It also explicitly distinguishes itself from khwan_recall by saying it answers 'is anything in here / did that write land', not 'what is relevant to this task.' This makes the tool's purpose unmistakable even among six siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly carves out when to use this tool vs alternatives: for khwan_recall when you need meaning-ranked, bounded results; for khwan_memory when recall came back empty or when confirming a khwan_remember write persisted. It also states clear no-seeding-a-session boundary, giving an agent decisive routing criteria beyond simple sibling overlap.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
khwan_prepareA
Pull the memory-enriched context for a turn BEFORE you answer.
Khwan builds context from memory + the brain's constitution + a coherence
gate. No model is called. Ground your reply in the returned context and
respect allowed/reason. Keep the returned turn_token and pass it
to khwan_record after you answer.
Args: input: The user's message / the turn you are about to answer.
Returns: context: ready-to-use messages (memory + constitution) to ground your reply. coherence: optional float — how coherent this turn is with the brain (may be None). allowed: whether Khwan's coherence gate permits answering. reason: why, when not allowed (else None). turn_token: opaque token — pass it verbatim to khwan_record.
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses a crucial behavioral trait: 'No model is called.' It also explains the exact output types (context, coherence, allowed, etc.), shows how the coherence gate works, and clarifies that turn_token is opaque and must be passed verbatim. This is far beyond the input schema and greatly helps an agent form correct expectations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is tightly structured and front-loaded: the command phrase appears first, followed by a brief explanation, then consise Args/Returns lists. There is no redundant prose or restatement of the tool name.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool that has no output schema, the description fully defines the request input, the returned fields, how to react to allowed/reason, and how to continue into khwan_record. The agent has everything it needs to call and integrate the result correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema contains only a required field named 'input', with no description; the description expands it to 'the user's message / the turn you are about to answer', resolving ambiguity. The Returns section is also effectively a response contract, though not technically a parameter description. For a single-parameter tool, semantics are well covered.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description starts by stating an explicit action ('Pull') and exact timing ('BEFORE you answer') and names the core resources (memory-enriched context). It clearly separates this tool from khwan_record by establishing a prepare/record workflow, so the agent cannot confuse it with siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives direct, actionable usage: call before answering, ground the reply in context, respect allowed/reason, and pass turn_token to khwan_record afterward. It does not enumerate alternative conditions for khwan_memory or khwan_cores versus khwan_prepare, but the workflow ordering is explicit enough.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
khwan_recallA
SEED a session/subagent with a COMPACT, bounded set of relevant memories.
The token-smart entry point for a caching host (Claude Code, Claude Desktop): call it ONCE at the start of a session or subagent — or when you need a fact that has scrolled out of context — NOT on every turn. It returns only the relevant facts (not Khwan's full prepared prompt), so you seed a fresh, bounded context instead of replaying a transcript. No model is called.
Two limits are worth knowing, because neither is this tool's to set:
Three facts is the ceiling. The server ranks a wider candidate pool and keeps its top three, so
limitcan only narrow that further, never widen it. Asking for more returns three.A relevance floor applies, so an EMPTY
factsis an answer. It means the brain has nothing close to this question — read it as "not known here", not as a failure. Do not retry with a reworded query hoping for more, and do not fill the gap with whichever fact happened to be nearest.
Lessons — what synthesis distilled from many turns — come back alongside the raw exchanges and LEAD the seed text: a rule earned over months outranks any single turn that happens to sit nearby in the index.
Args: query: the task or topic to recall memory for. Phrase it as the work you are about to do, not as a keyword — it is matched on meaning. limit: cap on facts returned, 1-3. The server's own ceiling is 3, so this can only lower it. Leave it alone unless you want fewer than three.
Returns: lessons: rules synthesis distilled from many past turns. facts: [{you_said, khwan_knows}] — the relevant remembered exchanges. count: how many facts were returned. seed_text: a ready-to-drop-in memory block for a subagent's brief ("" if none).
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Even without annotations, the description discloses key behaviors: the server ranks and enforces a top-3 ceiling, a relevance floor can cause empty facts which is a valid answer, lessons lead the seed text, and no model is called. It explicitly mentions that limit can only narrow not widen, and that seed_text can be empty. This is far beyond what annotations would normally provide.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is longer than typical but each section earns its place: the opening sentence states purpose, the constraints are genuinely important and specific to the tool, and the returns section aligns with the schema. However, the call-to-action highlighting bold and paragraph spacing adds length; the seed_text return description is slightly redundant with 'facts' and 'lessons' in the returns listing. There is a small amount of wasted space around the returns details, but overall it is structured and scannable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having no formal annotations, the description thoroughly covers when to call, what it returns, what the limits are, how to interpret empty facts, and how to phrase the query. The output schema fills in the structure details, and the description adds semantics about the returned lessons leading the seed, the count, and seed_text. For a memory tool with no annotations, this is more than complete enough for an agent to invoke it safely and effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% in this context, so the description carries the full burden. It actually does that: query is defined as a meaningful task description matched on meaning, and limit is described as a cap between 1-3 and can only narrow. That is strong semantic enrichment of the input schema. I'd give 5, but the description doesn't specify the default or required behavior of limit beyond 'leave it alone unless...'—though it implicitly references the default 3. Minor gap relative to perfect.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description says explicitly that this tool SEEDs a session/subagent with a compact bounded set of relevant memories, names the exact resource (relevant memories/facts) and the verb (seed/recall). It distinguishes itself from siblings by positioning itself as the token-smart entry point for recall at session start, not per-turn, and by noting that no model is called. It is neither tautological nor vague.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives direct instructions: call ONCE at session start or when a fact scrolled out of context, NOT on every turn. It also explains when to avoid retrying on empty results and warns about the relevance floor. It doesn't explicitly name an alternative sibling, but it clearly defines the expected invocation context and anti-patterns, which is stronger than merely naming a sibling.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
khwan_recordA
Hand your answer back to Khwan AFTER you reply, so it persists + learns.
Args:
turn_token: the exact token returned by the matching khwan_prepare.
answer: the answer you gave the user for that turn.
Returns: Khwan's record acknowledgement (persisted state / next-turn hints).
| Name | Required | Description | Default |
|---|---|---|---|
| answer | Yes | ||
| turn_token | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full responsibility for behavioral disclosure. It reveals that calling this tool persists state, learns, and returns next-turn prompts or an acknowledgement, which matters because this is a stateful write-like operation. It doesn't cover failure modes or idempotency, but it does address the most impactful behavior: the record affects future turns.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately short and front-loaded with the action and intent. The Args/Returns format is scannable, though the same message that the interplay between the initial sentence and the Returns line, keeping it slightly noise. Still, every sentence contributes value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (two required string parameters, no output schema), the description covers the essential context: when to call it, where the token comes from, and what the return will be. It could mention error cases or reiterating confirmation requirement more explicitly, but enough for an agent to call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, yet the description adds precise meaning to both required parameters. turn_token is defined as the exact token returned by the matching khwan_prepare, and answer is identified as the actual answer given to the user for that turn—far beyond the schema's simple string types.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action with a clear resource: hand the answer back to Khwan AFTER replying, so that the interaction persists and Khwan learns. It also distinguishes itself from the sibling workflow by pointing back to khwan_prepare, making the tool's role in a two-step process explicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives explicit timing guidance (AFTER you reply) and explains the exact required input provenance (the token returned by khwan_prepare). This is enough for an agent to know when to call this tool versus the prepare tool, and the sentence about matching token prevents misuse.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
khwan_rememberA
Persist a durable fact/preference so FUTURE sessions can recall it.
A convenience over the prepare→record loop for the common "just remember this"
case: it stores fact in the brain (no model call) so it outlives this
session's context window and is available to the next khwan_recall.
Reach for this the moment you are corrected. A user rejecting your work, or telling you how they want it done, is the most durable thing a session produces and the easiest to lose — you fix the thing, the session ends, and the next one makes the same mistake. If the user is telling you something for the second time, the first time should have been stored here.
Write the standing RULE, not the utterance. "Deploys go to staging first, never straight to production" survives into a session that never saw the conversation; "no, not like that" does not.
Args: fact: the durable rule/preference to store, phrased to stand alone.
Returns: stored: whether the fact was persisted; reason when not.
| Name | Required | Description | Default |
|---|---|---|---|
| fact | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly states what happens inside the tool: it stores a fact, makes no model call, outlives the context window, and is later reachable via `khwan_recall`. It also describes the return shape (`stored` and `reason` when not persisted).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with its core purpose, then gives the strongest usage signal, then provides parameter and return semantics. Every section adds operational value; the relatively longer 'Reach for this' paragraph is justified because it tells the model exactly when to invoke the tool, not just why it exists.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has exactly one parameter and an output schema, so the required usage surface here is small. The description covers persistence semantics, return value, and a sibling relationship (`khwan_recall`). It gives the agent enough to invoke the tool correctly without needing to infer anything essential.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description's Args section fully compensates: it defines `fact` as a durable rule or preference that must stand alone. It reinforces the meaning with a concrete example contrasting a standalone rule with an unusable utterance. This is ample semantic guidance for a single string parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description is centered on a specific verb and resource: "Persist a durable fact/preference" so future sessions can recall it, and it explicitly says it stores `fact` in the brain with no model call. It distinguishes itself from the prepare→record loop and states it is available to the next `khwan_recall`, which removes ambiguity versus siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives a very explicit usage trigger: "Reach for this the moment you are corrected." It also contrasts this tool with the more elaborate prepare→record loop, and the 'standing RULE, not the utterance' guidance tells the agent how to phrase the fact. This is far more than a generic call-to-action.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v0.3.5- First observed
khwan_cores - First observed
khwan_memory - First observed
khwan_prepare - First observed
khwan_recall - First observed
khwan_record - First observed
khwan_remember
TDQS
Scored across 6 tools
The tools split into two semantically overlapping pairs—prepare/recall for retrieval and record/remember for persistence—but the descriptions clearly separate turn-by-turn context from session seeding, and structured recording from standalone fact storage. khwan_memory and khwan_cores are unambiguous. An agent must read carefully, but misselection risk is low.
All tools share the khwan_ prefix and use lowercase snake_case, with most names being imperative verbs: prepare, record, recall, remember. khwan_memory and khwan_cores break the verb pattern by being plain nouns, making the set slightly inconsistent but still readable and predictable.
Six tools is a well-scoped size for a memory/context server: two for the turn loop, one for session seeding, one for direct persistence, one for debugging, and one for core isolation. Each tool has a clear job and none feels redundant.
The core memory lifecycle is covered: prepare/record for turns, remember for durable facts, recall for retrieval, and memory for inspection. However, there is no explicit forget/update or memory-editing tool, which is a notable gap for a persistent brain, though it does not break the main workflows.
Maintenance
Related MCP Connectors
Persistent memory for AI agents to retain, retrieve, and recall conversation context through MCP.
Persistent personal memory for AI assistants — save, search, and recall across every MCP client.
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
- KogniteOAuthdev.kognite
Hosted agent memory: store, search, and recall facts across sessions from any MCP client.
Related MCP Servers
AlicenseNot gradedqualityBmaintenanceEnables persistent memory storage and retrieval for MCP clients, allowing AI assistants to remember facts and context across conversations.21 npmMIT- AlicenseAqualityDmaintenanceProvides persistent memory for AI assistants via MCP, enabling them to store and recall facts, preferences, and tasks across conversations using either local file storage or a cloud backend with semantic search.57 npmMIT
- AlicenseNot gradedqualityAmaintenanceProvides AI agents with persistent, human-like memory infrastructure via MCP, enabling them to store, search, summarize, and forget episodic, semantic, procedural, and working memories across sessions.1,237 npmMIT
- AlicenseAqualityBmaintenanceEnables AI agents to persist memory across sessions through MCP, supporting semantic retrieval, source-backed context, knowledge graph relationships, supersession lineage, and topic digests.431MIT