Skip to main content

MCP Server

OpenTryOn ships a Model Context Protocol server under mcp-server/. Every model in tryon.cli.registry becomes an MCP tool automatically — the same surface as the opentryon CLI, via tryon.cli.runner.invoke_model().

Current release: OpenTryOn v0.0.9+ (pip install -U opentryon).

This page is the Docusaurus guide for the server. Keep it next to:

Why it matters​

  • Agents in Cursor, Claude Desktop, or TryOn Studio call try-on, generate, edit, video, understand, detect, bg-remove, tts, decide, and embed tools directly.
  • Studio chat goes through planner_agent: it classifies intent, then runs a filtered slice of those same registry tools via invoke_model. Capability screens skip the planner and call the model tools themselves.
  • New registry models appear as tools with zero hand-written MCP wrappers.
  • CLI and MCP cannot drift — one runner, one registry.

Install​

cd opentryon
pip install -e . # core (API-backed) models
# optional GPU extras (leffa, catvton, kimi-vl, qwen3.8, ben2, …):
pip install -e ".[local]"

cd mcp-server
pip install -r requirements.txt

Copy repo-root env.template to .env and fill the keys you plan to use. The server and every adapter read that same file.

Run​

# stdio — what Claude Desktop / Cursor expect
python server.py

# streamable-HTTP — required by TryOn Studio
python server.py --transport http --host 127.0.0.1 --port 8000

On startup the server prints a configuration report to stderr (which keys are set, which models are ready) — the same text opentryon_status returns at runtime.

TransportTypical clientEndpoint
stdio (default)Cursor, Claude Desktopprocess stdin/stdout
HTTPTryOn Studio, FastMCP Client over the networkhttp://127.0.0.1:8000/mcp

Studio’s only URL is OPENTRYON_MCP_URL=http://127.0.0.1:8000/mcp. Remote MCP hosts are out of scope for Studio.

Clients​

TryOn Studio​

HTTP MCP plus a Next.js UI (Agent, Connect, Image, VTON, Understand, Video, BG Remove). Full setup: TryOn Studio.

Cursor​

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global). Example: mcp-server/examples/cursor_mcp_config.json.

{
"mcpServers": {
"opentryon": {
"command": "python",
"args": ["/absolute/path/to/opentryon/mcp-server/server.py"]
}
}
}

Claude Desktop​

Add to claude_desktop_config.json. Example: mcp-server/examples/claude_desktop_config.json.

{
"mcpServers": {
"opentryon": {
"command": "python",
"args": ["/absolute/path/to/opentryon/mcp-server/server.py"]
}
}
}

Python (FastMCP client)​

See mcp-server/examples/example_usage.py.

import asyncio
from fastmcp import Client

async def main():
async with Client("server.py") as client:
result = await client.call_tool("vton_flux_vto", {
"person": "model.jpg",
"garment": "garment.jpg",
"dry_run": True,
})
print(result.data)

asyncio.run(main())

Discovery, keys, and the planner​

Always available, independent of which models you configured:

ToolRole
list_opentryon_toolsServices, models, MCP tool names, env readiness
opentryon_statusSame human-readable report printed on startup
list_api_keys / set_api_keysInspect or upsert host .env keys (never returns secret values). Studio Connect uses these
planner_agentStudio Agent chat entrypoint. Cheap LLM classifies intent, then invoke_model on a filtered slice. Planner Agent

Every generated model tool also accepts dry_run and output_dir, matching the CLI.

Selected tools​

The tables below highlight newer families. The complete generated list lives in mcp-server/README.md and grows with tryon/cli/registry.py.

Understand tools (including Qwen3.8 and Hy4)​

Multimodal image/video understanding tools include Kimi, LLaVA-NeXT, the Qwen3.8 dual path (+ Qwen3.8-Omni-Flash for audio), GLM-5.3-FlashX, DeepSeek-V4.1-Flash (+ local DeepSeek-VL2 / DeepSeek-OCR), Ternary Bonsai 2 27B (local server), and Hy4 preview (TokenHub LLM + local vLLM/SGLang). Limite 1B - Violetto also lives under understand but is text-only math reasoning, out of fashion/media scope, and named-model-only (not a capability default):

