io.github.z416479660/avc-test-py-mcp

السجل الرسمي الوسائط والتصميم

MCP server for video enhancement (create_task, get_task_status, enhance_video_sync)

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

PYPI package avc-test-py-mcp
Claude Code
claude mcp add avc-test-py-mcp -e 'HTTP_API_BASE_URL=<HTTP_API_BASE_URL>' -e 'HTTP_API_KEY=<your http_api_key>' -- uvx avc-test-py-mcp==0.1.3
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "avc-test-py-mcp": {
            "command": "uvx",
            "args": [
                "avc-test-py-mcp==0.1.3"
            ],
            "env": {
                "HTTP_API_BASE_URL": "<HTTP_API_BASE_URL>",
                "HTTP_API_KEY": "<your http_api_key>"
            }
        }
    }
}

متغيرات البيئة

  • HTTP_API_BASE_URL FastAPI HTTP Server base URL
  • HTTP_API_KEY إلزامي سري API authentication key
NPM package avc-test-js-mcp
Claude Code
claude mcp add avc-test-py-mcp -e 'HTTP_API_BASE_URL=<HTTP_API_BASE_URL>' -e 'HTTP_API_KEY=<your http_api_key>' -- npx -y avc-test-js-mcp@0.1.6
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "avc-test-py-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "avc-test-js-mcp@0.1.6"
            ],
            "env": {
                "HTTP_API_BASE_URL": "<HTTP_API_BASE_URL>",
                "HTTP_API_KEY": "<your http_api_key>"
            }
        }
    }
}

متغيرات البيئة

  • HTTP_API_BASE_URL FastAPI HTTP Server base URL
  • HTTP_API_KEY إلزامي سري API authentication key

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. avc-test-py-mcp (Python)
  2. 功能
  3. 安装
  4. 使用方法
  5. 提供的 Tools
  6. 文件上传说明
  7. 环境变量
  8. 开发
  9. 发布到 PyPI
  10. License

avc-test-py-mcp (Python)

基于 MCP 协议的视频增强服务,作为 MCP Client-Server 与 FastAPI HTTP Server 交互。

功能

提供以下 MCP Tools:

  • create_task - 创建视频增强任务(支持 URL 或本地文件上传)
  • get_task_status - 查询任务状态
  • enhance_video_sync - 同步增强视频(阻塞等待)

安装

从 PyPI 安装(推荐)
# 使用 pip 安装
pip install avc-test-py-mcp

# 或使用 uv 安装
uv pip install avc-test-py-mcp
从源码安装
git clone https://github.com/yourusername/avc-test-py-mcp.git
cd python_client

# 使用 uv 安装(推荐)
uv pip install -e ".[dev]"

# 或使用 pip 安装
pip install -e ".[dev]"

使用方法

1. 命令行启动
# 直接运行(安装后)
avc-test-py-mcp --base-url https://mcp.luluhero.com --api-key your-api-key

# 或使用环境变量
export HTTP_API_BASE_URL=https://mcp.luluhero.com
export HTTP_API_KEY=your-api-key
avc-test-py-mcp
2. 在 Claude Desktop 中配置

编辑 Claude Desktop 配置文件:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "video-enhancement": {
      "command": "avc-test-py-mcp",
      "args": [
        "--base-url",
        "https://mcp.luluhero.com",
        "--api-key",
        "your-api-key"
      ]
    }
  }
}
3. 使用 uv run 运行(开发模式)
uv run avc-test-py-mcp --base-url https://mcp.luluhero.com --api-key your-api-key

提供的 Tools

create_task

创建视频增强任务(异步)。

参数:

  • video_source (string, required): 视频 URL 或本地文件路径
  • type (string, optional): 上传类型,默认 "url"
    • 可选值: "url" - 网络视频URL, "local" - 本地文件路径
  • resolution (string, optional): 目标分辨率,默认 720p
    • 可选值: 480p, 540p, 720p, 1080p, 2k

使用示例:

# URL 方式
{
  "video_source": "https://example.com/video.mp4",
  "type": "url",
  "resolution": "1080p"
}

# 本地文件方式
{
  "video_source": "/path/to/local/video.mp4",
  "type": "local",
  "resolution": "1080p"
}

返回值:

{
  "success": true,
  "task_id": "xxx",
  "status": "wait"
}
get_task_status

查询任务状态。

参数:

  • task_id (string, required): 任务ID

使用示例:

{
  "task_id": "task-123-abc"
}

返回值:

{
  "success": true,
  "task_id": "xxx",
  "status": "completed",
  "progress": 100,
  "video_url": "https://...",
  "error_message": null,
  "created_at": "2024-01-01T00:00:00Z",
  "updated_at": "2024-01-01T00:01:00Z"
}
enhance_video_sync

同步增强视频(阻塞等待完成)。

参数:

  • video_source (string, required): 视频 URL 或本地文件路径
  • type (string, optional): 上传类型,默认 "url"
    • 可选值: "url" - 网络视频URL, "local" - 本地文件路径
  • resolution (string, optional): 目标分辨率,默认 720p
  • poll_interval (number, optional): 轮询间隔(秒),默认 5
  • timeout (number, optional): 超时时间(秒),默认 600

使用示例:

{
  "video_source": "https://example.com/video.mp4",
  "type": "url",
  "resolution": "1080p",
  "poll_interval": 5,
  "timeout": 600
}

返回值:

{
  "success": true,
  "task_id": "xxx",
  "status": "completed",
  "progress": 100,
  "video_url": "https://..."
}

文件上传说明

当 type 设置为 "local" 时,MCP Server 会:

  1. 读取本地文件
  2. 将文件转为 base64 编码
  3. 上传到视频增强服务

限制:

  • 最大文件大小:100MB

环境变量

变量名说明默认值
HTTP_API_BASE_URLFastAPI HTTP Server 地址https://mcp.luluhero.com
HTTP_API_KEYAPI 认证密钥无

开发

# 克隆仓库
git clone https://github.com/yourusername/avc-test-py-mcp.git
cd python_client

# 安装开发依赖
uv pip install -e ".[dev]"

# 运行测试
pytest

# 代码格式化
ruff format .
ruff check --fix .

发布到 PyPI

# 安装构建工具
uv pip install build twine

# 构建分发包
python -m build

# 上传到 PyPI(测试)
python -m twine upload --repository testpypi dist/*

# 上传到 PyPI(正式)
python -m twine upload dist/*

License

MIT License - 详见 LICENSE 文件

الأسئلة الشائعة

ما هو io.github.z416479660/avc-test-py-mcp؟

MCP server for video enhancement (create_task, get_task_status, enhance_video_sync)

كيف أثبّت io.github.z416479660/avc-test-py-mcp؟

يعمل على جهازك. في Claude Code: claude mcp add avc-test-py-mcp -e 'HTTP_API_BASE_URL=<HTTP_API_BASE_URL>' -e 'HTTP_API_KEY=<your http_api_key>' -- uvx avc-test-py-mcp==0.1.3. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج io.github.z416479660/avc-test-py-mcp إلى مفتاح API؟

نعم. يتطلب HTTP_API_KEY، وتضبطها في إعداداته.

هل io.github.z416479660/avc-test-py-mcp مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون io.github.z416479660/avc-test-py-mcp؟

ينشره z416479660. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.