Skip to main content

Video Tools MCP Server

PyPI version Python 3.10+ License: MIT

FastMCP сервер для работы с видео. Предоставляет инструменты для извлечения кадров, метаданных, аудио и создания GIF.

Требования

  • Python 3.10+
  • FFmpeg (должен быть установлен и доступен в PATH)

Установка FFmpeg

Ubuntu/Debian:

sudo apt update && sudo apt install ffmpeg

macOS:

brew install ffmpeg

Windows: Скачать с ffmpeg.org и добавить в PATH.

Установка

Из PyPI (рекомендуется)

pip install video-tools-mcp

Из исходников

git clone https://github.com/TiGRoNdev/video-tools-mcp.git
cd video-tools-mcp
pip install -e .

Запуск

video-tools-mcp

Или напрямую:

python video_mcp_server.py

Инструменты

get_video_metadata

Получить полные метаданные видео: длительность, разрешение, FPS, кодек, битрейт, информацию об аудио.

get_video_metadata(video_path="/path/to/video.mp4")

get_video_duration

Получить длительность видео в различных форматах.

get_video_duration(video_path="/path/to/video.mp4")

extract_frame

Извлечь один кадр по указанному времени.

extract_frame(
    video_path="/path/to/video.mp4",
    timestamp="00:01:30",  # или "90" для 90 секунд
    output_path="/path/to/frame.png",  # опционально
    width=1280,  # опционально
    height=720,  # опционально
    return_base64=True  # вернуть base64 данные
)

extract_frames_interval

Извлечь кадры с заданным интервалом.

extract_frames_interval(
    video_path="/path/to/video.mp4",
    interval_seconds=1.0,  # кадр каждую секунду
    output_dir="/path/to/frames/",
    start_time="00:00:10",
    end_time="00:01:00",
    max_frames=50
)

extract_audio

Извлечь аудиодорожку из видео.

extract_audio(
    video_path="/path/to/video.mp4",
    output_path="/path/to/audio.mp3",
    format="mp3",  # mp3, wav, aac, flac, ogg
    bitrate="192k",
    start_time="00:00:00",
    end_time="00:05:00"
)

create_gif

Создать GIF из видео.

create_gif(
    video_path="/path/to/video.mp4",
    output_path="/path/to/output.gif",
    start_time="00:00:05",
    duration=5.0,  # 5 секунд
    fps=10,
    width=480,
    optimize=True  # оптимизация палитры
)

Конфигурация для Claude Desktop

Добавьте в claude_desktop_config.json:

После установки из PyPI

{
  "mcpServers": {
    "video-tools": {
      "command": "video-tools-mcp"
    }
  }
}

Из исходников

{
  "mcpServers": {
    "video-tools": {
      "command": "python",
      "args": ["/path/to/video_mcp_server.py"]
    }
  }
}

Пример использования

После подключения к Claude Desktop или другому MCP клиенту:

Пользователь: Покажи информацию о видео /home/user/video.mp4

Claude: Вызываю get_video_metadata...
{
  "duration_seconds": 125.5,
  "video": {
    "width": 1920,
    "height": 1080,
    "fps": 30,
    "codec": "h264"
  },
  "audio": {
    "codec": "aac",
    "sample_rate": 48000
  }
}

Лицензия

MIT

Metadata

Release files for video-tools-mcp 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for video-tools-mcp 0.1.2
File Size Uploaded Provenance
video_tools_mcp-0.1.2.tar.gz 242.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for video-tools-mcp 0.1.2
File Interpreter ABI Platform
video_tools_mcp-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 251.6 kB

Release files / video_tools_mcp-0.1.2.tar.gz

Download URL video_tools_mcp-0.1.2.tar.gz
Size 242.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e10944eb6b20b7d2609013aa4897c6284f6a4ba7edfc17962ec7b044a4f49c6f
BLAKE2b-256 checksum
How to use checksums
a0aa0af5edeed3a0593c6e58064f3e61e68722d7783ef4e4e0cf185937182455
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / video_tools_mcp-0.1.2-py3-none-any.whl

Download URL video_tools_mcp-0.1.2-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1980b20a943223175340fd1a265c62780d9b67ed820377ec3cec1f2bde2bfdda
BLAKE2b-256 checksum
How to use checksums
d4a000149c9ff3f6789657f48f6c86d4aa4cf1ca3780d7719e385c0db89b3c96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for video-tools-mcp 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page