MCP toolBackendNeeds
understand_qwen3_8_maxDashScope Qwen3.8-Max (text/image/video, thinking + reasoning_effort)DASHSCOPE_API_KEY
understand_qwen3_8_omni_flashDashScope Qwen3.8-Omni-Flash (adds audio; text/image/audio/video, 1M context)DASHSCOPE_API_KEY
understand_qwen3_8Local Qwen/Qwen3.8-27Bpip install opentryon[local] + GPU
understand_glm_5_3_flashxZ.ai GLM-5.3-FlashX (text/image/video, 200 tok/s)ZAI_API_KEY
understand_deepseek_flashDeepSeek deepseek-flash (text/image only, no video; cheapest frontier VLM)DEEPSEEK_API_KEY
understand_deepseek_vl2Local deepseek-ai/deepseek-vl2-tiny (no first-party hosted API)pip install opentryon[local] + GPU + deepseek_vl2 package
understand_deepseek_ocrLocal deepseek-ai/DeepSeek-OCR (document/label OCR, no first-party hosted API)pip install opentryon[local] + GPU + flash-attn
understand_ternary_bonsai_2_27bPrismML Ternary Bonsai 2 27B (self-hosted llama.cpp/MLX server)BONSAI_BASE_URL (default localhost:8080)
understand_limite_1b_violettoParadigma Limite 1B - Violetto (text-only math reasoning; out of fashion/media scope)pip install opentryon[local] + GPU
understand_beamReflection Beam 1.0 (text chat, 501B MoE)REFLECTION_API_KEY
understand_laguna_xs_2 / understand_laguna_xs_2_1 / understand_laguna_m_1Poolside Laguna (text chat)POOLSIDE_API_KEY
understand_trinity_large / understand_trinity_large_thinking / understand_trinity_miniArcee Trinity (400B Large hosted)ARCEE_API_KEY
understand_trinity_nanoTrinity Nano via local vLLM/SGLangTRINITY_BASE_URL (default localhost:8000)
understand_hy4_previewTencent Hy4 preview (TokenHub LLM)TOKENHUB_API_KEY
understand_hy4_preview_localHy4 via local vLLM/SGLang OpenAI serverHY4_BASE_URL (default localhost:8000)

Qwen-Image tools (generate / edit / VTON)​

Same DashScope key as Qwen3.8-Max. Image generation is Qwen-Image, not the Qwen3.8 VLM:

MCP toolBackendNeeds
generate_qwen_imageQwen-Image 3.0 T2I (default qwen-image-3.0-pro)DASHSCOPE_API_KEY
edit_qwen_imageQwen-Image I2I (1–3 refs)DASHSCOPE_API_KEY
vton_qwen_imagePerson + garment compositionDASHSCOPE_API_KEY

Typical loop: understand_qwen3_8_max captions a garment, then generate_qwen_image or vton_qwen_image uses that description.

Local Diffusers twin (pip install opentryon[local] + CUDA):

MCP toolBackendNeeds
generate_qwen_image_localQwen/Qwen-Image-2512 T2IGPU + recent Diffusers
edit_qwen_image_localQwen/Qwen-Image-Edit-2511 I2IGPU + recent Diffusers
vton_qwen_image_localEdit-Plus person + garmentGPU + recent Diffusers

See Qwen-Image local.

Local dedicated VTON (Leffa + CatVTON + FASHN VTON 1.5)​

MCP toolBackendNeeds
vton_leffafranciszzj/Leffa (CVPR 2025)GPU + opentryon[local]
vton_catvtonzhengchong/CatVTON (ICLR 2025, CC BY-NC-SA)GPU + opentryon[local]
vton_fashn_vton_1_5fashn-ai/fashn-vton-1.5 (maskless, Apache-2.0)GPU + opentryon[local] + fashn_vton

See Leffa, CatVTON and FASHN VTON v1.5. Nano Banana 2.1 adds generate_nano_banana_2_1 and edit_nano_banana_2_1 (GEMINI_API_KEY).

Qwen3.8 is a native multimodal / coding / agent family; OpenTryOn’s MCP tools expose the understand entry point (image and/or video + prompt). Full capability notes: Qwen3.8-Max, Qwen-Image, and Qwen3.8 local.

MiniMax H3 tools (video)​

Same MINIMAX_API_KEY as Hailuo 2.3. H3 is a dual path (hosted V2 vs local Diffusers); Hailuo 2.3 stays API-only. H3 Max is the hosted fast variant (no local twin).

