# Khwan (pypi · khwan-mcp)

Durable AI memory: recall distilled facts in a later session or subagent, and remember new ones.

- Trust score: 77/100 (medium)
- Change this week: +3
- Registry status: active
- Liveness: degraded
- Owner verified: no
- Last scored: 2026-09-20

> **Degraded**: one or more channels of this server are currently unreachable; their trust score is decaying and will reach 0 if they stay down.

## Components

- remote · `mcp.khwan.ai`: 22/100, [markdown](https://verifymcp.io/servers/ai-khwan-khwan-mcp/mcp-core-user.md), [page](https://verifymcp.io/servers/ai-khwan-khwan-mcp/mcp-core-user)
- pypi · `khwan-mcp`: 77/100 (this document), [markdown](https://verifymcp.io/servers/ai-khwan-khwan-mcp/khwan-mcp.md), [page](https://verifymcp.io/servers/ai-khwan-khwan-mcp/khwan-mcp)

## Channel facts

- Registry: `pypi`
- Package: `khwan-mcp`
- Version: `0.3.12`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-09-20.

- **Supply Chain Security**: 100/100
  - No malware found by supply-chain analysis.
  - No known CVEs affecting this package version or its production dependencies.
  - Runs hatchling.build at install time, a recognised native-build step with no shell scripting around it.
  - 0 of 33 dependencies flagged as unhealthy.
- **Provenance & Transparency**: 45/100
  - Source repository is publicly reachable at the declared URL.
  - Provenance check failed: no build-provenance attestation is published.
  - Clear OSI-approved license (MIT).
  - Actively maintained (last published 23 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 57/100
  - AI-judged instruction clarity (good).
  - Context-footprint check failed: tool/resource definitions use about 1911 tokens (~318/item across 6 items; 6 tools + 0 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 87/100
  - Stability observed for 26 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 71/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 0% of tool parameters carry a description.
  - Structured output schemas are declared (100% of tools); any adoption earns full credit.
- **Tool Safety**: 100/100
  - No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.
  - We read all 6 captured tool definition(s), and no name or description among them implies an irreversible operation.
  - An AI judge read all 7 captured unit(s) of tool text and found none that tries to manipulate the model reading it.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### How do I install the Khwan MCP server?

Khwan runs locally as a PyPI package, launched with uvx khwan-mcp. Ready-made configuration for Claude, Cursor, VS Code, Codex and 5 more is on this page, copied from each client's own documentation.

### Claude

```bash
claude mcp add ai-khwan-khwan-mcp -- uvx khwan-mcp
```

### Cursor

```json
{
  "mcpServers": {
    "ai-khwan-khwan-mcp": {
      "command": "uvx",
      "args": [
        "khwan-mcp"
      ]
    }
  }
}
```

### VS Code

```json
{
  "servers": {
    "ai-khwan-khwan-mcp": {
      "command": "uvx",
      "args": [
        "khwan-mcp"
      ]
    }
  }
}
```

### Codex

```bash
codex mcp add ai-khwan-khwan-mcp -- uvx khwan-mcp
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "ai-khwan-khwan-mcp": {
      "type": "local",
      "command": [
        "uvx",
        "khwan-mcp"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add ai-khwan-khwan-mcp --command uvx --arg khwan-mcp
```

### Hermes

```yaml
mcp_servers:
  ai-khwan-khwan-mcp:
    command: "uvx"
    args: ["khwan-mcp"]
```

### Netclaw

```json
{
  "McpServers": {
    "ai-khwan-khwan-mcp": {
      "Transport": "stdio",
      "Command": "uvx",
      "Arguments": [
        "khwan-mcp"
      ]
    }
  }
}
```

### Vellum

```bash
assistant mcp add ai-khwan-khwan-mcp -t stdio -c uvx -a khwan-mcp
```

### Other

```json
{
  "mcpServers": {
    "ai-khwan-khwan-mcp": {
      "command": "uvx",
      "args": [
        "khwan-mcp"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-09-19 (score 77, +1)

No change was recorded against any check on this day. Stability & Change Management went from 80 to 83. That category is still filling its 30-day observation window: 24 days of observed history at the previous scan, 25 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-09-17 (score 76, +1)

No change was recorded against any check on this day. Stability & Change Management went from 73 to 77. That category is still filling its 30-day observation window: 22 days of observed history at the previous scan, 23 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-09-15 (score 75, +16)

- [security improvement] Malware scan: unverified → pass

### 2026-09-14 (score 59, −15)

- [security regression] Malware scan: pass → unverified

### 2026-09-13 (score 74, +1)

No change was recorded against any check on this day. Stability & Change Management went from 60 to 63. That category is still filling its 30-day observation window: 18 days of observed history at the previous scan, 19 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-09-12 (score 73, +15)

- [security improvement] Malware scan: unverified → pass

### 2026-09-11 (score 58, −14)

- [security regression] Malware scan: pass → unverified

### 2026-09-08 (score 72, +1)

No change was recorded against any check on this day. Stability & Change Management went from 43 to 47. That category is still filling its 30-day observation window: 13 days of observed history at the previous scan, 14 at this one. The score rises as the window fills, whether or not the server changes.

## MCP tools (6)

### `khwan_prepare` (~191 tokens)

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.

Input parameters:

- `input` (string, required)

Output parameters:

- `result` (object)

### `khwan_record` (~91 tokens)

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).

Input parameters:

- `answer` (string, required)
- `turn_token` (string, required)

Output parameters:

- `result` (object)

### `khwan_recall` (~451 tokens)

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 `limit` can only narrow that further, never widen
  it. Asking for more returns three.
\- **A relevance floor applies, so an EMPTY `facts` is 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).

Input parameters:

- `limit` (integer)
- `query` (string, required)

Output parameters:

- `result` (object)

### `khwan_remember` (~246 tokens)

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.

Input parameters:

- `fact` (string, required)

Output parameters:

- `result` (object)

### `khwan_memory` (~193 tokens)

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.

Input parameters:

- `limit` (integer)

Output parameters:

- `result` (object)

### `khwan_cores` (~211 tokens)

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_CORE`` environment
  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_CORE`` does 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.

Output parameters:

- `result` (array)

## Diagnostics

Captured diagnostic sections: Provenance, Install scripts, Dependencies. The full working is on the page: https://verifymcp.io/servers/ai-khwan-khwan-mcp/khwan-mcp#diagnostics

## Score history

- 2026-09-20: 77
- 2026-09-19: 77
- 2026-09-18: 76
- 2026-09-17: 76
- 2026-09-16: 75
- 2026-09-15: 75
- 2026-09-14: 59
- 2026-09-13: 74
- 2026-09-12: 73
- 2026-09-11: 58
- 2026-09-10: 72
- 2026-09-09: 72
- 2026-09-08: 72
- 2026-09-07: 71
- 2026-09-06: 71
- 2026-09-05: 70
- 2026-09-04: 70
- 2026-09-03: 69
- 2026-09-02: 69
- 2026-09-01: 68
- 2026-08-31: 68
- 2026-08-30: 67
- 2026-08-29: 67
- 2026-08-28: 66
- 2026-08-27: 51
- 2026-08-26: 39
- 2026-08-25: 63

## Common questions

### What is the Khwan MCP server?

Khwan is an MCP server listed in the public MCP registry as ai.khwan/khwan-mcp. Durable AI memory: recall distilled facts in a later session or subagent, and remember new ones. This page covers its PyPI package (khwan-mcp).

### Is the Khwan MCP server safe to use?

Khwan scores 77 out of 100 on VerifyMCP. We found no known CVEs affecting it as of 20 September 2026. That is a record of what we were able to check automatically, not an endorsement. The category breakdown on this page shows every signal behind the number, including the ones we could not confirm.

### What tools does the Khwan MCP server expose?

Khwan exposes 6 tools: khwan_prepare, khwan_record, khwan_recall, khwan_remember, khwan_memory, khwan_cores. Their descriptions and schemas cost roughly 1,383 tokens of context every time the server is loaded.

### Is the Khwan MCP server still maintained?

Khwan is still listed as active in the MCP registry. We last reached this channel on 20 September 2026. Those dates come from our own scans of the registry and the channel itself, not from anything the publisher announced.

### What licence is the Khwan MCP server under?

Khwan declares the MIT licence, which is OSI-approved. That covers the source only, and says nothing about the cost of any service it calls.

## Links

- PyPI project: https://pypi.org/project/khwan-mcp/
- Socket report: https://socket.dev/pypi/package/khwan-mcp
- Repository: https://github.com/khwanlabs/khwan-mcp
- Website: https://khwan.ai/
- Changelog RSS feed: https://verifymcp.io/servers/ai-khwan-khwan-mcp/khwan-mcp.xml
- Changelog JSON feed: https://verifymcp.io/servers/ai-khwan-khwan-mcp/khwan-mcp.json
- HTML version of this page: https://verifymcp.io/servers/ai-khwan-khwan-mcp/khwan-mcp
