CoolFace
Apppublic

Agents-MCP-Hackathon/memvid-mcp

sourceHugging Facemitupdated 1y agoView on Hugging Face
1likes
App README

๐ŸŽฅ Memvid MCP Server

An advanced Model Context Protocol (MCP) server that stores AI conversation memories in MP4 video files using QR codes and semantic embeddings. Built for the Hugging Face Hackathon - MCP Server Track.

๐Ÿš€ Live MCP Endpoint

https://eldarski-memvid-mcp-server.hf.space/gradio_api/mcp/sse

โœจ Features

  • โ€”๐ŸŽฌ Video Memory Storage: Store text chunks in MP4 files with QR code encoding
  • โ€”๐Ÿ” Lightning-Fast Search: Semantic similarity search using FAISS embeddings
  • โ€”๐Ÿ’ฌ Interactive Chat: Converse with your stored memories using AI
  • โ€”โ˜๏ธ Cloud Integration: Automatic backup to HuggingFace datasets
  • โ€”๐Ÿ”ง 24 MCP Tools: Comprehensive memory management via MCP protocol
  • โ€”๐Ÿš€ 91.7% Functional: Real working implementation with cloud storage

๐ŸŽฏ Quick Start

Add to MCP Client (Cursor, Claude Desktop, etc.)

json
{
  "mcpServers": {
    "memvid-server": {
      "url": "https://eldarski-memvid-mcp-server.hf.space/gradio_api/mcp/sse"
    }
  }
}

Basic Workflow

  1. 1.Store memories: store_memory(text, client_id)
  2. 2.Build video: build_memory_video(client_id, memory_name)
  3. 3.Search: search_memory(query, client_id, memory_name)
  4. 4.Chat: chat_with_memory(query, client_id, memory_name)

๐Ÿ”ง Available MCP Tools

Memory Operations

  • โ€”store_memory - Store text chunks in video memory
  • โ€”build_memory_video - Build MP4 memory from stored chunks
  • โ€”search_memory - Semantic search in memory videos
  • โ€”chat_with_memory - Interactive chat with memory
  • โ€”list_memories - List all memories for a client
  • โ€”get_memory_stats - Get memory usage statistics
  • โ€”delete_memory - Delete specific memory videos
  • โ€”store_document - Store document content in memory

HuggingFace Dataset Integration

  • โ€”save_to_hf_dataset - Save client data to specific HF dataset
  • โ€”load_from_hf_dataset - Load client data from HF dataset
  • โ€”list_hf_datasets - List available HF datasets
  • โ€”create_hf_dataset - Create new HF dataset
  • โ€”get_storage_info - Get HF storage connection status
  • โ€”backup_client_data - Backup to default HF dataset
  • โ€”restore_client_data - Restore from default HF dataset

[## ๐ŸŽฌ Demo Video

[Link to demo video showing MCP server in action]](https://youtu.be/dnRH8NckB5A)

๐Ÿ—๏ธ How It Works

This MCP server uses the innovative memvid library to:

  1. 1.Encode text chunks into QR codes embedded in MP4 video frames
  2. 2.Generate semantic embeddings using sentence-transformers
  3. 3.Create FAISS indexes for lightning-fast similarity search
  4. 4.Enable AI chat with stored memories using context retrieval
  5. 5.Backup everything to HuggingFace datasets for persistence

Each client gets isolated storage with their own memory videos and embeddings.

๐Ÿ“Š Test Results

  • โ€”โœ… 91.7% Success Rate (22/24 tools working)
  • โ€”โœ… Real Cloud Storage integration with HuggingFace
  • โ€”โœ… PyTorch Compatibility solved for production deployment
  • โ€”โœ… Memory Operations fully functional
  • โ€”โœ… Search & Chat working with semantic embeddings

๐Ÿ› ๏ธ Technical Stack

  • โ€”[Gradio](https://gradio.app/) - Web interface and MCP server
  • โ€”[Memvid](https://github.com/Olow304/memvid) - Video-based memory storage
  • โ€”[FAISS](https://github.com/facebookresearch/faiss) - Similarity search
  • โ€”[Sentence Transformers](https://www.sbert.net/) - Text embeddings
  • โ€”[HuggingFace](https://huggingface.co/) - Cloud dataset storage

๐Ÿ† Hackathon Submission

Track: MCP Server / Tool Tags: mcp-server-track Status: Production-ready with 91.7% functionality Innovation: First MCP server to use video files for AI memory storage

๐Ÿ“„ License

MIT License - Feel free to use and modify!

๐Ÿค Contributing

Built for the HuggingFace Hackathon. Contributions welcome!