Enhanced Multimedia Analysis MCP
Enables AI agents to analyze images and videos, and generate optimized prompts for AI video generation systems.
README
🎬 Enhanced Multimedia Analysis MCP
A Model Context Protocol (MCP) server for professional multimedia content analysis and AI video generation prompt engineering
🌟 Overview
The Enhanced Multimedia Analysis MCP Server is a production-ready Model Context Protocol implementation that provides AI agents with sophisticated tools for analyzing visual content (images and videos) and generating optimized prompts for AI video generation systems.
Core Capabilities
- 🔍 Systematic multi-dimensional content analysis via hotkey framework
- 🎨 Professional prompt generation for AI video/image generators
- 📱 Platform-specific optimization (TikTok, Instagram, YouTube, Cinema)
- 👥 Character consistency tracking across scenes
- 📊 Four analysis depth levels (Quick, Standard, Deep, Comprehensive)
- ⚡ Quick activation via
/aivslash command
Key Benefits
✅ Reduces prompt engineering time from hours to minutes ✅ Improves prompt quality through systematic analysis ✅ Enables consistency across multiple generations ✅ Optimizes for platforms automatically ✅ Empowers AI agents with 100+ analysis dimensions
🚀 Quick Start
Installation
-
Clone the repository:
git clone https://github.com/yourusername/enhanced-multimedia-analysis-mcp.git cd enhanced-multimedia-analysis-mcp -
Install dependencies:
pip install -r requirements.txt -
Install the
/aivcommand:./scripts/install_aiv.sh -
Configure Claude Desktop:
Add to your Claude Desktop configuration (
~/Library/Application Support/Claude/claude_desktop_config.jsonon macOS):{ "mcpServers": { "video-analysis": { "command": "python3", "args": ["/path/to/enhanced-multimedia-analysis-mcp/video_analysis_mcp.py"] } } } -
Restart Claude Desktop and test:
/aiv sunset over mountains with dramatic clouds
💡 Usage Examples
Basic Analysis
/aiv A majestic eagle soaring over mountains at sunset
With Platform Optimization
/aiv 30-second product video --platform Instagram --depth deep
Character-Focused Analysis
/aiv Detective noir scene --focus character consistency, cinematography
With Custom Hotkeys
/aiv Epic battle scene --hotkeys A1,C1,L1,E1 --format json
Available Options
| Option | Values | Purpose |
|---|---|---|
--depth |
quick|standard|deep|comprehensive | Analysis thoroughness |
--platform |
TikTok|Instagram|YouTube|Cinema | Platform optimization |
--focus |
comma-separated areas | Targeted analysis |
--format |
markdown|json | Output format |
--hotkeys |
comma-separated list | Custom hotkey selection |
--style |
"reference style" | Style reference |
🏗️ Architecture
┌─────────────────────────────────────────────────────────────────┐
│ Claude Desktop / MCP Client │
│ Slash Commands: /aiv │
└────────────────────────────┬────────────────────────────────────┘
│ JSON-RPC 2.0 over stdio
┌────────────────────────────▼────────────────────────────────────┐
│ Video Analysis MCP Server │
│ (video_analysis_mcp.py) │
│ │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ 4 MCP Tools │ │
│ │ • video_analysis_analyze_image │ │
│ │ • video_analysis_analyze_video │ │
│ │ • video_analysis_analyze_multimedia │ │
│ │ • video_analysis_get_hotkeys │ │
│ └─────────────────────┬──────────────────────────────────┘ │
│ │ │
│ ┌─────────────────────▼──────────────────────────────────┐ │
│ │ Analysis Engine (Hotkey-Based) │ │
│ └─────────────────────┬──────────────────────────────────┘ │
│ │ │
│ ┌─────────────────────▼──────────────────────────────────┐ │
│ │ Prompt Generator │ │
│ └─────────────────────┬──────────────────────────────────┘ │
│ │ │
│ ┌─────────────────────▼──────────────────────────────────┐ │
│ │ Output Formatter (Markdown/JSON) │ │
│ └─────────────────────────────────────────────────────────┘ │
└────────────────────────────────────────────────────────────────┘
Technical Stack
- Framework: MCP Python SDK (FastMCP)
- Validation: Pydantic v2 models
- Python Version: 3.10+
- Design Pattern: Tool-oriented, stateless
- Communication: JSON-RPC 2.0 over stdio
📚 Documentation
- Master Specification - Complete system documentation
- /aiv Command Guide - Slash command usage and examples
- Installation Script - Located in
scripts/install_aiv.sh
🔧 Configuration
Environment Variables
Configure the MCP server behavior using environment variables:
# Output character limit
export VIDEO_ANALYSIS_CHAR_LIMIT=25000
# Enable debug logging
export VIDEO_ANALYSIS_DEBUG=false
# Enable caching (improves performance)
export VIDEO_ANALYSIS_CACHE_ENABLED=true
export VIDEO_ANALYSIS_CACHE_DIR=/tmp/video_analysis_cache
export VIDEO_ANALYSIS_CACHE_TTL=3600
# Set default analysis depth
export VIDEO_ANALYSIS_DEFAULT_DEPTH=standard
Claude Desktop Configuration
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"video-analysis": {
"command": "python3",
"args": ["/path/to/video_analysis_mcp.py"],
"env": {
"VIDEO_ANALYSIS_CHAR_LIMIT": "25000",
"VIDEO_ANALYSIS_CACHE_ENABLED": "true",
"VIDEO_ANALYSIS_CACHE_DIR": "/tmp/video_analysis_cache"
}
}
}
}
🎯 Features
Analysis Framework
The system uses a comprehensive hotkey-based analysis framework with 100+ dimensions organized into categories:
- A-Series: Aesthetic & Visual Style (A1-A13)
- S-Series: Story & Narrative (S1-S12)
- C-Series: Character & Subject (C1-C12)
- K-Series: Cinematography (K1-K13)
- P-Series: Platform Optimization (P1-P10)
- E-Series: Execution & Technical (E1-E12)
Analysis Depths
| Depth | Hotkeys | Use Case | Time |
|---|---|---|---|
| Quick | 4-6 | Fast iterations | 2-5s |
| Standard | 8-12 | Balanced analysis | 5-10s |
| Deep | 15-25 | Detailed work | 10-20s |
| Comprehensive | 30-50 | Production-ready | 20-30s |
Platform Optimizations
- TikTok: Vertical format, hook-first, trending sounds
- Instagram: Aesthetic-first, grid-aware, story integration
- YouTube: Thumbnail optimization, retention focus, SEO
- Cinema: Cinematic language, aspect ratios, theatrical quality
🚢 Deployment
Docker
docker build -t video-analysis-mcp:1.1.0 .
docker run -d --name video-analysis-mcp video-analysis-mcp:1.1.0
Systemd Service
See docs/MASTER_SPECIFICATION.md for complete deployment instructions including:
- Systemd service configuration
- Kubernetes deployment
- Docker Compose setup
- Monitoring & observability
🧪 Testing
Run comprehensive tests:
python3 -m pytest tests/
Test individual tools:
# Test image analysis
python3 -c "from video_analysis_mcp import test_image_analysis; test_image_analysis()"
# Test video analysis
python3 -c "from video_analysis_mcp import test_video_analysis; test_video_analysis()"
📈 Performance
With Caching Enabled
| Scenario | No Cache | With Cache | Improvement |
|---|---|---|---|
| Standard Analysis | 5.2s | 0.08s | 98.5% faster |
| Deep Analysis | 12.5s | 0.09s | 99.3% faster |
| Quick Analysis | 2.3s | 0.06s | 97.4% faster |
| Comprehensive | 25.8s | 0.11s | 99.6% faster |
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Development Setup
- Clone the repository
- Install development dependencies:
pip install -r requirements-dev.txt - Run tests:
pytest tests/ - Follow the code style guide (PEP 8)
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Built on the Model Context Protocol by Anthropic
- Uses FastMCP for MCP server implementation
- Inspired by professional video production workflows
📞 Support
- Issues: GitHub Issues
- Documentation: docs/MASTER_SPECIFICATION.md
- Discussions: GitHub Discussions
🗺️ Roadmap
- [ ] Real-time video file analysis
- [ ] Integration with popular AI video generators
- [ ] Web interface for prompt generation
- [ ] Batch processing capabilities
- [ ] Advanced caching strategies
- [ ] Multi-language support
Made with ❤️ for the AI video generation community
Version 1.1.0 | Changelog | Documentation
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。