GH

geopopos/higgsfield_ai_mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

45 stars 18 forks 质量 66 趋势 0MIT

geopopos/higgsfield_ai_mcp 是一个从 https://github.com/geopopos/higgsfield_ai_mcp. 导入的 MCP 服务器候选

概览

geopopos/higgsfield_ai_mcp 是一个从 https://github.com/geopopos/higgsfield_ai_mcp. 导入的 MCP 服务器候选

概述(AI 翻译)

一台模型上下文协议(MCP)服务器,提供Higgsfield AI电影级图像和视频生成能力。采用FastMCP构建。

🔧 近期修复(2025年11月2日)

视频生成现在正常工作! generate_video 功能已修复为使用正确的 API 格式:

  • 新增必填的prompt参数(可选,未提供自动生成)
  • 固定的API有效载荷结构,从image_url到input_images的数组格式
  • 增加了全面的文档和示例

详细使用方法请参见父目录中的HIGGSFIELD_VIDEO_GENERATION_GUIDE.md。

特色

  • 文本转图像生成:使用Soul模型创建高质量图像
  • 图像转视频:将静态图像转换为带有动态预设的5秒电影视频
  • 字符一致性:创建可重复使用的字符引用,以实现跨代一致的外观
  • 风格预设:浏览并应用电影风格预设
  • 动态库:访问预设计的视频生成动作特效

安装

先决条件

  • Python 3.10 或更高版本
  • pip(Python 软件包安装器)
  • 带有API凭证的Higgsfield AI账户(注册)

布置

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Higgsfield AI MCP Server

A Model Context Protocol (MCP) server that provides access to Higgsfield AI’s cinematic-grade image and video generation capabilities. Built with FastMCP.

🔧 Recent Fix (Nov 2, 2025)

Video generation now works correctly! The generate_video function has been fixed to use the proper API format:

  • Added required prompt parameter (optional, auto-generated if not provided)
  • Fixed API payload structure from image_url to input_images array format
  • Added comprehensive documentation and examples

See HIGGSFIELD_VIDEO_GENERATION_GUIDE.md in the parent directory for detailed usage.

Features

  • Text-to-Image Generation: Create high-quality images using the Soul model
  • Image-to-Video: Convert static images into cinematic 5-second videos with motion presets
  • Character Consistency: Create reusable character references for consistent appearance across generations
  • Style Presets: Browse and apply cinematic style presets
  • Motion Library: Access pre-designed motion effects for video generation

Installation

Prerequisites

  • Python 3.10 or higher
  • pip (Python package installer)
  • Higgsfield AI account with API credentials (Sign up)

Setup

  1. Clone or download this repository

  2. Install dependencies (choose one method):

    Option A: Using pip (recommended for simplicity)

    cd higgsfield_ai_mcp
    pip install -r requirements.txt
    

    Option B: Using Poetry

    cd higgsfield_ai_mcp
    poetry install
    
  3. Configure API credentials (choose one method):

    Option A: Environment variables (recommended for .env file)

    cp .env.example .env
    

    Edit .env and add your Higgsfield AI credentials:

    HF_API_KEY=your-api-key-here
    HF_SECRET=your-secret-key-here
    

    Option B: Command line arguments

    Pass credentials directly when running the server:

    python -m higgsfield_mcp.server --api-key YOUR_KEY --secret YOUR_SECRET
    

    Get your API keys from: https://cloud.higgsfield.ai/api-keys

Usage

Local Development & Testing

Test the server:

# Run directly with Python
python -m higgsfield_mcp.server

# Or with command line arguments
python -m higgsfield_mcp.server --api-key YOUR_KEY --secret YOUR_SECRET

# Run in development mode with auto-reload (if using Poetry)
poetry shell
fastmcp dev src/higgsfield_mcp/server.py

Claude Desktop Integration

Add this server to your Claude Desktop configuration:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

Method 1: Using Python directly with environment variables (recommended)

{
  "mcpServers": {
    "higgsfield": {
      "command": "python",
      "args": [
        "-m",
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "higgsfield": { "command": "python", "args": [ "-m", "higgsfield_mcp.server" ], "cwd": "/absolute/path/to/higgsfield_ai_mcp", "env": { "HF_API_KEY": "${HF_API_KEY}", "HF_SECRET": "${HF_SECRET}" } } } }