video-editing-mcp

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Integrations

  • Provides access to videos stored in the macOS Photos app when enabled with the LOAD_PHOTOS_DB environment variable

  • Allows downloading videos from YouTube URLs to add to the user's video library

视频编辑器 MCP 服务器

在此处查看演示: https://www.youtube.com/watch?v= KG6TMLD8GmA

上传、编辑、搜索和生成大家最喜欢的 LLM 和Video Jungle的视频。

您需要在Video Jungle注册一个帐户才能使用此工具,并添加您的 API 密钥。

成分

资源

服务器实现了一个用于上传、生成和编辑视频的接口,其中包括:

  • 用于访问单个视频和项目的自定义 vj:// URI 方案
  • 每个项目资源都有名称、描述
  • 搜索结果会返回有关视频内容和时间的元数据,以便直接进行编辑

提示

即将推出。

工具

服务器实现了一些工具:

  • add-video: 从 URL 添加视频
    • 返回 vj:// URI 来引用视频文件
  • search-videos:使用嵌入搜索视频
    • 根据嵌入和关键词返回视频匹配
  • 从视频生成编辑
    • 从一组视频文件生成渲染的视频编辑
  • 从单个视频生成编辑
    • 从单个输入视频文件生成编辑

在实践中使用工具

为了使用这些工具,您需要注册 Video Jungle 并添加您的 API 密钥。

添加视频

以下是调用add-video工具的示例提示:

can you download the video at https://www.youtube.com/shorts/RumgYaH5XYw and name it fly traps?

这将从 URL 下载视频,将其添加到您的视频库,并进行分析以供稍后检索。分析是多模式的,因此可以查询音频和视频组件。

搜索视频

下载并分析完视频后,您可以使用search-videos工具对其进行查询:

can you search my videos for fly traps?

搜索结果包含根据初步分析中发现的细节生成视频编辑的相关元数据。

搜索本地视频

您必须设置环境变量LOAD_PHOTOS_DB=1才能使用此工具,因为它将使 Claude 提示访问您本地机器上的文件。

完成后,您可以使用 Apple 的标签在照片应用中搜索手机上现有的视频。

就我而言,当我搜索“滑板”时,我得到了 1903 个视频文件。

can you search my local video files for Skateboard?

从视频生成编辑

最后,您可以使用这些搜索结果来生成编辑:

can you create an edit of all the times the video says "fly trap"?

(目前),视频编辑工具依赖于当前聊天中的上下文。

从单个视频生成编辑

最后,您可以从单个现有视频中剪切编辑内容:

can you create an edit of all the times this video says the word "fly trap"?

配置

您必须登录Video Jungle 设置页面,获取API 密钥。然后,使用此密钥启动 Video Jungle MCP:

$ uv run video-editor-mcp YOURAPIKEY

要允许此 MCP 服务器在 MacOS 上搜索您的照片应用:

$ LOAD_PHOTOS_DB=1 uv run video-editor-mcp YOURAPIKEY

快速入门

安装

通过 Smithery 安装

要通过Smithery自动安装 Claude Desktop 的视频编辑器:

npx -y @smithery/cli install video-editor-mcp --client claude

克劳德桌面

您需要手动调整claude_desktop_config.json

在 MacOS 上: ~/Library/Application\ Support/Claude/claude_desktop_config.json在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json

"mcpServers": { "video-editor-mcp": { "command": "uvx", "args": [ "video-editor-mcp", "YOURAPIKEY" ] } }
"mcpServers": { "video-editor-mcp": { "command": "uv", "args": [ "--directory", "/Users/YOURDIRECTORY/video-editor-mcp", "run", "video-editor-mcp", "YOURAPIKEY" ] } }

启用本地照片应用程序访问权限(搜索您的照片应用程序):

"video-jungle-mcp": { "command": "uv", "args": [ "--directory", "/Users/<PATH_TO>/video-jungle-mcp", "run", "video-editor-mcp", "<YOURAPIKEY>" ], "env": { "LOAD_PHOTOS_DB": "1" } },

确保将这些目录替换为您在计算机上放置存储库的目录。

发展

构建和发布

准备分发包:

  1. 同步依赖项并更新锁文件:
uv sync
  1. 构建软件包分发版:
uv build

这将在dist/目录中创建源和轮子分布。

  1. 发布到 PyPI:
uv publish

注意:您需要通过环境变量或命令标志设置 PyPI 凭据:

  • 令牌: --tokenUV_PUBLISH_TOKEN
  • 或用户名/密码: --username / UV_PUBLISH_USERNAME--password / UV_PUBLISH_PASSWORD

调试

由于 MCP 服务器通过 stdio 运行,调试起来可能比较困难。为了获得最佳调试体验,我们强烈建议使用MCP Inspector

您可以使用以下命令通过npm启动 MCP Inspector:

(请确保将YOURDIRECTORYYOURAPIKEY替换为此 repo 所在的目录以及在设置页面中找到的 Video Jungle API 密钥。)

npx @modelcontextprotocol/inspector uv run --directory /Users/YOURDIRECTORY/video-editor-mcp video-editor-mcp YOURAPIKEY

启动后,检查器将显示一个 URL,您可以在浏览器中访问该 URL 以开始调试。

此外,我在项目目录中的app.log中添加了日志记录。您可以通过以下方式添加日志记录来诊断 API 调用:

logging.info("this is a test log")

在进行项目工作时,一个合理的跟进方法是打开终端会话并执行以下操作:

$ tail -n 90 -f app.log
-
security - not tested
F
license - not found
-
quality - not tested

上传、编辑和生成大家最喜欢的 LLM 和Video Jungle的视频。

  1. Components
    1. Resources
    2. Prompts
    3. Tools
    4. Using Tools in Practice
  2. Configuration
    1. Quickstart
      1. Install
    2. Development
      1. Building and Publishing
      2. Debugging
    ID: th0hjo14xx