MCP server for a personal memory engine with FastAPI backend, PostgreSQL storage, and semantic search via embeddings. Exposes tools for saving/retrieving memories, managing identity cards, and persisting conversations across sessions.
Server has 8 tools with complete JSON schemas and descriptions. Naming follows verb_noun convention (get_*, update_*, save_*). However, descriptions are verbose and written in Chinese with mixed English, making them harder for LLMs to parse reliably. Parameter descriptions exist but lack clarity on constraints, ranges, and error conditions. Output schemas are not documented. Error handling guidance is minimal. Tool composition is reasonable but some tools conflate multiple concerns (e.g., get_cards returns 7 card types in one call rather than allowing filtering).
查 archives 原文层。conversation_id 指定就 filter 单次对话; keyword 跨 summary + raw_text 搜索; include_raw=true 才返原文(default false 节省 token)。
比较一张卡片的两个版本 · 返回 before/after 对照。默认参数(只填 card_type): 比对上一版本到当前 · 回答「刚才改了啥」 · 这是看到 settings_change 通知卡片改了之后最常见的用法。可显式指定 from_version / to_version 看任意两版差异 · 版本号见 get_card_history 列表。card_type 必填 · 7 个枚举之一。【看到「[用户/AI/后台总结 更新了卡片『X』 · 版本 N → M]」通知后调用此工具拿对比 · 再决定要不要主动跟用户提】
列一张卡片的历史版本快照(version DESC · 最新到最旧)。card_type 必填 · 7 个枚举之一。limit 可选 · 默认 20 · 上限 100。返回每个版本的 version / content (列表里截断 400 字 · 用 get_card_diff 看完整) / locked / edited_by / archived_at。通常先看 get_card_diff · 想看更深的历史时调这个。
读身份档案的全部 7 张卡片(identity cards)。卡片类型 7 个枚举: preferences / interaction_patterns / current_state / goals / relationships / key_events / interaction_rules。Session 开头协议层一次性注入过这 7 张卡 · 但如对话中夜间 cron 跑过 Pass 3 增量更新 · 或用户从 dashboard 手动改了 · 调此工具重读最新版本。返回每张卡的 card_type / version / content / locked / last_updated / char_count。
读最近对话摘要 · lightweight · 不含原文。Default 30 newest. Use this to scan recent topics cheaply; fetch raw_text on demand via get_archive.
Descriptions are verbose, multilingual (Chinese/English mix), and lack LLM-optimized clarity. Baseline for A+ tools is 50-200 chars; these range 200-800+ chars with mixed language, making parsing unreliable for non-Chinese LLMs.
Output schemas are not documented. LLMs cannot plan downstream calls or extract required fields (e.g., what fields does get_cards return? What is the structure of card_history?). Baseline: 100% of A+ tools document return types.
Parameter constraints lack clarity. update_card.content has maxLength=2000 but description says '超长会失败' (fails if too long) without stating the limit in English. get_card_history.limit has min/max but no description of what happens at boundaries. Baseline: constraints must be stated in descriptions.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 59 | 2026-07-28+ | v2 |
新窗口启动一键续接。返回最新一条 conversation 的 summary + 它配对的 raw_text(最近 30 轮原文) + conversation_id。summary 跟 raw_text 必然来自同一个 conversation · 不会错位。比 get_conversations + get_archive 两步走简单 · token 也省 (不用先 list 再选最新)。【AI 主动调 · 新 session 第一动作 · 不用等用户提醒】
Persist a conversation summary at session end. Optionally include raw_text (e.g. last 30 turns) for full archive — counts against archives_bytes tier limit (free=50MB, pro=unlimited). 【AI 主动存 · session 收尾时调用 · 不用等用户提醒】
更新某张身份卡的 content 或 locked 状态。card_type 必填 · 必须是 7 个枚举之一。content: 新的卡片正文(覆盖式 · 不是 append · 改之前先 get_cards 拿当前完整内容再合并 · DB CHECK 单卡 ≤ 2000 字 · 超长会失败)。locked: 设锁定状态(true=锁)。locked=AI 不可写:一旦此卡被锁 (get_cards 显示 [LOCKED]) · AI(夜间 cron / 聊天 / 本工具)都不能再改它的 content · 也不能用本工具解锁 — 只有用户能从 dashboard 改 / 解锁。所以别拿 locked=false 想绕开锁。调用副作用: 自动 archive 上个版本到 card_history(可用 get_card_diff 看变化) + 在 chat history 插一条 settings_change row 通知后续 turn AI 改了卡。【AI 实时学到用户新信息时主动调 · 不用等夜间 cron · 例如 用户说「我现在素食」→ 立即 patch preferences 卡 · 让后续 轮次马上反映】
Error handling guidance is absent. No tool description explains what errors can occur, when to retry, or what the LLM should do next. E.g., update_card can fail if content exceeds 2000 chars, but no recovery guidance is provided.
get_cards returns all 7 card types in one call with no filtering. If only preferences are needed, the LLM receives 6 irrelevant cards, wasting tokens. Baseline: tools should accept parameters to filter results and respect result limits.