Skip to main content
Glama
README.md
![Three storyboard frames follow a sailboat past a lighthouse, with palette swatches and production cue cards.](assets/banner/banner.png)

# 🎬 Enhanced Multimedia Analysis MCP

Turn a written scene into a shot-planning prompt. Describe a sailboat passing a lighthouse at dawn, for example, and the server can return your description alongside cues for color grading, atmosphere, pacing and camera movement. You supply the creative decisions and take the finished prompt to your image or video generator.

**Contents** · [Features](#-features) · [Quick start](#-quick-start) · [Example](#-usage-example) · [Configuration](#-configuration) · [Project guide](#-project-guide) · [Status](#-status)

## 🎯 Features

Each “hotkey” is a short code for a production cue. The catalog contains 72 across six families covering aesthetics, story, character, cinematography, platform and technical execution. For instance, `A1` adds “Color palette and grading.” [Browse the catalog](video_analysis_mcp.py#L57)

| MCP tool | What you get |
|---|---|
| [`video_analysis_get_hotkeys`](video_analysis_mcp.py#L549) | A Markdown catalog. Pass a category such as `K` to see only cinematography cues. |
| [`video_analysis_analyze_image`](video_analysis_mcp.py#L371) | Your still-image description with cues for framing, lighting, character or another chosen focus. |
| [`video_analysis_analyze_video`](video_analysis_mcp.py#L433) | A scene prompt that always includes pacing (`S4`) and camera movement (`K3`). |
| [`video_analysis_analyze_multimedia`](video_analysis_mcp.py#L500) | One shared prompt for a project spanning stills and motion. This tool formats each request directly. |

The three prompt tools accept `quick`, `standard`, `deep` and `comprehensive` presets (6, 12, 19 and 29 base cues). Pass comma-separated `hotkeys` to choose the cues yourself, or use `focus_areas` to expand a preset around character, cinematography or story. An optional `reference_style` carries your visual reference into the result. [Selection and prompt assembly](video_analysis_mcp.py#L180)

## 🚀 Quick start

Run the Python server locally from a client that supports MCP over stdio. From PowerShell, create a dedicated environment and install the declared dependencies.

```powershell
git clone https://github.com/traikdude/enhanced-multimedia-analysis-mcp.git
cd enhanced-multimedia-analysis-mcp
py -3 -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements.txt
(Resolve-Path .\.venv\Scripts\python.exe).Path
(Resolve-Path .\video_analysis_mcp.py).Path
```

Use those last two paths as the executable and script argument in your client. For a client using the `mcpServers` configuration format, adapt these example paths to your checkout.

```json
{
  "mcpServers": {
    "video-analysis": {
      "command": "C:/projects/enhanced-multimedia-analysis-mcp/.venv/Scripts/python.exe",
      "args": ["C:/projects/enhanced-multimedia-analysis-mcp/video_analysis_mcp.py"]
    }
  }
}
```

Reload the client, list the tools, then call `video_analysis_get_hotkeys` with `{"category":"K"}`. Look for `K3` in the returned list. [Server entry point](video_analysis_mcp.py#L604)

## 💡 Usage example

Call `video_analysis_analyze_video` with these arguments.

```json
{
  "content_description": "A sailboat passes a lighthouse at dawn.",
  "hotkeys": "A1,A2",
  "target_platform": "Cinema",
  "response_format": "json"
}
```

The response is a JSON string. Its `core_description` holds the original sentence, `visual_elements` lists the two palette and lighting cues, and `platform_guidance` includes the Cinema framing suggestion of 2.39:1. TikTok, Instagram and YouTube each have their own guidance. Omit `response_format` for a Markdown draft. [Output formatter](video_analysis_mcp.py#L260)

## 🔧 Configuration

| Environment variable | Default | Effect |
|---|---|---|
| `VIDEO_ANALYSIS_CHAR_LIMIT` | `25000` | Truncates the Markdown body before adding a truncation notice. |
| `VIDEO_ANALYSIS_LOG_LEVEL` | `INFO` | Sets the Python logger's level. |
| `VIDEO_ANALYSIS_CACHE_ENABLED` | `false` | Set to `true` to store image and video requests and results on disk. |
| `VIDEO_ANALYSIS_CACHE_DIR` | `/tmp/video_analysis_cache` | Choose a writable directory on Windows if enabling the cache. |
| `VIDEO_ANALYSIS_CACHE_TTL` | `3600` | Seconds before a stored result expires. |

Leave caching off when comparing focus areas, styles or formats. The cache key omits all three, so a repeat request can return an earlier variation. Set depth per call with `analysis_depth`. [Configuration](video_analysis_mcp.py#L24) · [Cache implementation](video_analysis_mcp.py#L322)

## 📚 Project guide

| File | What lives there |
|---|---|
| [Server](video_analysis_mcp.py) | FastMCP tool registration, cue selection, JSON and Markdown formatting, local file cache and startup health check. |
| [Dependencies](requirements.txt) | Python requirements, including FastMCP, MCP and Pydantic. |
| [Master specification](docs/MASTER_SPECIFICATION.md) | Design reference and deployment examples. The packaged launch path is the local Python process above. |
| [Slash-command guide](docs/aiv_slash_command.md) · [installer](scripts/install_aiv.sh) | The optional `/aiv` workflow. The shell installer expects a command template at a host-specific location outside this checkout. |
| [Changelog](CHANGELOG.md) | Project history. |

## 🗺️ Status

Version 1.1.0 assembles text prompts from descriptions and catalog entries. Reading image pixels, decoding video, tracking a character across frames and rendering generated media would require additional implementation. The checkout includes no automated test suite or container manifest.

Contributions are welcome. For a substantial change, [open an issue](https://github.com/traikdude/enhanced-multimedia-analysis-mcp/issues) to discuss the idea first.

## 📝 License

Released under the [MIT License](LICENSE).