๐ฌ Memvid MCP Server
A Model Context Protocol (MCP) server that provides video-based AI memory storage for LLM agents. Built with memvid - store millions of text chunks in MP4 files with lightning-fast semantic search.
MCP Server URL
https://eldarski-memvid-mcp-server.hf.space/gradio_api/mcp/sse
For local development: http://localhost:7860/gradio_api/mcp/sse
Available MCP Tools
๐ฌ Memory Operations
store_memory: Store text chunks in video memorybuild_memory_video: Build MP4 memory from stored chunkssearch_memory: Semantic search in memory videoschat_with_memory: Interactive chat with memorylist_memories: List all memories for a clientget_memory_stats: Get memory usage statisticsdelete_memory: Delete specific memory videosstore_document: Store document content in memory
๐ค HuggingFace Dataset Integration
save_to_hf_dataset: Save all client data to specific HF datasetload_from_hf_dataset: Load client data from specific HF datasetlist_hf_datasets: List available HF datasets for current usercreate_hf_dataset: Create new HF dataset for memory storageget_storage_info: Get HuggingFace storage connection statusbackup_client_data: Backup client data to default HF datasetrestore_client_data: Restore client data from default HF dataset
Integration
To add this MCP server to clients that support SSE (e.g. Cursor, Claude Desktop, Cline), add this configuration:
{
"mcpServers": {
"memvid-server": {
"url": "https://eldarski-memvid-mcp-server.hf.space/gradio_api/mcp/sse"
}
}
}
For local development, use: http://localhost:7860/gradio_api/mcp/sse
How It Works
- Store Memory: Add text chunks that will be embedded and stored
- Build Video: Create an MP4 file containing all stored chunks with embeddings
- Search: Use semantic similarity to find relevant memories
- Chat: Interactive conversation with your stored memories
Each client gets isolated storage with their own memory videos.
Store text chunks and build memory videos
Search stored memories using semantic similarity
Interactive chat with your stored memories
Manage your stored memories
Storage Mode Configuration
Select storage backend mode
Store document content in memory
Advanced HuggingFace Dataset Integration
Save client data to specific HF datasets
Manage your HuggingFace datasets
Storage information and legacy backup functions
Storage Information
Legacy Backup (Default Dataset)
๐ฏ Usage Guide
Basic Workflow
- Store Memories: Use the "Memory Storage" tab to add text chunks
- Build Video: Create an MP4 memory file from your stored chunks
- Search: Find relevant information using semantic search
- Chat: Have conversations with your stored knowledge
MCP Integration
This server exposes the following MCP tools:
Memory Operations:
store_memory(text, client_id, metadata)- Store text in memorybuild_memory_video(client_id, memory_name)- Build MP4 from chunkssearch_memory(query, client_id, memory_name, top_k)- Semantic searchchat_with_memory(query, client_id, memory_name)- Interactive chatlist_memories(client_id)- List all memoriesget_memory_stats(client_id)- Get usage statisticsdelete_memory(client_id, memory_name)- Delete memoriesstore_document(content, doc_type, client_id)- Store documents
HuggingFace Dataset Integration:
save_to_hf_dataset(client_id, dataset_name, private)- Save to specific HF datasetload_from_hf_dataset(client_id, dataset_name)- Load from specific HF datasetlist_hf_datasets()- List available HF datasetscreate_hf_dataset(dataset_name, private, description)- Create new HF datasetget_storage_info()- Get HF storage connection statusbackup_client_data(client_id)- Backup to default HF datasetrestore_client_data(client_id)- Restore from default HF dataset
Client Isolation
Each client_id gets its own isolated storage space:
data/
โโโ client_1/
โ โโโ chunks/
โ โโโ videos/
โ โโโ metadata.json
โโโ client_2/
โโโ chunks/
โโโ videos/
โโโ metadata.json
Best Practices
- Use descriptive
client_idvalues (e.g., "user_123", "project_ai") - Build memory videos after storing multiple chunks for efficiency
- Use meaningful memory names for organization
- Include metadata for better organization and retrieval
Powered by Memvid
This server uses the memvid library which:
- Stores text chunks in MP4 video files
- Provides lightning-fast semantic search
- Requires no external database
- Supports millions of text chunks
- Works completely offline
Error Handling
All functions include comprehensive error handling and return descriptive error messages. Check the output for detailed information about any issues.