# media-context (mctx)

> media-context (mctx) is an open-source MCP server for design and media. Local FFmpeg and Whisper tools that keep images, video and audio out of coding agent. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted, macOS, Linux, Windows
- **Repository:** https://github.com/mollymogi/media-context
- **MCP Registry name:** io.github.mollymogi/media-context
- **Categories:** [design and media](https://ai-powered.com/categories/design-and-media), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-19

## About

The README says media-context is built to stop heavy media files from filling an agent's context window. Instead of letting a client read a PNG, video frame or WAV clip directly, it runs local FFmpeg and FFprobe steps to pull out metadata, build timestamped contact sheets, shrink oversized screenshots and transcribe audio offline with a local Whisper install.

For questions that need a visual judgement, the server launches a disposable worker through an existing subscription CLI such as agy, claude, codex or opencode. That worker inspects the compressed sheet, caches the result by SHA-256 in SQLite, and returns only short text to the main session. A PreToolUse hook can block raw media reads or downscale images before they reach the model.

It is aimed at developers who already run several coding agents and want to keep long sessions responsive without paying for separate vision API keys. The project is MIT licensed and installs from source or pipx.

## Features

- **Local media probing:** Reports compact metadata plus audio silence, clipping and black-frame checks using FFmpeg and FFprobe.
- **Contact sheet generation:** Stitches a video or a folder of frames into one timestamped grid image.
- **Image shrinking:** Downscales large screenshots into lighter JPEGs before they reach an agent.
- **Offline transcription:** Transcribes audio locally through mlx-whisper or whisper.cpp.
- **Read guard hook:** A PreToolUse hook blocks raw media reads or auto-shrinks them, with a bypass for internal workers.
- **Quota fallback chain:** Switches to the next configured backend after 429, 503 or 401 errors and places the failed model in cooldown.

## Good for

- Keep screenshots and video frames from inflating a long coding-agent session
- Check a generated video for black frames, silence or clipping before using it
- Get a visual QA summary of extracted frames without pinning the images in history
- Transcribe voiceover or interview audio locally
- Route media questions through an existing CLI subscription instead of a separate vision API

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add media-context -- uvx media-context
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "media-context": {
      "command": "uvx",
      "args": [
        "media-context"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "media-context": {
      "command": "uvx",
      "args": [
        "media-context"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "media-context": {
      "command": "uvx",
      "args": [
        "media-context"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "media-context": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "media-context"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add media-context -- uvx media-context
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.media-context]
command = "uvx"
args = ["media-context"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "media-context": {
      "command": "uvx",
      "args": [
        "media-context"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user media-context uvx -- media-context

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "media-context": {
      "command": "uvx",
      "args": [
        "media-context"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "media-context": {
      "command": "uvx",
      "args": [
        "media-context"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "media-context": {
      "command": "uvx",
      "args": [
        "media-context"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "media-context": {
      "command": "uvx",
      "args": [
        "media-context"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "media-context": {
      "command": "uvx",
      "args": [
        "media-context"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "media-context": {
      "command": "uvx",
      "args": [
        "media-context"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "media-context": {
      "command": "uvx",
      "args": [
        "media-context"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "media-context": {
      "command": "uvx",
      "args": [
        "media-context"
      ]
    }
  }
}
```

## FAQ

### Does media-context (mctx) need paid API keys?

The README says the vision step runs through an existing subscription CLI and that it adds no extra API billing, relying on FFmpeg for local processing.

### How is media-context (mctx) connected to an agent?

It runs as a stdio MCP server started with mctx mcp, and the README lists configuration examples for Antigravity, Claude Code, Codex and OpenCode.

### What happens when a model hits a quota limit?

It moves to the next target in the fallback chain, puts the failing model in a local SQLite cooldown (default 300 seconds), and prints a fallback notice.

### What does media-context (mctx) need installed?

The README states it has no Python third-party dependencies and requires Python 3.9+ plus ffmpeg and ffprobe.

### How do I add media-context (mctx) to Claude Code?

Run this command in your terminal: claude mcp add media-context -- uvx media-context

### What are the best alternatives to media-context (mctx)?

The closest alternatives to media-context (mctx) are ffmpeg-skill, Context Fabric, mcp-video, MakeMyClip Editor and vid2context.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [ffmpeg-skill](https://ai-powered.com/mcp/ffmpeg-skill): ffmpeg-skill is an open-source MCP server for design and media.
- [Context Fabric](https://ai-powered.com/mcp/context-fabric): Context Fabric is an open-source MCP server for developer tools.
- [mcp-video](https://ai-powered.com/mcp/mcp-video): mcp-video is an open-source MCP server for design and media.
- [MakeMyClip Editor](https://ai-powered.com/mcp/makemyclip-editor): MakeMyClip Editor is an open-source MCP server for design and media.
- [vid2context](https://ai-powered.com/mcp/vid2context): vid2context is an open-source MCP server for design and media.
- [videoworker](https://ai-powered.com/mcp/videoworker): videoworker is a freemium MCP server for design and media.
- [FFmpeg](https://ai-powered.com/mcp/ffmpeg): FFmpeg is an MCP server for design and media.
- [headroom](https://ai-powered.com/mcp/headroom-3): headroom is an open-source MCP server for ai models and llm tooling.

---
Source: https://ai-powered.com/mcp/media-context-mctx
