OpenFX SDK 服务器

一个提供OpenFX SDK全面访问的MCP服务器,用于视觉特效插件开发。

  • by VFX-Tools-LLC
  • Python
  • 本地部署
  • 3 星标
  • 更新于
在 GitHub 查看 emlcpfx/mcp_ofx

使用说明

MCP OFX-OpenFX SDK服务器

一个模型上下文协议(MCP)服务器,提供对OpenFX(OFX)SDK的全面访问,用于视觉效果插件开发。

概述

此MCP服务器公开整个OpenFX SDK API,使其易于:

  • 查找任何OFX常量、动作、属性或套件
  • 按关键字搜索API
  • 获取有关上下文、参数类型和主机兼容性的详细信息
  • 生成完整的插件骨架代码
  • 了解插件的动作调用顺序

安装

pip install mcp-ofx

或者从源代码安装:

git clone https://github.com/mcp-ofx/mcp-ofx
cd mcp-ofx
pip install -e .

用法

作为MCP服务器

添加到MCP客户端配置中:

{
  "mcpServers": {
    "ofx": {
      "command": "mcp-ofx"
    }
  }
}

可用工具

ofx_lookup

按确切名称查找OFX定义。

ofx_lookup("kOfxStatOK")
ofx_lookup("kOfxActionDescribe")
ofx_lookup("kOfxParamTypeDouble")

ofx_search

按关键字搜索定义。

ofx_search("render")
ofx_search("clip", category="image_effect_actions")

ofx_list_category

列出类别中的所有定义。

类别: status_codes, core_actions, image_effect_actions, contexts, param_types, bit_depths, image_components, field_types, premult_states, thread_safety, change_reasons, suites, standard_clips, standard_params, gpu_properties, type_identifiers, data_structures, exported_functions

ofx_get_actions

获取所有OFX操作及其详细信息。

ofx_action_sequence

获取插件的典型动作调用序列。

ofx_get_suite

获取OFX套件的详细信息,包括其所有功能。

ofx_get_suite("kOfxPropertySuite")
ofx_get_suite("kOfxImageEffectSuite")

ofx_get_context

获取有关图像效果上下文的详细信息。

ofx_get_context("kOfxImageEffectContextFilter")
ofx_get_context("kOfxImageEffectContextTransition")

ofx_get_param_type

获取参数类型的详细信息。

ofx_get_param_type("kOfxParamTypeDouble")
ofx_get_param_type("kOfxParamTypeChoice")

ofx_host_compatibility

获取特定主机的兼容性信息。

ofx_host_compatibility("DaVinci Resolve")
ofx_host_compatibility("Nuke")

ofx_generate_plugin

生成一个完整的插件框架。

ofx_generate_plugin(
    plugin_name="My Blur",
    plugin_id="com.mycompany.myblur",
    context="kOfxImageEffectContextFilter",
    params=[
        {"name": "radius", "type": "kOfxParamTypeDouble", "default": 5.0, "min": 0, "max": 100}
    ],
    supports_gpu=True
)

ofx_generate_param

为单个参数定义生成代码。

ofx_summary

获取OFX SDK结构的摘要。

OFX SDK版本

此服务器基于 OpenFX 1.5 (2024年12月)来自学院软件基金会。

支持的主机

  • 达芬奇调色
  • Nuke(参考实施)
  • 融合
  • 拉斯维加斯职业
  • 还有更多。..

资源

许可证

MIT许可证