timur369's picture
Update README.md
8406055 verified

A newer version of the Gradio SDK is available: 6.0.1

Upgrade
metadata
title: Ai Image Video Mcp Server
emoji: πŸ‘€
colorFrom: green
colorTo: red
sdk: gradio
sdk_version: 5.33.1
app_file: app.py
pinned: false
license: mit
short_description: 'Edit images, create videos via MCP Client Claude '
tags:
  - mcp-server-track

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:

MODAL_LABS_KEY=xxxx MODAL_LABS_ENDPOINT="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. Download Claude Desktop
  2. In Claude's MCP config, add this server and filesystem:
{
  "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