Khwan MCP server
{
"mcpServers": {
"khwan": {
"command": "uvx",
"args": [
"khwan-mcp"
],
"env": {
"KHWAN_API_KEY": "<khwan_api_key>",
"KHWAN_BASE_URL": "https://..."
}
}
}
}{
"mcpServers": {
"khwan": {
"command": "uvx",
"args": [
"khwan-mcp"
],
"env": {
"KHWAN_API_KEY": "<khwan_api_key>",
"KHWAN_BASE_URL": "https://..."
}
}
}
}{
"mcpServers": {
"khwan": {
"command": "uvx",
"args": [
"khwan-mcp"
],
"env": {
"KHWAN_API_KEY": "<khwan_api_key>",
"KHWAN_BASE_URL": "https://..."
}
}
}
}{
"servers": {
"khwan": {
"command": "uvx",
"args": [
"khwan-mcp"
],
"env": {
"KHWAN_API_KEY": "${input:khwan_api_key}",
"KHWAN_BASE_URL": "${input:khwan_base_url}"
}
}
},
"inputs": [
{
"id": "khwan_api_key",
"type": "promptString",
"description": "Khwan api key",
"password": true
},
{
"id": "khwan_base_url",
"type": "promptString",
"description": "Khwan base url",
"password": true
}
]
}{
"mcpServers": {
"khwan": {
"command": "uvx",
"args": [
"khwan-mcp"
],
"env": {
"KHWAN_API_KEY": "<khwan_api_key>",
"KHWAN_BASE_URL": "https://..."
}
}
}
}file .mcp.json (in your project root)file claude_desktop_config.jsonfile ~/.cursor/mcp.jsonfile .vscode/mcp.jsonfile ~/.codeium/windsurf/mcp_config.jsoninstall uvx khwan-mcpversion 0.3.12
What it does
khwan-mcp is an MCP server that connects the Khwan persistent memory service to Claude Code, Claude Desktop, or any MCP client. It lets agents store distilled facts across sessions and recall them in later sessions or subagents without replaying full transcripts. Intended for developers building agents that need memory that survives beyond a single session.
- Seed a new session or subagent with relevant facts recalled from previous sessions, avoiding full transcript replay.
- Persist durable decisions, preferences, or project facts so they are available in future sessions.
- Inspect the current contents of an isolated brain (core or sub-brain) to audit what the memory layer has retained.
Tools this server exposes
| Tool | Does |
|---|---|
| khwan_recall | Retrieves synthesised lessons and up to three relevant facts for a query to seed a session or subagent. |
| khwan_remember | Persists a single durable fact or preference for retrieval in future sessions. |
| khwan_prepare | Full-loop variant: fetches memory context before answering and returns a turn_token for recording. |
| khwan_record | Full-loop variant: persists a completed turn using the turn_token returned by khwan_prepare. |
| khwan_memory | Lists the facts currently stored in the active brain, up to a configurable limit. |
| khwan_cores | Lists the isolated cores available on the account. |
Before you enable it
An MCP server runs with whatever access you give it. Start with a development account rather than production, and check which tools the server exposes before you let an agent call them unattended.