title: "MCP Server" description: "Connect Claude, Cursor, Windsurf, and any MCP-compatible AI assistant to muapi.ai using the Model Context Protocol."

MCP Server

Connect any MCP-compatible AI assistant to muapi.ai using the Model Context Protocol. Once connected, your assistant can generate images, videos, and audio, edit media, check your balance, and more — all without leaving your editor.

muapi supports two MCP transport modes:

ModeBest forRequires
Hosted (Streamable HTTP)Claude Code, Cursor, WindsurfJust your API key
stdio via CLIClaude Desktopmuapi CLI installed

The hosted MCP server at https://api.muapi.ai/mcp follows the standard Streamable HTTP transport. No installation required — just add the URL and your API key to your client.

Get your API key at muapi.ai/dashboard

Claude Code

claude mcp add --transport http muapi \
  https://api.muapi.ai/mcp \
  --header "Authorization: Bearer YOUR_MUAPI_KEY"

Verify it's connected:

claude mcp list

Cursor

Open Cmd+Shift+P (or Ctrl+Shift+P) → Open MCP settings and add to mcp.json:

{
  "mcpServers": {
    "muapi": {
      "url": "https://api.muapi.ai/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_MUAPI_KEY"
      }
    }
  }
}

Restart Cursor after saving.

Windsurf

Open Settings → MCP and add:

{
  "mcpServers": {
    "muapi": {
      "serverUrl": "https://api.muapi.ai/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_MUAPI_KEY"
      }
    }
  }
}

Other MCP clients

Any client that supports Streamable HTTP transport can connect. Use the following:

  • URL: https://api.muapi.ai/mcp
  • Auth header: Authorization: Bearer YOUR_MUAPI_KEY

Option 2 — stdio via CLI (Claude Desktop)

Run the muapi CLI as a local stdio MCP server. Requires the CLI to be installed.

# Install the CLI
npm install -g muapi-cli

# Set your API key
muapi auth configure --api-key "YOUR_KEY"

# Start the MCP server
muapi mcp serve

Claude Desktop — add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "muapi": {
      "command": "muapi",
      "args": ["mcp", "serve"],
      "env": {
        "MUAPI_API_KEY": "your-key-here"
      }
    }
  }
}

Available Tools

Once connected, your AI assistant has access to 19 tools:

Discovery

ToolDescription
search_modelsSearch muapi's model catalog by keyword or category (text-to-image, video, audio, etc.)

Image Generation

ToolDescriptionKey models
muapi_image_generateGenerate images from text promptsflux-dev, flux-schnell, flux-kontext-dev/pro/max, hidream-fast/dev/full, midjourney, gpt4o, seedream, reve, qwen, wan2.1
muapi_image_editEdit or transform an image with a text promptflux-kontext-dev/pro/max/effects, gpt4o, seededit, reve, midjourney, qwen

Video Generation

ToolDescriptionKey models
muapi_video_generateGenerate videos from text promptsveo3, veo3-fast, kling-master, wan2.1/2.2, seedance-pro/lite, hunyuan, runway, pixverse, vidu, minimax
muapi_video_from_imageAnimate an image into a videoveo3, veo3-fast, kling-std/pro/master, wan2.1/2.2, seedance, midjourney, minimax

Audio

ToolDescription
muapi_audio_createCreate original music with Suno (prompt, title, genre tags, instrumental mode)
muapi_audio_from_textGenerate sound effects or ambient audio with MMAudio

Image Enhancement

ToolDescription
muapi_enhance_upscaleAI super-resolution upscaling
muapi_enhance_bg_removeBackground removal
muapi_enhance_face_swapFace swap in images or videos
muapi_enhance_ghibliStudio Ghibli style transfer

Video Editing

ToolDescription
muapi_edit_lipsyncSync lip movements to an audio track (sync, latentsync, creatify, veed)
muapi_edit_clippingExtract AI-selected highlight clips from long videos

Async Polling

ToolDescription
muapi_predict_resultCheck the status and result of any async generation job by request ID

Account & Keys

ToolDescription
muapi_account_balanceCheck your current credit balance
muapi_account_topupCreate a Stripe checkout session to add credits
muapi_keys_listList all API keys on your account
muapi_keys_createCreate a new API key
muapi_keys_deleteDelete an API key by ID

Example Prompts

Once your client is connected, talk to your AI assistant naturally:

Generate an image:

"Generate a photorealistic mountain lake at golden hour using flux-dev"

Edit an image:

"Remove the background from this image" (attach image URL)

Create a video:

"Make a 5-second cinematic video of a robot walking through a rainy forest using kling-master"

Animate a photo:

"Turn this product photo into a short looping video" (attach image URL)

Create music:

"Create a 30-second lo-fi hip hop track, instrumental only"

Check balance:

"What's my muapi credit balance?"

Find models:

"What video generation models are available on muapi?"


How Async Generation Works

Generation tools (image, video, audio) return a request_id immediately:

{ "request_id": "abc123", "status": "processing" }

Your assistant automatically polls muapi_predict_result until the job is done:

{
  "request_id": "abc123",
  "status": "completed",
  "outputs": ["https://cdn.muapi.ai/..."]
}

You can also check manually at any time:

"Check the status of request abc123"


Self-Hosted MCP Server

For teams that want to run their own MCP server instance, the muapi-mcp-server repo provides a standalone FastAPI server with the full tool catalog.

git clone https://github.com/SamurAIGPT/muapi-mcp-server.git
cd muapi-mcp-server
pip install fastapi uvicorn requests pydantic
MUAPIAPP_API_KEY=your_key python mcp_server.py