Connect XinYu AI via MCP
Bring XinYu AI's image, video, audio, and text generation into Claude, Cursor, Windsurf, Cline, or any MCP-capable agent. Let your agent generate content directly — on your own account and balance.
Overview
MCP (Model Context Protocol) is the standard for AI agents to call external tools. The XinYu AI MCP server wraps the platform's generation API into a set of typed tools, so your agent can call them with zero custom commands to learn.
Same pricing and ledger as the web app — spends your own Xins.
User-level API key, revocable anytime, never exposes provider keys.
Image, video, audio, text, editing, and job queries — all included.
Get an API Key
Log in to XinYu AI
Open Settings → API Keys
Create & copy the key
Install
No manual install needed — the client config below runs it via npx, which fetches the latest version automatically. To install it explicitly:
# No install needed — the client config below runs it via npx.
# To install the command explicitly:
npm install -g @xinyuai/mcp-server
# → exposes the "xinyu-mcp" commandJust continue to the next step and paste the JSON below into your client config.
Configure Your Client
Add the config below to your client's MCP settings, replacing the path and API key.
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"xinyu": {
"command": "npx",
"args": ["-y", "@xinyuai/mcp-server"],
"env": {
"XINYU_API_KEY": "xys_live_xxxxxxxxxxxxxxxx",
"XINYU_BASE_URL": "https://xinyuai.app"
}
}
}
}Cursor / Windsurf / Cline
Same shape (e.g. Cursor's .cursor/mcp.json):
{
"mcpServers": {
"xinyu": {
"command": "npx",
"args": ["-y", "@xinyuai/mcp-server"],
"env": { "XINYU_API_KEY": "xys_live_xxxx" }
}
}
}Available Tools
xinyu_generate_imageText-to-image / image-to-imagexinyu_generate_videoText-to-video (Kling / Seedance / WAN / Grok / LTX)xinyu_generate_audioText-to-speech (ElevenLabs)xinyu_generate_textText LLM (Gemini / ChatGPT / DeepSeek)xinyu_enhanceImage upscale (Topaz)xinyu_remove_bgRemove backgroundxinyu_outpaintOutpaint / expand imagexinyu_image_editPrompt-based image editxinyu_video_editVideo-to-video edit (Kling O3)xinyu_video_actionVideo upscale / extendxinyu_get_jobGet one job's statusxinyu_list_jobsList recent jobsxinyu_balanceGet Xins balancexinyu_list_modelsList available modelsxinyu_list_projectsList my projects (canvases) to get a project_idxinyu_create_projectCreate a new empty canvas, returns project_idGeneration tools poll until the job finishes and return the asset URL(s) by default (pass wait: false to get the jobId immediately, then poll with xinyu_get_job). Video is slow — raise wait_timeout_s.
Start Using
Once configured, just talk to your agent in natural language, e.g.:
💬 "Use nano-banana-2 to generate a cyberpunk city, 2K, 16:9."
💬 "Make a 5-second ocean-wave video with Seedance 2.0."
💬 "Check how many Xins I have left."
The agent automatically picks xinyu_generate_image / xinyu_generate_video / xinyu_balance, waits for completion, and returns the result URL.