Skip to main content

An MCP server that provides video processing services

Project description

Video Service MCP

An MCP server that provides video processing services.

Features

  • Frame Extraction: Extract frames from a video, ensuring the first and last frames are included.
  • Video Concatenation: Concatenate multiple videos into a single video.

Installation

pip install -e .

Environment Variables

The following environment variables must be set for TOS (Tencent Object Storage) integration:

  • TOS_ACCESS_KEY: Your TOS access key
  • TOS_SECRET_KEY: Your TOS secret key
  • TOS_BUCKET_NAME: Your TOS bucket name
  • TOS_ENDPOINT (optional): TOS endpoint (default: "tos-cn-beijing.volces.com")
  • TOS_REGION (optional): TOS region (default: "cn-beijing")

Usage

Starting the Server

carey_mcp_video --transport sse

API

Extract Frames

Extracts frames from a video and uploads them to TOS.

extract_frames(video_url: str, num_frames: int = 10)

Parameters:

  • video_url: URL of the video to extract frames from.
  • num_frames: Number of frames to extract (minimum 2 for first and last frames).

Returns:

  • A dictionary containing:
    • success: Boolean indicating if the operation was successful
    • message: Human-readable message about the result
    • frames: List of frame URLs (on success)

Concatenate Videos

Concatenates multiple videos using FFmpeg and uploads the result to TOS.

concatenate_videos(video_urls: List[str])

Parameters:

  • video_urls: List of URLs of videos to concatenate.

Returns:

  • A dictionary containing:
    • success: Boolean indicating if the operation was successful
    • message: Human-readable message about the result
    • url: URL of the concatenated video (on success)

Dependencies

  • fastmcp
  • loguru
  • requests
  • opencv-python
  • tos
  • FFmpeg (system dependency)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

carey_mcp_video-0.1.4.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

carey_mcp_video-0.1.4-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file carey_mcp_video-0.1.4.tar.gz.

File metadata

  • Download URL: carey_mcp_video-0.1.4.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for carey_mcp_video-0.1.4.tar.gz
Algorithm Hash digest
SHA256 cfc5ad9705cc12191605d73b87d78d42469bffa4de032b5d95975d79cfa39702
MD5 93fbfaa25ad203c3a084d3d59b5abffb
BLAKE2b-256 4e0d25fabec54c631e2acc96dd8accd2ef19c19007ed697d86aa0f785ef5b85c

See more details on using hashes here.

File details

Details for the file carey_mcp_video-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for carey_mcp_video-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 16e169b40bd3473c70177f6921bd9bed891afd371d00d8332f7703cdebce5f31
MD5 3caaba55afa96934a959ffde0c2a40c8
BLAKE2b-256 f9caf10d52a27f80535c38498d3dbeb2a138163b61572071cfae22b2ec23f583

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page