CoolFace
Apppublic

Agents-MCP-Hackathon/ai-image-video-mcp-server

sourceHugging Facemitupdated 1y agoView on Hugging Face
1likes
App README

I made this for myself to do bulk image editing (Background removal, upscale, edit) and products marketing/demo video generation agent. Only works locally because we can't pass images from Claude MCP Client to MCP server without passing a local path. If you are a jury please contact me @shdkhasan on X.com so i can give you the API keys to test locally. API keys below are required:

MODALLABSKEY=xxxx MODALLABSENDPOINT="https://xxxx.modal.run" GEMINI_API=XXXX

๐Ÿ“บ Demo Video

๐Ÿ‘‰ Watch how it works (Loom)


๐Ÿ”ง Tools Available

1. Remove Background
  • โ€”Model: BiRefNet v2 (hosted on Modal Labs)
  • โ€”Input: Image with background
  • โ€”Output: Transparent PNG
2. Upscale
  • โ€”Tile Upscaler: Highly accurate enhancer using tiled upscaling (hosted on Modal Labs)
  • โ€”Clarity Upscaler: General quality enhancer (calls external Gradio Space API)
3. Image-to-Video
  • โ€”Model: Google Veo 2
  • โ€”Input: Image + Prompt
  • โ€”Output: Cinematic video clip (5โ€“8 sec)
  • โ€”โš ๏ธ Note: Image must be visually coherent; typically used after background editing
4. Edit Image with Gemini
  • โ€”Model: Gemini 2.0 Flash Preview Image Generation
  • โ€”Purpose: Add backgrounds/scenes to background-removed subjects
  • โ€”โœ… Important: Prompt must specify to not alter the subject, only modify the environment.

๐Ÿง‘โ€๐Ÿ’ป How to Use With Claude Desktop (MCP)

To use this space as an MCP server:

  1. 1.Download [Claude Desktop](https://claude.ai)
  2. 2.In Claude's MCP config, add this server and filesystem:
json
{
  "mcpServers": {
    "gradio": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://127.0.0.1:7860/gradio_api/mcp/sse"
      ]
    },
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "C:\\Users\\YOUR_USERNAME\\Desktop\\claude-accessible-folder"
      ]
    }
  }
}
๐Ÿ—‚๏ธ Replace YOUR_USERNAME with your actual Windows username. Make sure the folder claude-accessible-folder exists on your Desktop. Claude will use it to share image/video files with the tools.

๐Ÿงต Built by: @shdkhasan