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

Uploaded Python 3

File details

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

File metadata

  • Download URL: carey_mcp_video-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 4ea4ba0f08883b7d5bb104402386ec46292933146b29346da0eba5f9fdcdb1f0
MD5 ef4db1a73df2aba8bb1611cdc5c93414
BLAKE2b-256 47cc78d3c5749bc2618097a1fdfc27cfb4dbaf10a739c879285de0af7706e5d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for carey_mcp_video-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 178f656c7ec55922e4c5cd2cf683249b1fa772eb06573b970b8c33f602241f16
MD5 f2b33b7c8a16b591009298bfe68f09ab
BLAKE2b-256 cc07210b7e0f89a7bc761124494f29f2e31492a519e3f43a0f8dfdad27cd33b5

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