视频帧内存系统

Memvid MCP Server 是一个为AI代理提供高效视频帧内存存储和语义搜索功能的服务器接口,适用于需要持久化长期记忆和快速检索的场景。

  • by mystique09
  • Rust
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 mystique09/memvid-mcp-rs

使用说明

Memvid MCP服务器

非官方模型上下文协议(MCP)服务器接口 孟维德 -用于AI代理的视频帧存储系统。

什么是Memvid?

Memvid是AI代理的一个存储层,它将知识作为压缩的“智能帧”存储在一个单一的内存中 .mv2 文件(类似于视频存储帧的方式)。这种方法提供了:

  • 存储效率提高10倍 比传统的矢量数据库
  • 低于5ms的内存访问时间
  • 仅附加防撞存储 具有时间旅行功能
  • 单个可移植文件 包含数据、嵌入、搜索结构和元数据
  • 无需外部数据库或基础设施

特性

  • 持久的长期记忆 对于AI代理
  • 语义搜索 使用自然语言查询
  • 即时检索 从单个可移植文件
  • 无服务器架构 -不需要数据库基础架构
  • 模型无关 -适用于支持MCP的任何LLM

安装

来自货物(生锈)

cargo install --git https://github.com/mystique09/memvid-mcp.git

来源

git clone https://github.com/mystique09/memvid-mcp.git
cd memvid-mcp
cargo build --release
# The binary will be at target/release/memvid-mcp.exe (Windows) or target/release/memvid-mcp (Linux/Mac)

配置

继续

添加到您的 mcpServers/new-mcp-server.yaml:

mcpServers:
  - name: Memvid MCP
    type: stdio
    command: memvid-mcp

克劳德桌面版

添加到您的Claude桌面配置(claude_desktop_config.json):

{
  "mcpServers": {
    "memvid": {
      "command": "memvid-mcp",
      "env": {}
    }
  }
}

Cline(VS代码扩展)

添加到您的Cline设置:

{
  "mcpServers": [
    {
      "name": "memvid",
      "command": "memvid-mcp"
    }
  ]
}

可用工具

工具 目的 描述
ping 健康检查 返回“pong”以验证服务器是否正在运行
add_chunks 存储内存 将文本块存储为具有语义嵌入的内存帧。返回计数和序列ID
search 查询内存 使用自然语言进行搜索。返回按语义相似度排序的相关块

用法示例

商店积木

Use the add_chunks tool to store information:
Add chunks ["Meeting discussed Q1 planning", "Action item: Review API integration", "Decision: Use Memvid for memory"]

搜索内存

Use the search tool with natural language queries:
Search for "Q1 planning" with top_k=5 and snippet_chars=200

健康检查

Ping to verify server is responsive:
Ping

存储

所有数据都存储在 memvid.mv2 在当前工作目录中。这是一个单一的可移植文件,其中包括:

  • 压缩帧
  • 全文检索
  • 向量索引
  • 时间线元数据

这 .mv2 文件可以像其他文件一样共享、版本控制和备份。

发展

构建

cargo build

运行(开发)

cargo run

使用MCP客户端进行测试

# Create test requests
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{"tools":{}},"clientInfo":{"name":"test","version":"1.0.0"}}}' | cargo run

需求

  • 锈蚀1.85.0+
  • memvid-core crate(作为依赖项包含)

了解更多

许可证

Apache许可证2.0

贡献

欢迎投稿!请随时提交拉取请求。