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:
- In-repo README (full tool table):
mcp-server/README.md - TryOn Studio (the web MCP client): TryOn Studio
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 viainvoke_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.
| Transport | Typical client | Endpoint |
|---|---|---|
| stdio (default) | Cursor, Claude Desktop | process stdin/stdout |
| HTTP | TryOn Studio, FastMCP Client over the network | http://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:
| Tool | Role |
|---|---|
list_opentryon_tools | Services, models, MCP tool names, env readiness |
opentryon_status | Same human-readable report printed on startup |
list_api_keys / set_api_keys | Inspect or upsert host .env keys (never returns secret values). Studio Connect uses these |
planner_agent | Studio 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 tool | Backend | Needs |
|---|---|---|
understand_qwen3_8_max | DashScope Qwen3.8-Max (text/image/video, thinking + reasoning_effort) | DASHSCOPE_API_KEY |
understand_qwen3_8_omni_flash | DashScope Qwen3.8-Omni-Flash (adds audio; text/image/audio/video, 1M context) | DASHSCOPE_API_KEY |
understand_qwen3_8 | Local Qwen/Qwen3.8-27B | pip install opentryon[local] + GPU |
understand_glm_5_3_flashx | Z.ai GLM-5.3-FlashX (text/image/video, 200 tok/s) | ZAI_API_KEY |
understand_deepseek_flash | DeepSeek deepseek-flash (text/image only, no video; cheapest frontier VLM) | DEEPSEEK_API_KEY |
understand_deepseek_vl2 | Local deepseek-ai/deepseek-vl2-tiny (no first-party hosted API) | pip install opentryon[local] + GPU + deepseek_vl2 package |
understand_deepseek_ocr | Local deepseek-ai/DeepSeek-OCR (document/label OCR, no first-party hosted API) | pip install opentryon[local] + GPU + flash-attn |
understand_ternary_bonsai_2_27b | PrismML Ternary Bonsai 2 27B (self-hosted llama.cpp/MLX server) | BONSAI_BASE_URL (default localhost:8080) |
understand_limite_1b_violetto | Paradigma Limite 1B - Violetto (text-only math reasoning; out of fashion/media scope) | pip install opentryon[local] + GPU |
understand_beam | Reflection Beam 1.0 (text chat, 501B MoE) | REFLECTION_API_KEY |
understand_laguna_xs_2 / understand_laguna_xs_2_1 / understand_laguna_m_1 | Poolside Laguna (text chat) | POOLSIDE_API_KEY |
understand_trinity_large / understand_trinity_large_thinking / understand_trinity_mini | Arcee Trinity (400B Large hosted) | ARCEE_API_KEY |
understand_trinity_nano | Trinity Nano via local vLLM/SGLang | TRINITY_BASE_URL (default localhost:8000) |
understand_hy4_preview | Tencent Hy4 preview (TokenHub LLM) | TOKENHUB_API_KEY |
understand_hy4_preview_local | Hy4 via local vLLM/SGLang OpenAI server | HY4_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 tool | Backend | Needs |
|---|---|---|
generate_qwen_image | Qwen-Image 3.0 T2I (default qwen-image-3.0-pro) | DASHSCOPE_API_KEY |
edit_qwen_image | Qwen-Image I2I (1–3 refs) | DASHSCOPE_API_KEY |
vton_qwen_image | Person + garment composition | DASHSCOPE_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 tool | Backend | Needs |
|---|---|---|
generate_qwen_image_local | Qwen/Qwen-Image-2512 T2I | GPU + recent Diffusers |
edit_qwen_image_local | Qwen/Qwen-Image-Edit-2511 I2I | GPU + recent Diffusers |
vton_qwen_image_local | Edit-Plus person + garment | GPU + recent Diffusers |
See Qwen-Image local.
Local dedicated VTON (Leffa + CatVTON + FASHN VTON 1.5)
| MCP tool | Backend | Needs |
|---|---|---|
vton_leffa | franciszzj/Leffa (CVPR 2025) | GPU + opentryon[local] |
vton_catvton | zhengchong/CatVTON (ICLR 2025, CC BY-NC-SA) | GPU + opentryon[local] |
vton_fashn_vton_1_5 | fashn-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 tool | Backend | Needs |
|---|---|---|
video_generate_minimax_h3 | MiniMax H3 official V2 API (T2V / I2V / R2V, 4–15s, 768P/2K) | MINIMAX_API_KEY |
video_generate_minimax_h3_max | MiniMax H3 Max (fast V2; T2V / I2V, 5–15s, 480P/768P) | MINIMAX_API_KEY |
video_generate_fal_h3_max | Fal-hosted H3 Max (T2V / I2V / R2V, 5–15s, 480P/768P) | FAL_KEY |
video_generate_fal_h3_max_lipsync | Fal-hosted H3 Max Lip Sync (image + audio → dubbed video, 480P–2K) | FAL_KEY |
video_generate_minimax_h3_local | Open-weight MiniMaxAI/MiniMax-H3 (768p H3-Base) | pip install opentryon[local] + CUDA + Diffusers from main |
video_generate_hailuo_2_3 | MiniMax 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 tool | Backend | Needs |
|---|---|---|
understand_nemotron_omni | Nemotron 3 Nano Omni (image / video / audio) | NVIDIA_API_KEY |
understand_nemotron_3_5_super_vl | Nemotron 3.5 Super VL (image / video / text; no audio) | NVIDIA_API_KEY |
understand_cosmos3_reasoner | Cosmos 3 Reasoner (physical-world VLM) | NVIDIA_API_KEY |
video_generate_cosmos3 | Cosmos 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 tool | Backend | Needs |
|---|---|---|
understand_moondream_3_1 | Query or caption (--skill caption) | MOONDREAM_API_KEY |
understand_moondream_3_preview | Same skills, preview checkpoint | MOONDREAM_API_KEY |
understand_moondream_3_1_local | Photon 3.1 | pip install moondream |
detect_moondream_3_1 | Boxes, points, or SVG (--skill point|segment) | MOONDREAM_API_KEY |
detect_moondream_3_preview | Same skills, preview checkpoint | MOONDREAM_API_KEY |
detect_moondream_3_1_local | Photon 3.1 detect | pip install moondream |
generate_cosmos3_nano_t2i | Certified NIM text2image | local NIM |
video_generate_cosmos3_nano_v2v | Certified NIM video2video | local NIM |
robot_act_cosmos3_nano_droid | Nano-DROID policy actions | local 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 tool | Backend | Needs |
|---|---|---|
vton_google_vton | Vertex virtual-try-on-001 | GOOGLE_CLOUD_PROJECT + ADC |
OutfitAnyone-Plus (DashScope, Beijing)
Dedicated Alibaba try-on. Not Qwen-Image composition. Needs a China Beijing-region DASHSCOPE_API_KEY.
| MCP tool | Backend | Needs |
|---|---|---|
vton_outfitanyone_plus | aitryon-plus | Beijing 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 tool | Backend | Needs |
|---|---|---|
vton_photoroom_vton | Shopper try-on (virtualModel.model.custom) | PHOTOROOM_API_KEY |
vton_photoroom_virtual_model | Catalog 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 tool | Backend | Needs |
|---|---|---|
generate_muse_image | Muse Image T2I (muse-image-1.0) | MODEL_API_KEY |
edit_muse_image | Muse Image I2I / multi-ref | MODEL_API_KEY |
vton_muse_image | Person + garment composition | MODEL_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 tool | Backend | Needs |
|---|---|---|
generate_p_image_ideogram | Pruna 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 tool | Backend | Needs |
|---|---|---|
tts_eleven_v4 | ElevenLabs Eleven v4 (most expressive; 90+ languages, 10K char limit) | ELEVENLABS_API_KEY |
tts_eleven_v4_turbo | ElevenLabs Eleven v4 Turbo (~100ms latency; audio tags for delivery control) | ELEVENLABS_API_KEY |
tts_gemini_3_8_flash_tts | Gemini 3.8 Flash TTS (30 voices, 130+ languages, two-speaker dialogue) | GEMINI_API_KEY |
tts_gemini_3_8_flash_lite_tts | Gemini 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 tool | Backend | Needs |
|---|---|---|
decide_jev | Typesafe AI Jev (text/JSON only) | TYPESAFE_API_KEY |
decide_pplx_decider | Perplexity Decider v1.2 / Flash (text + images, web grounding) | PERPLEXITY_API_KEY |
decide_pplx_decider_local | Perplexity Decider on your SGLang server | local server |
decide_clef | Cloudflare Clef / Clef-flash on Workers AI (text + images) | CLOUDFLARE_API_TOKEN / CLOUDFLARE_ACCOUNT_ID |
decide_clef_local | Cloudflare Clef on your SGLang server | local server |
decide_kev_openrouter | Jared Palmer's Kev 4B via OpenRouter (text) | OPENROUTER_API_KEY |
decide_kev_local | Kev on your kev.serve server (text) | local server |
decide_autotrust_jev_local | AutoTrust JEV on your vLLM /v1/decide server (text + images) | local server |
decide_d1_3b | Liquid AI d1-3B (text/JSON + images) | local/GPU |
decide_d1_omni_600m | Liquid AI d1-omni-600M (text/JSON + images or speech) | local/GPU |
decide_videojev_4b | VideoJev 4B (local video grounding / MCQ) | local/GPU |
decide_videojev_35b_a3b | VideoJev 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 tool | Backend | Needs |
|---|---|---|
generate_recraft_v3 | Recraft V3 text-to-image | RECRAFT_API_TOKEN |
edit_recraft_v3 | Recraft V3 image-to-image | RECRAFT_API_TOKEN |
bg_remove_recraft_v3 | Recraft V3 background remove | RECRAFT_API_TOKEN |
Measure tools (Clad body sizing)
| MCP tool | Backend | Needs |
|---|---|---|
measure_clad_body_photo | Photo + height → ISO 8559-1 measurements | CLAD_API_KEY |
measure_clad_body_questionnaire | Eight-question body model | CLAD_API_KEY |
measure_clad_body_local | Measure Anny/MHR params JSON | local / clad-body |
See Clad body API.
v0.0.9 tools (understand, video, decide, robot-act, parse, embed)
| MCP tool | Backend | Needs |
|---|---|---|
understand_gemini_4_argon / understand_gemini_4_argon_cyber_permissive | Gemini 4 Argon (reasoning, agentic video, long decode) | GEMINI_API_KEY |
understand_mercury_3 | Inception Mercury 3 (text-only diffusion LLM) | INCEPTION_API_KEY |
understand_flint_local / understand_flint_openrouter | Recursive Flint (text-only coding agent) | local server / OPENROUTER_API_KEY |
understand_sage_a1_5_local | Sage-A1.5 (text-only agent) | local server |
understand_ripple_65b_openrouter / understand_ripple_65b_local | Ricursive Ripple-65B Preview (text-only coding LLM) | OPENROUTER_API_KEY / local server |
video_generate_flux3_max | FLUX 3 Max | BFL_API_KEY |
video_generate_kling_v4 | Kling 4.0 | KLING_AI_API_KEY / KLING_AI_SECRET_KEY |
decide_d3_turbo … decide_d3_edge (+ _local) | vLLM Semantic Router Decision 3.0 | DECISION_API_KEY / local/GPU |
decide_mercury_decide | Inception Mercury Decide (text + images) | INCEPTION_API_KEY |
robot_act_dream_1 / robot_act_dream_1_flash | Dream Labs World Action Model | DREAM_API_KEY |
robot_act_cosmos3_nano_droid | Cosmos 3 Nano-DROID policy (certified NIM) | local NIM |
parse_nemotron_parse / parse_nemotron_parse_local | NVIDIA Nemotron Parse (document OCR) | NVIDIA_API_KEY / local NIM |
parse_lightonocr_3_local / parse_lightonocr_3_vllm | LightOnOCR-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_local | NVIDIA 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 tool | Backend | Needs |
|---|---|---|
generate_flux3_image_klein / edit_flux3_image_klein | FLUX 3 Image Klein (distilled, BFL) | BFL_API_KEY |
generate_flux3_image_klein_local / edit_flux3_image_klein_local | FLUX 3 Image Klein (local Diffusers) | local/GPU |
video_generate_flux3_video | FLUX 3 Video (text, keyframes, video-to-video) | BFL_API_KEY |
generate_sana_sprint | SANA-Sprint (1–4 step text-to-image) | local/GPU |
audio_to_video_nvidia_lipsync | NVIDIA Maxine LipSync NIM (self-hosted gRPC) | LIPSYNC_GRPC_TARGET |
generate_3d_trellis | Microsoft TRELLIS (image or text → GLB/STL) | NVIDIA_API_KEY |
Classify tools (safety gating)
| MCP tool | Backend | Needs |
|---|---|---|
classify_tryon_safety_classifier | Genlook 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 tool | Backend | Needs |
|---|---|---|
embed_gemini_embedding_2 | Google Gemini Embedding 2 (3072-d Matryoshka; text/image/audio/video/PDF) | GEMINI_API_KEY |
embed_embeddinggemma_2 | Google EmbeddingGemma 2 (768-d; text/code/image/video/audio) | local/GPU |
embed_pplx_embed_v2_late_0_6b | Perplexity pplx-embed-v2-late 0.6B (multi-vector, MaxSim) | local/GPU |
embed_pplx_embed_v2_late_9b | Perplexity pplx-embed-v2-late 9B (multi-vector, MaxSim) | local/GPU |
embed_marqo_fashionsiglip | Marqo-FashionSigLIP (fashion image + text retrieval) | local/GPU |
embed_moda_fashion_distilled | MODA fashion-distilled (image-to-image) | local/GPU |
embed_moda_pro_lite | MODA Pro Lite (fashion text-to-image) | local/GPU |
embed_zooclaw_fashionsiglip2 | ZooClaw-FashionSigLIP2 | local/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.
Related
- TryOn Studio — Next.js MCP client (Agent, Connect, capability screens)
mcp-server/README.md— architecture notes and full generated tool table- Planner Agent
- Unified CLI
- Configuration
- Adding a new model
- Qwen3.8-Max understanding
- Hy4 preview TokenHub
- Hy4 local vLLM/SGLang
- Qwen-Image generate / edit / VTON
- Qwen-Image local model
- ElevenLabs Eleven v4 / v4 Turbo (text-to-speech)
- Qwen3.8 local model
- MiniMax H3 API
- MiniMax H3 Max (Fal)
- MiniMax H3 local
- Muse Image
- P-Image-Ideogram