Skip to main content

轻量级 MCP Server,为 AI 编程助手提供跨会话持久记忆能力

Project description

SzyMemory

轻量级 MCP Server,为 AI 编程助手提供跨会话持久记忆能力。

架构

AI IDE (Cursor / Windsurf / Claude Code / Kiro / ...)
        │ MCP Protocol (stdio)
        ▼
   SzyMemory Server
   ├── remember / recall / forget    记忆管理
   ├── status / track / task         会话状态 & 任务跟踪
   ├── auto_save / readme            自动保存 & 文档生成
   ├── Embedding Engine (ONNX)       向量语义匹配
   └── SQLite + sqlite-vec           本地存储 ~/.szymemory/memory.db

安装

pip install szymemory

# 进入项目目录,一键配置 IDE
cd /path/to/your/project
run install

run install 会自动检测 IDE 并生成 MCP 配置、Steering 规则、Hooks,无需手动配置。

也可以用 uvx 免安装直接运行:

uvx szymemory install

手动配置

{
  "mcpServers": {
    "szymemory": {
      "command": "run",
      "args": ["--project-dir", "/path/to/your/project"]
    }
  }
}
IDE 配置文件路径
Cursor .cursor/mcp.json
Windsurf .windsurf/mcp.json
Claude Code .mcp.json
VSCode .vscode/mcp.json
Kiro .kiro/settings/mcp.json
Trae .trae/mcp.json

8 个 MCP 工具

工具 功能 关键参数
remember 存储记忆 contenttagsscope(project/user)
recall 语义搜索 querytagsscopetop_k
forget 删除记忆 memory_id / memory_ids
status 会话状态 不传参=读取,传 state=更新
track 问题跟踪 action(create/update/archive/list)
task 任务管理 action(batch_create/update/list/delete)
readme 文档生成 action(generate/diff)、lang
auto_save 自动保存偏好 preferences(跨项目)
  • 相似度 > 0.95 自动更新已有记忆,不产生重复
  • 向量语义匹配,不同措辞也能找到相关记忆

Web 管理面板

run web --port 9080

浏览器访问 http://localhost:9080,首次使用需点击"注册"创建账号。

功能:多项目切换、记忆浏览/搜索/编辑/导出导入、语义搜索、标签管理、3D 向量可视化、多语言支持。

国内用户

嵌入模型(~200MB)首次运行自动下载,如果速度慢可设置镜像:

export HF_ENDPOINT=https://hf-mirror.com

或在 MCP 配置中添加:

{
  "env": { "HF_ENDPOINT": "https://hf-mirror.com" }
}

技术栈

组件 技术
运行时 Python >= 3.10
向量数据库 SQLite + sqlite-vec
嵌入模型 ONNX Runtime + intfloat/multilingual-e5-small
协议 Model Context Protocol (MCP)

许可证

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

szymemory-3.0.0.tar.gz (140.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

szymemory-3.0.0-py3-none-any.whl (175.0 kB view details)

Uploaded Python 3

File details

Details for the file szymemory-3.0.0.tar.gz.

File metadata

  • Download URL: szymemory-3.0.0.tar.gz
  • Upload date:
  • Size: 140.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for szymemory-3.0.0.tar.gz
Algorithm Hash digest
SHA256 bf280779a3e39bd0dab293b4e3ba6fba0fd92fec9f23bdcf36f6289c11afdef4
MD5 2a9c0f10de014cbed6073ce93a46e255
BLAKE2b-256 f6a1c8b772eea424648a704138e71943da53bae0bf38d060783f46f1dc5edd37

See more details on using hashes here.

File details

Details for the file szymemory-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: szymemory-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 175.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for szymemory-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e53abd850614192685a5ed20f980b7ed85c6ece8d28e9956fc5aa0f4ec794809
MD5 20c9090ef90f297970e1d75636f785e8
BLAKE2b-256 46182babbccf5fdbc71788e12e9aad2229e52c32c1bc9b96f1bddb2af66bfe51

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page