Skip to content
MCP server

media-context (mctx)

Local FFmpeg and Whisper tools that keep images, video and audio out of coding agent

Runs locally

media-context (mctx) is an open-source MCP server for design and media. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, Self-hosted, macOS
Runs
Locally
Version
0.1.2
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

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.

Or share it with your project

Add to .mcp.json

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

Claude Code setup guide

Add to claude_desktop_config.json

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

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

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

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

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

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to ~/.copilot/mcp-config.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.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add media-context -- uvx media-context

Or add to config.toml

Add to ~/.codex/config.toml

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

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "media-context": {
      "command": "uvx",
      "args": [
        "media-context"
      ]
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

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

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

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

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

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

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.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.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

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

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

    Cline setup guide

  • Zed

    Add to Zed settings.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.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

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

    Junie

    Add to ~/.junie/mcp/mcp.json

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

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

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

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

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

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • MCTX_FALLBACK_CHAINOptional comma-separated fallback chain, e.g. agy:gemini-4-neon-medium,claude:sonnet,codex
  • MCTX_COOLDOWN_SECONDSCooldown duration in seconds after quota/capacity failures (default: 300)

About media-context (mctx)

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.

What it does

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

Pricing

Open source

MIT licensed, free to install from source or pipx.

media-context (mctx) 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.

How AIPoweredBot checks servers