npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

http-mcp-client-server

v0.1.3

Published

HTTP MCP Client-Server for video enhancement API

Readme

http-mcp-client-server (Node.js)

npm version Node.js >=18 License: MIT

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

功能

提供以下 MCP Tools:

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

安装

从 npm 安装(推荐)

npm install -g http-mcp-client-server

或使用 yarn/pnpm:

yarn global add http-mcp-client-server
pnpm add -g http-mcp-client-server

从源码安装

git clone https://github.com/yourusername/http-mcp-client-server.git
cd js_client
npm install
npm run build

使用方法

1. 命令行启动

全局安装后直接使用:

http-mcp-client-server --base-url http://localhost:8000 --api-key your-api-key

或使用环境变量:

# Windows PowerShell
$env:HTTP_API_BASE_URL="http://localhost:8000"
$env:HTTP_API_KEY="your-api-key"
http-mcp-client-server

# Windows CMD
set HTTP_API_BASE_URL=http://localhost:8000
set HTTP_API_KEY=your-api-key
http-mcp-client-server

# macOS/Linux
export HTTP_API_BASE_URL=http://localhost:8000
export HTTP_API_KEY=your-api-key
http-mcp-client-server

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": "http-mcp-client-server",
      "args": [
        "--base-url",
        "http://localhost:8000",
        "--api-key",
        "your-api-key"
      ]
    }
  }
}

3. 使用 npx(无需全局安装)

npx http-mcp-client-server --base-url http://localhost:8000 --api-key your-api-key

Claude Desktop 配置:

{
  "mcpServers": {
    "video-enhancement": {
      "command": "npx",
      "args": [
        "http-mcp-client-server",
        "--base-url",
        "http://localhost:8000",
        "--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_URL | FastAPI HTTP Server 地址 | http://localhost:8000 | | HTTP_API_KEY | API 认证密钥 | 无 |

开发

# 克隆仓库
git clone https://github.com/yourusername/http-mcp-client-server.git
cd js_client

# 安装依赖
npm install

# 开发模式(自动编译)
npm run dev

# 构建
npm run build

License

MIT License - 详见 LICENSE 文件