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:
| Mode | Best for | Requires |
|---|---|---|
| Hosted (Streamable HTTP) | Claude Code, Cursor, Windsurf | Just your API key |
| stdio via CLI | Claude Desktop | muapi CLI installed |
Option 1 — Hosted Server (Recommended)
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
| Tool | Description |
|---|---|
search_models | Search muapi's model catalog by keyword or category (text-to-image, video, audio, etc.) |
Image Generation
| Tool | Description | Key models |
|---|---|---|
muapi_image_generate | Generate images from text prompts | flux-dev, flux-schnell, flux-kontext-dev/pro/max, hidream-fast/dev/full, midjourney, gpt4o, seedream, reve, qwen, wan2.1 |
muapi_image_edit | Edit or transform an image with a text prompt | flux-kontext-dev/pro/max/effects, gpt4o, seededit, reve, midjourney, qwen |
Video Generation
| Tool | Description | Key models |
|---|---|---|
muapi_video_generate | Generate videos from text prompts | veo3, veo3-fast, kling-master, wan2.1/2.2, seedance-pro/lite, hunyuan, runway, pixverse, vidu, minimax |
muapi_video_from_image | Animate an image into a video | veo3, veo3-fast, kling-std/pro/master, wan2.1/2.2, seedance, midjourney, minimax |
Audio
| Tool | Description |
|---|---|
muapi_audio_create | Create original music with Suno (prompt, title, genre tags, instrumental mode) |
muapi_audio_from_text | Generate sound effects or ambient audio with MMAudio |
Image Enhancement
| Tool | Description |
|---|---|
muapi_enhance_upscale | AI super-resolution upscaling |
muapi_enhance_bg_remove | Background removal |
muapi_enhance_face_swap | Face swap in images or videos |
muapi_enhance_ghibli | Studio Ghibli style transfer |
Video Editing
| Tool | Description |
|---|---|
muapi_edit_lipsync | Sync lip movements to an audio track (sync, latentsync, creatify, veed) |
muapi_edit_clipping | Extract AI-selected highlight clips from long videos |
Async Polling
| Tool | Description |
|---|---|
muapi_predict_result | Check the status and result of any async generation job by request ID |
Account & Keys
| Tool | Description |
|---|---|
muapi_account_balance | Check your current credit balance |
muapi_account_topup | Create a Stripe checkout session to add credits |
muapi_keys_list | List all API keys on your account |
muapi_keys_create | Create a new API key |
muapi_keys_delete | Delete 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
Related
- MuAPI CLI — Terminal interface with its own
muapi mcp servestdio command - Agent Skills — Shell script skills for Claude Code, Cursor, Gemini CLI
- Authentication — API key management
- API Reference — Full REST API docs