HitPaw MCP服务器
MCP(模型上下文协议)服务器,允许Claude直接调用HitPaw AI照片/视频增强服务。
特性
- 🖼️ 照片增强 -16个AI模型,支持肖像美化、一般超分辨率、去噪和生成恢复
- 🎬 视频增强 -8款AI模型,支持人像还原、普通还原、超高清还原
- 📋 任务查询 -实时查询处理状态和结果
- 📁 文件管理 -将URL保存到OSS,批量传输
- 📖 模型列表 -查看所有可用型号和使用建议
快速开始
方法1:直接使用npx运行(推荐)
export HITPAW_API_KEY=your_api_key_here
# Optional:
# export HITPAW_API_BASE_URL=https://api-base.hitpaw.com
npx @hitpaw/mcp-server方法2:通过npm进行全局安装
npm install -g @hitpaw/mcp-server
hitpaw-mcp-server方法3:从源代码构建
git clone https://github.com/hitpaw/mcp-server-hitpaw.git
cd mcp-server-hitpaw
make build
./build/hitpaw-mcp-server配置Claude桌面
编辑配置文件:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - 视窗:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"hitpaw": {
"command": "npx",
"args": ["-y", "@hitpaw/mcp-server"],
"env": {
"HITPAW_API_KEY": "your_api_key_here",
"HITPAW_API_BASE_URL": "https://api-base.hitpaw.com"
}
}
}
}如果从源代码构建,您可以直接指向二进制文件:
{
"mcpServers": {
"hitpaw": {
"command": "/path/to/hitpaw-mcp-server",
"env": {
"HITPAW_API_KEY": "your_api_key_here",
"HITPAW_API_BASE_URL": "https://api-base.hitpaw.com"
}
}
}
}配置后重新启动Claude Desktop。
配置游标IDE
编辑 ~/.cursor/mcp.json:
{
"mcpServers": {
"hitpaw": {
"command": "npx",
"args": ["-y", "@hitpaw/mcp-server"],
"env": {
"HITPAW_API_KEY": "your_api_key_here",
"HITPAW_API_BASE_URL": "https://api-base.hitpaw.com"
}
}
}
}环境变量
| 变量 | 必填 | 默认 | 描述 |
|---|---|---|---|
HITPAW_API_KEY | ✅ | - | HitPaw API密钥 |
HITPAW_API_BASE_URL | ❌ | https://api-base.hitpaw.com | API服务URL |
用法示例
在克劳德聊天:
User: Please enhance this photo https://example.com/photo.jpg
Claude: I'll help you enhance this image. Let me check the available models first...
[Calls list_photo_models]
This photo looks like a portrait, I recommend using the face_2x model to upscale it by 2x.
[Calls photo_enhance(model_name="face_2x", img_url="https://example.com/photo.jpg")]
Task created, task ID is xxx-xxx. Let me check the processing status...
[Calls task_status(job_id="xxx-xxx")]
Processing complete! Here is the link to the enhanced photo: https://...可用工具
| 工具名称 | 描述 |
|---|---|
photo_enhance | 照片增强/超分辨率 |
video_enhance | 视频增强/超分辨率 |
task_status | 查询任务状态 |
oss_transfer | 将URL文件传输到OSS |
oss_batch_transfer | 批量将URL传输到OSS |
list_photo_models | 列出照片增强型号 |
list_video_models | 列出视频增强型号 |
照片增强模型
肖像模特
| 型号 | 高档 | 描述 |
|---|---|---|
face_2x | 2x | 人像清晰柔和(美化效果) |
face_4x | 4x | 人像清晰柔和(美化效果) |
face_v2_2x | 2x | 肖像自然逼真(保留纹理) |
face_v2_4x | 4x | 肖像自然逼真(保留纹理) |
一般模型
| 型号 | 高档 | 描述 |
|---|---|---|
general_2x | 2x | 普通高清增强 |
general_4x | 4x | 普通高清增强 |
high_fidelity_2x | 2x | 高保真度(保留原始风格) |
high_fidelity_4x | 4x | 高保真度(保留原始风格) |
去噪模型
| 型号 | 高档 | 描述 |
|---|---|---|
sharpen_denoise_1x | 1x | 锐化和降噪 |
detail_denoise_1x | 1x | 终极保真度去噪 |
生成模型(SD)
| 型号 | 高档 | 描述 |
|---|---|---|
generative_portrait_1x/2x/4x | 1x/2x/4x | 生成肖像修复 |
generative_1x/2x/4x | 1x/2x/4x | 生成性全面修复 |
视频增强模型
| 型号 | 描述 |
|---|---|
face_soft_2x | 面部柔软增强2x |
portrait_restore_1x/2x | 肖像修复 |
general_restore_1x/2x/4x | 全面修复 |
ultrahd_restore_2x | 超高清还原(SD) |
generative_1x | 生成增强(SD) |
发展
make build # Build
make build-all # Cross-platform build
make test # Test
HITPAW_API_KEY=xxx make run # Run locally发布
# 1. Cross-platform build
bash scripts/build.sh 1.0.0
# 2. Create GitHub Release
gh release create v1.0.0 build/*
# 3. Publish npm package
cd npm && npm publish --access public许可证
麻省理工学院
