Skip to main content
Glama
gmacev

Simple Memory Extension MCP Server

by gmacev

简单内存扩展 MCP 服务器

MCP 服务器用于扩展代理的上下文窗口/内存。在编写大型功能或氛围代码,需要存储/调用进度、关键时刻、更改或任何值得记住的内容时非常有用。只需让代理存储记忆并在需要时调用,或者让代理以合适的方式完全管理其内存(例如通过游标规则)。

用法

启动服务器

npm install
npm start

可用工具

上下文项目管理

  • 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 - 按含义查找项目

语义搜索实现

  1. 使用 E5 模型将查询转换为向量

  2. 文本自动拆分成块以便更好地匹配

  3. 计算查询和存储块之间的余弦相似度

  4. 按阈值过滤结果并按相似度排序

  5. 返回具有完整项目值的最佳匹配项

Related MCP server: Lspace MCP Server

发展

# Dev server
npm run dev

# Format code
npm run format

.env

# Path to SQLite database file
DB_PATH=./data/context.db

PORT=3000

# Use HTTP SSE or Stdio
USE_HTTP_SSE=true

# Logging Configuration: debug, info, warn, error
LOG_LEVEL=info

语义搜索

该项目包含使用 Hugging Face 的 E5 嵌入模型的语义搜索功能。这使您能够根据上下文项的含义(而非仅仅根据精确的关键字匹配)来查找上下文项。

设置

语义搜索功能需要 Python 依赖项,但运行以下命令时自动安装这些依赖项: npm run start

嵌入模型

我们使用intfloat/multilingual-e5-large-instruct

笔记

大部分都是在写 Vibe 代码的时候开发的,所以别期待太多 :D。不过它确实能用,而且我觉得它很有用。欢迎大家贡献代码或提出改进建议。

-
security - not tested
A
license - permissive license
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gmacev/Simple-Memory-Extension-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server