MCP Server
The XainFlow MCP server lets AI assistants interact with your workspace using natural language. Generate images, build workflows, manage assets, and more — directly from Claude.ai, Claude Code, Claude Desktop, Cursor, or any MCP-compatible client.
What is MCP?
The Model Context Protocol (MCP) is an open standard that connects AI assistants to external tools. When you connect XainFlow as an MCP server, your AI assistant gains access to 31 tools that cover your entire creative workflow.
Prerequisites
- A XainFlow workspace (Pro plan or above)
- An API key with appropriate scopes — see API Access
- An MCP-compatible client (Claude.ai, Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, etc.)
Generate an API Key
- Go to Workspace Settings > API Keys in XainFlow.
- Click Create API Key.
- Select scopes:
read,write,generate. - Copy the key (starts with
xf_live_).
After creating an API key, XainFlow shows pre-configured setup snippets with your key already filled in. Just copy and paste into your client.
Setup by Client
Claude.ai (Web and Mobile)
You can add XainFlow directly to Claude.ai as a connector. This works on Pro, Max, Team, and Enterprise plans.
- Open Claude.ai and click your profile icon in the bottom-left corner.
- Go to Settings > Connectors.
- Scroll down and click Add custom connector.
- Enter the XainFlow MCP server URL:
https://api.xainflow.com/functions/v1/mcp - Click Add to save the connector.
Once added, enable XainFlow in any conversation:
- Click the + button at the bottom-left of the chat input.
- Select Connectors.
- Toggle XainFlow on.
Now you can ask Claude to generate images, manage assets, build workflows, and more — right from the chat.
Claude.ai connectors use OAuth for authentication. You'll be prompted to authorize XainFlow the first time you enable the connector. No API key is needed for this method.
For more details on connectors, see Anthropic's guide: Getting started with custom connectors using remote MCP.
Claude Code
claude mcp add xainflow -t http \
--header "X-API-Key:xf_live_YOUR_KEY_HERE" \
https://api.xainflow.com/functions/v1/mcp
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"xainflow": {
"url": "https://api.xainflow.com/functions/v1/mcp",
"headers": {
"X-API-Key": "xf_live_YOUR_KEY_HERE"
}
}
}
}
Cursor
Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"xainflow": {
"url": "https://api.xainflow.com/functions/v1/mcp",
"headers": {
"X-API-Key": "xf_live_YOUR_KEY_HERE"
}
}
}
}
Windsurf / VS Code
Add to .vscode/mcp.json in your project:
{
"mcpServers": {
"xainflow": {
"url": "https://api.xainflow.com/functions/v1/mcp",
"headers": {
"X-API-Key": "xf_live_YOUR_KEY_HERE"
}
}
}
}
Available Tools
The MCP server exposes 31 tools organized into six categories. Credit costs are the same as in the web UI.
Workspace and Assets
| Tool | Description |
|---|---|
xainflow_get_workspace | Get workspace info, plan, storage, and credits |
xainflow_get_credits | Check your credit balance breakdown |
xainflow_list_projects | List or get projects with optional folders |
xainflow_list_assets | Browse assets with filters and pagination |
xainflow_list_styles | List available generation styles |
xainflow_list_variables | List prompt variables for dynamic content |
xainflow_create_project | Create a new project |
xainflow_manage_folders | Create, rename, move, or delete folders |
xainflow_manage_assets | Move, rename, or delete assets (bulk) |
xainflow_upload_image | Upload images (permanent or temporary) |
Image Generation
| Tool | Description |
|---|---|
xainflow_generate_image | Generate images with 7 AI models |
Video Generation
| Tool | Description |
|---|---|
xainflow_generate_video | Generate videos with 7 AI models (async) |
xainflow_get_video_status | Poll video generation status until complete |
Workflow Management
| Tool | Description |
|---|---|
xainflow_list_workflows | List workflows with pagination |
xainflow_get_workflow | Get workflow detail with node and edge data |
xainflow_list_templates | Browse workflow templates |
xainflow_list_workflow_runs | List execution runs for a workflow |
xainflow_get_workflow_run | Get run status and outputs |
xainflow_create_workflow | Create a new workflow with nodes and edges |
xainflow_update_workflow | Update workflow name, state, or folder |
xainflow_delete_workflow | Delete a workflow |
xainflow_create_from_template | Clone a template into a new workflow |
xainflow_execute_workflow | Execute a workflow server-side |
AI Suite Tools
| Tool | Description |
|---|---|
xainflow_remove_background | Remove image background (2 credits) |
xainflow_upscale | Upscale image resolution (2-4 credits) |
xainflow_vectorize | Convert image to SVG vector (1 credit) |
xainflow_image_expand | Expand image canvas with AI fill (5 credits) |
xainflow_multi_angle | Generate multi-angle product views (5 credits) |
Skills
| Tool | Description |
|---|---|
xainflow_list_skills | List available skills |
xainflow_get_skill | Get full skill instructions |
xainflow_create_skill | Create or update a custom skill |
Usage Examples
Check your workspace
You: "What's my XainFlow workspace looking like?"
The AI assistant calls
xainflow_get_workspaceand reports your plan, credit balance, project count, and storage usage.
Generate images
You: "Generate 4 product photos of running shoes using the minimalist style"
The assistant finds the style, checks your credits, generates the images, and confirms the cost.
Build and run a workflow
You: "Create a workflow that generates product photos from a text prompt, then removes the background"
The assistant creates a workflow with Prompt Generator, Image Generator, and Remove Background nodes, then offers to execute it.
Use a template
You: "Show me workflow templates and use the best one for product photos"
The assistant lists templates, clones one, and executes it.
Troubleshooting
No tools showing up
- Verify the URL is
https://api.xainflow.com/functions/v1/mcp(no trailing slash). - Ensure the
X-API-Keyheader is set correctly (not needed for Claude.ai — it uses OAuth). - For Claude Code, run
claude mcp listto verify configuration.
UNAUTHORIZED errors
- Verify your key starts with
xf_live_. - Check the key hasn't been revoked in Workspace Settings.
Generation takes too long
- Image generation typically takes 5-30 seconds depending on the model.
z-imageis the fastest model (2-5 seconds).gemini-proat 4K can take up to 60 seconds.
Related Pages
- API Access -- create and manage API keys
- Skills -- reusable instruction sets for AI agents
- Credits System -- understand credit costs