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.1.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.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: carey_mcp_video-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 c1a467ec9c76a99416e886774f4c3c082722f7430f3fa12741dff06f1228a11b
MD5 e3b59f08ae4ddc4abd9a177b7b5c7897
BLAKE2b-256 8c15965ad34e9c2816350e658785dc71d3ee5585867386bd5133dae4d53be032

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for carey_mcp_video-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 328c0ee7f124a94a49ff48869670ce1c249744eb676ceadbaa5f64b27be0c36e
MD5 54ac1fc6b425f6325b5e9fc3ea5ad26c
BLAKE2b-256 03c5c6ecdb804fda35cca6d4e01fe9b771ad00cad9e31a05dac36289c822e169

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