MCP 服务器

Gnosem

dev.gnosem/gnosem
AI 与智能体 知识与文档 公开且可连接 MCP 2026-07-28

此 MCP 可以做什么

Stores, searches, lists, updates, and deletes cross-model user memories with semantic and keyword retrieval.

memory_forget
Soft-delete a memory by id. The row is retained for audit but excluded from search/list and removed from the vector index.
输入模式
{'type': 'object', 'required': ['id'], 'properties': {'id': {'type': 'string', 'description': 'UUID of the memory to forget.'}}}
memory_list
List the user's most recent memories in reverse chronological order. Use for browsing or catching up on what the user's other model sessions have written recently. Same content/content_raw shape as memory_search. Optional filters (tags, written_by, session_id, since, until) narrow the listing at the SQL level.
输入模式
{'type': 'object', 'properties': {'raw': {'type': 'boolean', 'description': 'Return original prose instead of the compressed form. Default false.'}, 'tags': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Only return memories containing ALL of these tags (AND semantics).'}, 'limit': {'type': 'integer', 'description': 'Max rows to return (1–200). Default 50.'}, 'since': {'type': 'integer', 'description': 'Only return memories created at or after this ms-epoch timestamp.'}, 'until': {'type': 'integer', 'description': 'Only return memories created strictly before this ms-epoch timestamp.'}, 'cursor': {'type': 'integer', 'description': "Pagination cursor from a previous call's `cursor` field (ms epoch); returns rows older than this timestamp."}, 'session_id': {'type': 'string', 'description': 'Only return memories with an exact session_id match.'}, 'written_by': {'type': 'string', 'description': 'Only return memories with an exact written_by match.'}}}
memory_search
Search the user's memories. Default mode is 'hybrid': blends semantic (cosine over Vectorize) and keyword (BM25 over SQLite FTS5) hits via Reciprocal Rank Fusion (k=60). Semantic catches paraphrases; keyword catches exact-string hits (IDs, dates, code snippets). Pass mode:'semantic' or mode:'keyword' to run just one. Content defaults to the LLM-optimized (compressed) form when available (raw:true to invert). Excludes forgotten + superseded. Optional filters narrow after retrieval: tags (AND), written_by, session_id, and/or since/until (ms epoch).
输入模式
{'type': 'object', 'required': ['query'], 'properties': {'k': {'type': 'integer', 'description': 'Max results (1–50). Default 10.'}, 'raw': {'type': 'boolean', 'description': 'Return original prose instead of the compressed form. Default false.'}, 'mode': {'enum': ['semantic', 'keyword', 'hybrid'], 'type': 'string', 'description': "Retrieval mode. Default 'hybrid'."}, 'tags': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Only return memories containing ALL of these tags (AND semantics).'}, 'query': {'type': 'string', 'description': 'Search query. Interpreted as natural language for semantic mode and as FTS5-safe text for keyword mode.'}, 'since': {'type': 'integer', 'description': 'Only return memories created at or after this ms-epoch timestamp.'}, 'until': {'type': 'integer', 'description': 'Only return memories created strictly before this ms-epoch timestamp.'}, 'session_id': {'type': 'string', 'description': 'Only return memories with an exact session_id match.'}, 'written_by': {'type': 'string', 'description': "Only return memories with an exact written_by match (e.g. 'claude-code')."}}}
memory_supersede
Replace a stale memory with a corrected one. The old row is marked superseded and excluded from future reads; the new row becomes the current version. Use for corrections; use memory_forget for pure deletions.
输入模式
{'type': 'object', 'required': ['old_id', 'new_content'], 'properties': {'tags': {'type': 'array', 'items': {'type': 'string'}}, 'old_id': {'type': 'string', 'description': 'UUID of the memory to replace.'}, 'session_id': {'type': 'string'}, 'written_by': {'type': 'string'}, 'new_content': {'type': 'string', 'description': 'New content that supersedes the old memory.'}}}
memory_write
Save a fact, preference, decision, or note to the user's cross-model memory. Any MCP client can read this back later. Include written_by (e.g. 'claude-code', 'gpt-5', 'kimi-k2') for provenance and session_id to group related writes. Long content (>400 chars) is automatically compressed on write to a structured-facts form optimized for LLM reading — the raw text is preserved. Pass no_optimize:true to skip. Writes are deduped by default: (1) SHA-256 of trim(content) short-circuits byte-identical writes with { id, exact_duplicate:true } for free (no embed call); (2) failing that, semantic dedup returns { id, deduped:true, matched_score } when cosine ≥ 0.85. Pass force:true to bypass both, or use memory_supersede to explicitly correct a prior memory.
输入模式
{'type': 'object', 'required': ['content'], 'properties': {'tags': {'type': 'array', 'items': {'type': 'string'}, 'description': "Optional short labels for filtering (e.g. ['preference','stack'])."}, 'force': {'type': 'boolean', 'description': 'Bypass semantic dedup and write anyway. Default false.'}, 'content': {'type': 'string', 'description': 'The fact or note to remember. Plain text, max 8000 characters.'}, 'session_id': {'type': 'string', 'description': 'Opaque identifier grouping related writes from the same conversation.'}, 'written_by': {'type': 'string', 'description': "Identifier of the model / client writing this (e.g. 'claude-code', 'gpt-5', 'kimi-k2', 'manual')."}, 'no_optimize': {'type': 'boolean', 'description': 'Skip AI compression of long content. Default false.'}}}
memory_write_bulk
Write up to 50 memories in a single call. Each entry runs the same path as memory_write (semantic dedup by default; pass force:true per-entry to skip). Embeddings + optimizations run in parallel; D1 inserts are batched. Returns { results: [...] } with one entry per input in the same order — each is { id, created_at, optimized? } on success, { id, created_at, deduped, matched_score } on dedup, or { error } on failure. Free-tier limits apply to the sum: if adding N would exceed 200, the first (200 - existing) succeed and the rest return an error.
输入模式
{'type': 'object', 'required': ['memories'], 'properties': {'memories': {'type': 'array', 'items': {'type': 'object', 'required': ['content'], 'properties': {'tags': {'type': 'array', 'items': {'type': 'string'}}, 'force': {'type': 'boolean', 'description': 'Bypass semantic dedup for this entry. Default false.'}, 'content': {'type': 'string', 'description': 'The fact or note to remember. Plain text, max 8000 characters.'}, 'session_id': {'type': 'string'}, 'written_by': {'type': 'string'}, 'no_optimize': {'type': 'boolean', 'description': 'Skip AI compression of long content. Default false.'}}}, 'maxItems': 50, 'minItems': 1, 'description': 'Array of memory-write entries (1–50).'}}}
已添加
memory_write_bulk
2026年9月17日 12:39
已添加
memory_supersede
2026年9月17日 12:39
已添加
memory_forget
2026年9月17日 12:39
已添加
memory_list
2026年9月17日 12:39
已添加
memory_search
2026年9月17日 12:39
已添加
memory_write
2026年9月17日 12:39