MCP toolBackendNeeds
video_generate_minimax_h3MiniMax H3 official V2 API (T2V / I2V / R2V, 4–15s, 768P/2K)MINIMAX_API_KEY
video_generate_minimax_h3_maxMiniMax H3 Max (fast V2; T2V / I2V, 5–15s, 480P/768P)MINIMAX_API_KEY
video_generate_fal_h3_maxFal-hosted H3 Max (T2V / I2V / R2V, 5–15s, 480P/768P)FAL_KEY
video_generate_fal_h3_max_lipsyncFal-hosted H3 Max Lip Sync (image + audio → dubbed video, 480P–2K)FAL_KEY
video_generate_minimax_h3_localOpen-weight MiniMaxAI/MiniMax-H3 (768p H3-Base)pip install opentryon[local] + CUDA + Diffusers from main
video_generate_hailuo_2_3MiniMax Hailuo 2.3 (V1)MINIMAX_API_KEY

See MiniMax H3 API, MiniMax H3 Max (Fal), and MiniMax H3 local.

NVIDIA NIM tools (understand + video)​

Same NVIDIA_API_KEY for Nemotron Omni, Cosmos 3 Reasoner, and Cosmos 3 Generator.

MCP toolBackendNeeds
understand_nemotron_omniNemotron 3 Nano Omni (image / video / audio)NVIDIA_API_KEY
understand_nemotron_3_5_super_vlNemotron 3.5 Super VL (image / video / text; no audio)NVIDIA_API_KEY
understand_cosmos3_reasonerCosmos 3 Reasoner (physical-world VLM)NVIDIA_API_KEY
video_generate_cosmos3Cosmos 3 Generator nano (T2V / I2V)NVIDIA_API_KEY

See NVIDIA NIM.

Moondream and Cosmos 3 Nano NIM​

