zhiji-memory
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@zhiji-memory Find my memories about the marketing campaign proposal"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
知己 (Zhiji) Memory — MCP Server
Chinese-first, brain-inspired long-term memory as an MCP server. Give any MCP client — Claude Desktop / Claude Code / Cursor / Cline / Cherry Studio / Coze — the ability to remember and understand your user across sessions.
中文用户:完整接入手册见
MCP-USAGE.md,或在线版 https://ai-know.me/mcp。
v0.4.0 · 9 tools / 2 resources / 1 prompt · stdio + Streamable HTTP · MCP protocol 2025-11-25
This repo is a thin bridge: it translates MCP tool calls into REST calls to the Zhiji backend (hosted at ai-know.me). The bridge stores nothing; all memory lives in the Zhiji service you connect to.
Why not just another vector-memory MCP?
Mem0 / Zep / LangMem expose add / search / delete over a vector store. 知己 exposes brain-inspired primitives:
11-stage hybrid retrieval — trigram full-text +
bge-large-zhsemantic + time-decay + access-reinforcement + dedup ranking.7-layer / 37-dimension evolving user profile — values, decision logic, behavior style, self-cognition, interoceptive & dynamic state.
Workspace assembly — one call returns profile + relevant memories + confirmed facts + behavioral inferences, budget-trimmed for the client context window.
Prospective reminders, multimodal ingest (audio / OCR / doc), and a self-evolving reward loop driven by user feedback.
All Chinese-optimized (trigram tokenizer + bge-large-zh); English is supported too. Memory is stored in the Zhiji backend you connect to — self-host it, or use the hosted ai-know.me service; either way it's your Zhiji instance, not a generic memory-SaaS middleman.
Related MCP server: memento-mcp-server
Tools, resources & prompts
9 tools, grouped by role. Every user-scoped tool takes userEmail (or falls back to MB_USER_EMAIL); only the notable extra params are listed.
Read — understand the user
Tool | What it does | Notable params |
| Flagship. One call returns everything needed to understand this user for a query — relevant memories + profile + confirmed facts + behavioral inferences (plus counterfactual & cross-domain hints). Drop straight into any LLM's context. |
|
| Lighter, recall-only: the 11-stage hybrid pipeline (trigram FTS + semantic + time-decay), returns scored snippets with sources. |
|
| 7-layer / 37-dim user profile as an inject-ready natural-language summary. | — |
| Structured atomic facts (subject attribution, confidence, conflict status) — for exact names/dates/counts, not narrative. | — |
| Due/upcoming intentions (todos, promises, plans) within a time window — for proactively nudging the user. |
|
Write — feed memory
Tool | What it does | Notable params |
| Write a conversation turn to long-term memory; async embedding + profile/fact extraction + importance scoring follow. Text only. |
|
| Multimodal ingest — audio / image / PDF / Word / Excel / video → Whisper transcribe / Tesseract OCR / doc parse → memory. Audio & video also get acoustic-emotion analysis. | one of |
Ops — improve & diagnose
Tool | What it does | Notable params |
| Thumbs up/down on the last recall/answer → feeds the self-evolution reward and reinforces (or penalizes) the Q-value of recently retrieved memories. The "gets better the more you use it" loop. |
|
| Health & memory scale (files / chunks / FTS availability). Call first to verify connectivity. | — |
2 resources — zhiji://schema/dimensions (authoritative 7-layer / 37-dim profile schema) · zhiji://server/status (live service status).
1 prompt — personal-context: weaves profile + memories + facts into a ready-to-prepend system prompt for a given query.
Experimental capabilities (sleep consolidation / dream replay / emergence) are not exposed until their groundedness passes ablation.
Typical flow
zhiji_status → verify connectivity
zhiji_memory_ingest → feed a conversation (or zhiji_ingest_file for audio/docs)
zhiji_workspace_assemble → in a *new* session, recall + understand the user
zhiji_feedback → thumbs up/down, closing the self-evolution loopQuick start
You need an agent Key (mb- prefix). Get one at https://ai-know.me/memory?tab=api (register + create a Key bound to your account).
Option A — remote, no install (recommended)
Point any Streamable-HTTP MCP client at the hosted endpoint — you don't need this repo at all:
claude mcp add zhiji-memory --transport http \
--url https://ai-know.me/mcp \
--header "Authorization: Bearer mb-yourKey"Or in a URL-style client config (Cursor / Cherry Studio / LobeChat):
{
"mcpServers": {
"zhiji-memory": {
"url": "https://ai-know.me/mcp",
"headers": { "Authorization": "Bearer mb-yourKey" }
}
}
}Option B — run this bridge locally (stdio)
Use this repo when you want the bridge as a local stdio process (e.g. a desktop client launches it for you), talking to the hosted Zhiji backend:
npm install # only @modelcontextprotocol/sdk + zodThen in your client config:
{
"mcpServers": {
"zhiji-memory": {
"command": "node",
"args": ["/absolute/path/to/zhiji-mcp/zhiji-mcp-server.mjs"],
"env": {
"MB_BASE_URL": "https://ai-know.me",
"MB_API_KEY": "mb-yourKey"
}
}
}
}Verify
# visual debugger — should list 9 tools / 2 resources / 1 prompt
npx @modelcontextprotocol/inspector node zhiji-mcp-server.mjsFull client matrix (LangChain, OpenAI Agents SDK, Coze…) is in MCP-USAGE.md.
Architecture — a stateless thin bridge
MCP client ──stdio / HTTP(JSON-RPC)──► zhiji-mcp-*.mjs ──REST──► Zhiji backend (ai-know.me)The MCP layer stores nothing; it translates MCP tool calls into REST calls to the Zhiji backend. Shared core zhiji-mcp-core.mjs backs both entry points:
File | Role |
| Tool/resource/prompt definitions (single source of truth) |
| stdio entry ( |
| Streamable HTTP entry ( |
Isolation & auth
All data is hard-isolated by
userEmail. The bridge treatsuserEmailas a namespace, not a credential.The hosted public endpoint requires an agent Key — requests without
Bearer mb-…get 401; the backend binds each Key to its userEmail and rejects cross-user access.Never hand a key-less, userEmail-swappable bridge to end users — front it with your own backend that injects the correct userEmail. See
MCP-USAGE.md §8.
Environment
Var | Default | Notes |
|
| Zhiji backend address; for the hosted service use |
| — | default user namespace (single-user local use) |
| — |
|
|
| slow workspace routes can take ~15s |
Status
Version | Highlights |
v0.4 |
|
v0.5 (planned) | inference-list tool, resource subscriptions, fine-grained key permissions |
Docs
MCP-USAGE.md— full guide (install, all clients, per-tool reference, troubleshooting, FAQ)Online: https://ai-know.me/mcp
License
MIT © 2026 知己 AI (ai-know.me)
知己 AI · MCP integration — Chinese-first brain-inspired memory. The bridge is open; the memory intelligence lives in the Zhiji backend.
Available Tools
9 toolszhiji_facts_getAInspect
获取从对话中抽取的结构化事实清单(主体归属、置信度、冲突状态)。适合需要精确事实而非叙述性记忆的场景(如核对姓名/日期/数量)。
Inputs: userEmail.
zhiji_feedbackAInspect
对知己最近一次记忆召回/回答的质量提交显式反馈(点赞/点踩)。反馈会进入知己的自演化奖励信号(implicitPositiveRate),并对最近检索到的记忆块做 Q 值强化(赞)或惩罚(踩)——这是让 agent 的使用效果反哺记忆系统、使其越用越懂用户的闭环入口。rating=up 表示记忆/回答有帮助且准确,down 表示记错/答非所问。⚠️ 若希望反馈精确落到具体记忆块(而非仅计入全局奖励),请在同一会话里先调用 zhiji_workspace_assemble 或 zhiji_memory_search,再调用本工具。
Inputs: rating (required), note, weak, query, +1 more.
zhiji_ingest_fileAInspect
把一个文件(音频/录音/图片/PDF/Word/Excel/视频等)经知己既有抽取管线(Whisper 语音转写 / Tesseract OCR / 文档解析)转成文本后写入长期记忆——这是让音视频与文档'进记忆'的入口(zhiji_memory_ingest 只收文本)。来源三选一:path=MCP 服务器本机可读的文件路径(适合 stdio 本地客户端);url=http(s) 链接(桥接可下载);base64=内联字节(适合远程 HTTP 客户端的小文件)。⚠️ 音视频转写在 CPU 上可能耗时数分钟,请把客户端超时调大并耐心等待。★音视频还会做声学情绪分析(音量/语速/声纹情绪)存入情绪库;isUserVoice=true(确认是用户本人的录音/视频)时,声学情绪进一步汇入用户画像「声学情绪基调」——非用户本人的音频(播客/他人声音)务必留默认 false,否则会污染画像。
Inputs: url, path, base64, filename, +3 more.
zhiji_memory_ingestAInspect
把一轮对话写入用户的长期记忆。写入后系统异步完成:向量嵌入、画像提取、事实抽取、重要度评分等。messages 必须成对提供 user 与 assistant 发言(至少一条 user)。⚠️ 本工具只收文本;音频/录音/图片/PDF/Word/Excel/视频等文件请改用 zhiji_ingest_file(经既有抽取管线转写/OCR/解析后进记忆)。
Inputs: messages (required), conversationId (required), botId, userEmail.
zhiji_memory_searchAInspect
在用户的长期记忆中做混合搜索(全文 trigram + 向量语义 + 时间衰减加权的 11 阶段管线),返回带来源与评分的记忆片段。比 workspace_assemble 轻量,适合只要召回不要推理的场景。
Inputs: query (required), userEmail, maxResults.
zhiji_profile_getAInspect
获取用户画像的文本摘要(7 层 36 维:基础身份/自传体记忆/思维准则/行为方式/内感知状态/动态状态/涌现洞察)。返回适合直接注入系统提示词的自然语言摘要。
Inputs: userEmail.
zhiji_prospective_dueAInspect
查询用户当前窗口内到期/临期的前瞻性意图(待办、承诺、计划)。返回描述、触发条件、到期时间。适合 agent 在对话开始时主动提醒用户'该做某事了'。数据来自知己前瞻监控(prospective-monitor)。
Inputs: hours, userEmail.
zhiji_statusAInspect
查询 memory-bridge 服务健康状态与规模(文件数/记忆块数/FTS 可用性)。用于连通性诊断。
Inputs: no named parameters.
zhiji_workspace_assembleAInspect
组装知己的统一记忆上下文(工作空间):对一个查询返回相关记忆片段(memoryContext)、用户画像摘要(profile)、事实(factContext)、推论提示(inferenceHints)、反事实推演(counterfactualHint)、跨域联想(emergenceHint)等。这是把'懂用户'注入任何 LLM 对话的一站式入口。注意:慢思考查询(假设/对比类)因触发 LLM 推演,延迟可达 10-15 秒。
Inputs: query (required), userEmail, maxResults.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool targets a distinct operation: memory assembly, search, ingestion, profile/facts retrieval, status, proactive reminders, and feedback. Even the similar workspace_assemble and memory_search are clearly differentiated by depth (inference vs recall-only). No overlapping purposes.
All tools use snake_case with 'zhiji_' prefix, but verb placement varies: some are verb_noun (workspace_assemble, memory_search), others noun_verb (profile_get, facts_get), and 'status' is just a noun. Minor inconsistency but still predictable and readable.
9 tools is well-scoped for a memory server. Each tool serves a clear need: ingest (text and file), search (light and heavy), retrieve profile/facts, status check, proactive reminders, and feedback. Nothing feels extraneous or missing.
Covers creation (ingest) and retrieval (search, profile, facts) well, but lacks update/delete tools for memories. Feedback allows quality adjustments but not content modifications. Prospective and status are nice additions, but lack of full CRUD is a notable gap.
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, verbatim, searchable memory for AI assistants — one memory across every MCP client.
Shared cross-LLM long-term memory over MCP: semantic recall, sessions, and media (pgvector).
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceMCP server that dynamically extracts and manages user memory from LLM conversations, enabling consistent personalization across different models.7-
- AlicenseNot gradedqualityBmaintenanceProvides 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.280 npmMIT
- AlicenseNot gradedqualityBmaintenanceProvides AI-assisted long-term memory storage and retrieval with exact-phrase and semantic hybrid search, enabling save, read, delete, and admin recovery via MCP tools.4MIT
- AlicenseNot gradedqualityBmaintenanceA personal AI memory service based on MCP protocol that provides long-term memory capabilities for various AI clients.MIT