Enables H.265 video compression by building and using a Docker container that provides the necessary FFmpeg environment for encoding.
Utilized through Docker for video encoding, supporting both H.265 and H.264 codecs for compressing video memory representations.
Memvid MCP Server 🎥
A Model Context Protocol (MCP) server that exposes Memvid video memory functionalities to AI clients. This server allows you to encode text, PDFs, and other content into video memory format for efficient semantic search and chat interactions.
🌟 Features
Text Encoding: Add text chunks or full text documents to video memory
PDF Processing: Extract and encode content from PDF files
Video Memory Building: Generate compressed video representations of your data
Semantic Search: Query your encoded data using natural language
Chat Interface: Have conversations with your encoded knowledge base
Multi-Connection Support: Handle multiple concurrent client connections
Comprehensive Logging: Detailed logging to stderr for debugging
Graceful Shutdown: Proper resource cleanup and signal handling
📋 Requirements
Python 3.10 or higher
uv package manager
memvid package
MCP-compatible client (e.g., Claude Desktop)
🚀 Installation
1. Set up the environment
2. Install dependencies
H.265 Encoding with Docker
The server automatically manages Docker installation and lifecycle:
Automatic Docker Setup: If Docker is not installed, the server will install it automatically
Container Management: The memvid package handles its own Docker container building and management
Lifecycle Management: Docker daemon is started when MCP server starts
The memvid package (installed in the venv) contains all necessary Docker configurations and will automatically:
Build the
memvid-h265
container when neededUse Docker for H.265 encoding when
codec='h265'
is specifiedHandle all container lifecycle internally
No manual Docker setup or external repository paths are required.h265using the
Dockerfilelocated in the
docker/` directory.
Once the Docker image is built, memvid
will automatically detect and use it when video_codec='h265'
is specified in build_video
.
3. Test the server (optional)
⚙️ Configuration
Claude Desktop Setup
Copy the example configuration:
Or manually add to your Claude Desktop config:
Restart Claude Desktop to load the server.
🛠️ Available Tools
get_server_status
Check the current status of the memvid server including version information.
add_chunks
Add a list of text chunks to the encoder.
chunks: List of text strings to add
add_text
Add a single text document to the encoder.
text: Text content to add
metadata: Optional metadata dictionary
add_pdf
Process and add a PDF file to the encoder.
pdf_path: Path to the PDF file
build_video
Build the video memory from all added content.
video_path: Output path for the video file
index_path: Output path for the index file
codec: Video codec to use ('h265' or 'h264', default: 'h265')
show_progress: Whether to show progress during build (default: True)
auto_build_docker: Whether to auto-build docker if needed (default: True)
allow_fallback: Whether to allow fallback options (default: True)
search_memory
Perform semantic search on the built video memory.
query: Natural language search query
top_k: Number of results to return (default: 5)
chat_with_memvid
Have a conversation with your encoded knowledge base.
message: Message to send to the chat system
📖 Usage Workflow
Add Content: Use
add_text
,add_chunks
, oradd_pdf
to add your dataBuild Video: Use
build_video
to create the video memory representationSearch or Chat: Use
search_memory
for queries orchat_with_memvid
for conversations
🔧 Development
Testing
Debugging
Check logs in Claude Desktop:
~/Library/Logs/Claude/mcp*.log
(macOS) or equivalentEnable debug logging by setting
LOG_LEVEL=DEBUG
in environmentUse
get_server_status
tool to check server state
🔧 Troubleshooting
Common Issues
JSON Parsing Errors: All output is properly redirected to stderr to prevent protocol interference
Import Errors: The server gracefully handles missing memvid package with clear error messages
Connection Issues: Check Claude Desktop logs and use
get_server_status
to diagnose issuesVideo Build Failures: Ensure sufficient disk space and valid paths
Logging Configuration
The server implements comprehensive stdout redirection to prevent any library output from interfering with the MCP JSON-RPC protocol:
All memvid operations are wrapped with stdout redirection
Progress bars, warnings, and model loading messages are captured
Only structured JSON responses are sent to Claude Desktop
All diagnostic information is logged to stderr
Error Messages
"Memvid not available": Install the memvid package:
uv add memvid
"Video memory not built": Run
build_video
before searching or chatting"LLM not available": Expected warning - memvid will work without external LLM providers
📄 License
MIT License - see the LICENSE file for details.
🤝 Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
📚 Related Projects
Memvid - The underlying video memory technology
Model Context Protocol - The protocol specification
Claude Desktop - MCP-compatible AI client
Generated with improvements for production reliability and MCP best practices.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
A Model Context Protocol server that encodes text, PDFs, and other content into video memory format, enabling efficient semantic search and chat interactions with the encoded knowledge base.
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that enables semantic search capabilities by providing tools to manage Qdrant vector database collections, process and embed documents using various embedding services, and perform semantic searches across vector embeddings.Last updated -411MIT License
- -securityAlicense-qualityA Model Context Protocol server that enables searching YouTube videos, retrieving and storing transcripts, and performing semantic search over video content without using the official YouTube API.Last updated -6MIT License
- AsecurityAlicenseAqualityModel Context Protocol server that enables generating videos from text prompts and/or images using AI models (Luma Ray2 Flash and Kling v1.6 Pro) with configurable parameters like aspect ratio, resolution, and duration.Last updated -23MIT License
- -securityAlicense-qualityA Model Context Protocol server that enables developers to integrate advanced text-to-speech and video translation capabilities into their applications through simple API calls.Last updated -MIT License