Moondream Cloud uses MOONDREAM_API_KEY. Photon local needs pip install moondream and no key. The certified Cosmos 3 NIM is a separate localhost server (COSMOS3_NIM_URL, default http://127.0.0.1:8010/v1/infer).

MCP toolBackendNeeds
understand_moondream_3_1Query or caption (--skill caption)MOONDREAM_API_KEY
understand_moondream_3_previewSame skills, preview checkpointMOONDREAM_API_KEY
understand_moondream_3_1_localPhoton 3.1pip install moondream
detect_moondream_3_1Boxes, points, or SVG (--skill point|segment)MOONDREAM_API_KEY
detect_moondream_3_previewSame skills, preview checkpointMOONDREAM_API_KEY
detect_moondream_3_1_localPhoton 3.1 detectpip install moondream
generate_cosmos3_nano_t2iCertified NIM text2imagelocal NIM
video_generate_cosmos3_nano_v2vCertified NIM video2videolocal NIM
robot_act_cosmos3_nano_droidNano-DROID policy actionslocal NIM

See Moondream and Cosmos 3 Nano NIM.

Google Virtual Try-On (Vertex)​

Dedicated person + product try-on. Not GEMINI_API_KEY / Nano Banana.

MCP toolBackendNeeds
vton_google_vtonVertex virtual-try-on-001GOOGLE_CLOUD_PROJECT + ADC

See Google Virtual Try-On.

OutfitAnyone-Plus (DashScope, Beijing)​

Dedicated Alibaba try-on. Not Qwen-Image composition. Needs a China Beijing-region DASHSCOPE_API_KEY.

MCP toolBackendNeeds
vton_outfitanyone_plusaitryon-plusBeijing DASHSCOPE_API_KEY

See OutfitAnyone-Plus.

Photoroom (Virtual Try-On / Virtual Model)​

Image Editing API Plus. Same PHOTOROOM_API_KEY. Prefix with sandbox_ for watermarked tests.

MCP toolBackendNeeds
vton_photoroom_vtonShopper try-on (virtualModel.model.custom)PHOTOROOM_API_KEY
vton_photoroom_virtual_modelCatalog on-model (preset or custom)PHOTOROOM_API_KEY

See Photoroom.

Muse Image tools (generate / edit / VTON)​

First-party Meta Model API (MODEL_API_KEY). No local twin. Muse Video is not on the API yet.

MCP toolBackendNeeds
generate_muse_imageMuse Image T2I (muse-image-1.0)MODEL_API_KEY
edit_muse_imageMuse Image I2I / multi-refMODEL_API_KEY
vton_muse_imagePerson + garment compositionMODEL_API_KEY

See Muse Image and Muse Video (not available).

P-Image-Ideogram (generate)​

Same PRUNA_API_KEY as the rest of the Pruna family. Not Ideogram 4.0 (generate_ideogram / IDEOGRAM_API_KEY).

MCP toolBackendNeeds
generate_p_image_ideogramPruna Model: p-image-ideogram (thinking very-low–very-high, 1K/2K)PRUNA_API_KEY

See P-Image-Ideogram.

TTS tools (text-to-speech)​

OpenTryOn's first tts service. Same ELEVENLABS_API_KEY for both models; synchronous (no job/poll cycle) -- audio bytes come back directly.

MCP toolBackendNeeds
tts_eleven_v4ElevenLabs Eleven v4 (most expressive; 90+ languages, 10K char limit)ELEVENLABS_API_KEY
tts_eleven_v4_turboElevenLabs Eleven v4 Turbo (~100ms latency; audio tags for delivery control)ELEVENLABS_API_KEY
tts_gemini_3_8_flash_ttsGemini 3.8 Flash TTS (30 voices, 130+ languages, two-speaker dialogue)GEMINI_API_KEY
tts_gemini_3_8_flash_lite_ttsGemini 3.8 Flash-Lite TTS (fast, low cost)GEMINI_API_KEY

tts has no dedicated Studio capability screen yet (those are currently Image / VTON / Understand / Video / BG Remove) -- the tools are live via Studio's Agent chat and any MCP client as soon as the server restarts.

See ElevenLabs Eleven v4 / v4 Turbo.

Decide tools (decision models)​

The new decide service wraps "System One" models that return typed, calibrated answers instead of text. Every tool takes questions (JSON string or file path; schema on the Jev page) plus a state and/or media.

MCP toolBackendNeeds
decide_jevTypesafe AI Jev (text/JSON only)TYPESAFE_API_KEY
decide_pplx_deciderPerplexity Decider v1.2 / Flash (text + images, web grounding)PERPLEXITY_API_KEY
decide_pplx_decider_localPerplexity Decider on your SGLang serverlocal server
decide_clefCloudflare Clef / Clef-flash on Workers AI (text + images)CLOUDFLARE_API_TOKEN / CLOUDFLARE_ACCOUNT_ID
decide_clef_localCloudflare Clef on your SGLang serverlocal server
decide_kev_openrouterJared Palmer's Kev 4B via OpenRouter (text)OPENROUTER_API_KEY
decide_kev_localKev on your kev.serve server (text)local server
decide_autotrust_jev_localAutoTrust JEV on your vLLM /v1/decide server (text + images)local server
decide_d1_3bLiquid AI d1-3B (text/JSON + images)local/GPU
decide_d1_omni_600mLiquid AI d1-omni-600M (text/JSON + images or speech)local/GPU
decide_videojev_4bVideoJev 4B (local video grounding / MCQ)local/GPU
decide_videojev_35b_a3bVideoJev 35B-A3B (local video grounding / MCQ)local/GPU

FASHN catalogue tools (hosted, FASHN_API_KEY)​

Same key as vton_fashn_tryon_max. edit_fashn_product_to_model, edit_fashn_model_swap, edit_fashn_face_to_model, edit_fashn_reframe, edit_fashn_edit, generate_fashn_model_create, video_generate_fashn_image_to_video and bg_remove_fashn_bg_remove. See FASHN catalogue endpoints.

Recraft V3 (RECRAFT_API_TOKEN)​

Same Recraft token for generate, edit (image-to-image), and background remove. Not Ideogram 4.0.

MCP toolBackendNeeds
generate_recraft_v3Recraft V3 text-to-imageRECRAFT_API_TOKEN
edit_recraft_v3Recraft V3 image-to-imageRECRAFT_API_TOKEN
bg_remove_recraft_v3Recraft V3 background removeRECRAFT_API_TOKEN

Measure tools (Clad body sizing)​

MCP toolBackendNeeds
measure_clad_body_photoPhoto + height → ISO 8559-1 measurementsCLAD_API_KEY
measure_clad_body_questionnaireEight-question body modelCLAD_API_KEY
measure_clad_body_localMeasure Anny/MHR params JSONlocal / clad-body

See Clad body API.

v0.0.9 tools (understand, video, decide, robot-act, parse, embed)​

MCP toolBackendNeeds
understand_gemini_4_argon / understand_gemini_4_argon_cyber_permissiveGemini 4 Argon (reasoning, agentic video, long decode)GEMINI_API_KEY
understand_mercury_3Inception Mercury 3 (text-only diffusion LLM)INCEPTION_API_KEY
understand_flint_local / understand_flint_openrouterRecursive Flint (text-only coding agent)local server / OPENROUTER_API_KEY
understand_sage_a1_5_localSage-A1.5 (text-only agent)local server
understand_ripple_65b_openrouter / understand_ripple_65b_localRicursive Ripple-65B Preview (text-only coding LLM)OPENROUTER_API_KEY / local server
video_generate_flux3_maxFLUX 3 MaxBFL_API_KEY
video_generate_kling_v4Kling 4.0KLING_AI_API_KEY / KLING_AI_SECRET_KEY
decide_d3_turbo … decide_d3_edge (+ _local)vLLM Semantic Router Decision 3.0DECISION_API_KEY / local/GPU
decide_mercury_decideInception Mercury Decide (text + images)INCEPTION_API_KEY
robot_act_dream_1 / robot_act_dream_1_flashDream Labs World Action ModelDREAM_API_KEY
robot_act_cosmos3_nano_droidCosmos 3 Nano-DROID policy (certified NIM)local NIM
parse_nemotron_parse / parse_nemotron_parse_localNVIDIA Nemotron Parse (document OCR)NVIDIA_API_KEY / local NIM
parse_lightonocr_3_local / parse_lightonocr_3_vllmLightOnOCR-3 (page images and PDFs to markdown, optional grounding)local/GPU / your vLLM server
embed_nemotron_3_5_embed_1b / embed_nemotron_3_5_embed_1b_localNVIDIA Nemotron 3.5 Embed 1B (text + document images)NVIDIA_API_KEY / local NIM

The Decider, Clef, Kev and AutoTrust JEV tools are listed under Decide tools. See Decision models.

v0.0.8 tools (FLUX 3, lip-sync, 3D)​

MCP toolBackendNeeds
generate_flux3_image_klein / edit_flux3_image_kleinFLUX 3 Image Klein (distilled, BFL)BFL_API_KEY
generate_flux3_image_klein_local / edit_flux3_image_klein_localFLUX 3 Image Klein (local Diffusers)local/GPU
video_generate_flux3_videoFLUX 3 Video (text, keyframes, video-to-video)BFL_API_KEY
generate_sana_sprintSANA-Sprint (1–4 step text-to-image)local/GPU
audio_to_video_nvidia_lipsyncNVIDIA Maxine LipSync NIM (self-hosted gRPC)LIPSYNC_GRPC_TARGET
generate_3d_trellisMicrosoft TRELLIS (image or text → GLB/STL)NVIDIA_API_KEY

Classify tools (safety gating)​

MCP toolBackendNeeds
classify_tryon_safety_classifierGenlook try-on safety classifier (pass all photos of one product)local/GPU

Also new: vton_klein_4b_tryon (FLUX.2-klein-4B try-on LoRA, local). See Try-on safety classifier and FLUX.2-klein-4B try-on.

Embed tools (embeddings)​

The new embed service saves vectors to an .npz file under the output dir and returns its path, shapes, labels and (with query) similarity scores — not the raw vectors.

MCP toolBackendNeeds
embed_gemini_embedding_2Google Gemini Embedding 2 (3072-d Matryoshka; text/image/audio/video/PDF)GEMINI_API_KEY
embed_embeddinggemma_2Google EmbeddingGemma 2 (768-d; text/code/image/video/audio)local/GPU
embed_pplx_embed_v2_late_0_6bPerplexity pplx-embed-v2-late 0.6B (multi-vector, MaxSim)local/GPU
embed_pplx_embed_v2_late_9bPerplexity pplx-embed-v2-late 9B (multi-vector, MaxSim)local/GPU
embed_marqo_fashionsiglipMarqo-FashionSigLIP (fashion image + text retrieval)local/GPU
embed_moda_fashion_distilledMODA fashion-distilled (image-to-image)local/GPU
embed_moda_pro_liteMODA Pro Lite (fashion text-to-image)local/GPU
embed_zooclaw_fashionsiglip2ZooClaw-FashionSigLIP2local/GPU

Also new: understand_fashion_florence (local garment tagger), edit_qie_2511_extract_outfit (local garment extraction), understand_gemini_3_8_flash (GEMINI_API_KEY; image/video/audio/PDF), understand_claude_haiku_5_5 (ANTHROPIC_API_KEY) and video_generate_fal_h3_max_relight (FAL_KEY). decide and embed have no Studio capability screens yet; the tools are live to Studio's Agent chat (named-model only) and any MCP client after a server restart.

See Claude Haiku 5.5, Typesafe Jev, Liquid d1, EmbeddingGemma 2, pplx-embed-v2-late.