Comfy MCP Server
A server using FastMCP framework to generate images based on prompts via a remote Comfy server.
Overview
Comfy MCP Server is a server application that utilizes the FastMCP framework to generate images based on user-defined prompts by interacting with a remote Comfy server.
To use Comfy MCP Server, set the required environment variables, install the necessary packages, and launch the server using the command uvx comfy-mcp-server.
- Generates images from prompts using a remote Comfy server. - Supports configuration through environment variables. - Allows for custom workflows exported from Comfy UI.
- Creating images for artistic projects based on textual descriptions.
- Automating image generation for design prototypes.
- Integrating with applications that require dynamic image generation.
Add to your AI client
Use these steps to connect Comfy MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"comfy-mcp-server-lalanikarim": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-comfy-mcp-server-lalanikarim"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"comfy-mcp-server-lalanikarim": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-comfy-mcp-server-lalanikarim"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"comfy-mcp-server-lalanikarim": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-comfy-mcp-server-lalanikarim"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"comfy-mcp-server-lalanikarim": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-comfy-mcp-server-lalanikarim"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"comfy-mcp-server-lalanikarim": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-comfy-mcp-server-lalanikarim"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"comfy-mcp-server-lalanikarim": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-comfy-mcp-server-lalanikarim"
]
}
}
}FAQ
What is required to run Comfy MCP Server?
You need the `uv` package and a workflow file exported from Comfy UI.
Can I customize the image generation process?
Yes! You can set various environment variables to customize the workflow and output.
Is there a specific format for the prompt?
The prompt can be any string that describes the desired image.