简单内存扩展 MCP 服务器
MCP 服务器用于扩展代理的上下文窗口/内存。在编写大型功能或氛围代码,需要存储/调用进度、关键时刻、更改或任何值得记住的内容时非常有用。只需让代理存储记忆并在需要时调用,或者让代理以合适的方式完全管理其内存(例如通过游标规则)。
用法
启动服务器
可用工具
上下文项目管理
store_context_item
- 在命名空间中存储带有键的值retrieve_context_item_by_key
- 按键获取值delete_context_item
- 删除键值对
命名空间管理
create_namespace
创建新的命名空间delete_namespace
- 删除命名空间和所有内容list_namespaces
- 列出所有命名空间list_context_item_keys
- 列出命名空间中的键
语义搜索
retrieve_context_items_by_semantic_search
- 按含义查找项目
语义搜索实现
- 使用 E5 模型将查询转换为向量
- 文本自动拆分成块以便更好地匹配
- 计算查询和存储块之间的余弦相似度
- 按阈值过滤结果并按相似度排序
- 返回具有完整项目值的最佳匹配项
发展
.env
语义搜索
该项目包含使用 Hugging Face 的 E5 嵌入模型的语义搜索功能。这使您能够根据上下文项的含义(而非仅仅根据精确的关键字匹配)来查找上下文项。
设置
语义搜索功能需要 Python 依赖项,但运行以下命令时会自动安装这些依赖项: npm run start
嵌入模型
我们使用intfloat/multilingual-e5-large-instruct
笔记
大部分都是在写 Vibe 代码的时候开发的,所以别期待太多 。不过它确实能用,而且我觉得它很有用。欢迎大家贡献代码或提出改进建议。
Related MCP Servers
- -securityAlicense-qualityAn MCP server implementation that standardizes how AI applications access tools and context, providing a central hub that manages tool discovery, execution, and context management with a simplified configuration system.Last updated -13MIT License
Lspace MCP Serverofficial
AsecurityFlicenseAqualityAn open-source server implementing the Model Context Protocol (MCP) that enables capturing insights from AI sessions and transforming them into persistent, searchable knowledge accessible across tools.Last updated -76- -securityFlicense-qualityA MCP Server that gives AI assistants the ability to remember information about users across conversations using vector search technology.Last updated -
- -securityFlicense-qualityA Model Context Protocol (MCP) server that provides persistent memory capabilities using OpenAI's vector stores, allowing AI assistants to save and search through memories across conversations.Last updated -
Appeared in Searches
- An open-source MCP service leveraging large models for innovative problem-solving
- Finding the Best Memory Compression Policies (MCPs) for Optimizing Limited Context Window in Claude Code
- A search for information related to 'augment'
- Transcribing Voice Conversations into Structured Meeting Notes
- A system or tool for reading, writing, and interacting with local storage