ComfyUI MCP server

Integrates ComfyUI's stable diffusion interface to enable programmatic image generation through customizable node-based workflows.
Back to servers
Provider
jonpojonpo
Release date
Dec 04, 2024
Language
Python
Stats
3 stars

This MCP server allows you to connect Claude to a local ComfyUI instance, providing functionality for storing and summarizing notes with access to ComfyUI's capabilities. The server implements a custom note storage system with straightforward tools for adding and summarizing notes.

Installation

Claude Desktop Configuration

To install and configure the comfy-ui-mcp-server with Claude Desktop, you'll need to modify your Claude Desktop configuration file:

On MacOS:

~/Library/Application\ Support/Claude/claude_desktop_config.json

On Windows:

%APPDATA%/Claude/claude_desktop_config.json

Configuration Options

Add the following to your configuration file:

For published server installation:

"mcpServers": {
  "comfy-ui-mcp-server": {
    "command": "uvx",
    "args": [
      "comfy-ui-mcp-server"
    ]
  }
}

For development/local installation:

"mcpServers": {
  "comfy-ui-mcp-server": {
    "command": "uv",
    "args": [
      "--directory",
      "E:\Claude\comfy-ui-mcp-server",
      "run",
      "comfy-ui-mcp-server"
    ]
  }
}

Using the Server

Notes System

The server implements a custom note storage system with:

  • Custom URI scheme: Access individual notes using the note:// URI scheme
  • Resource properties: Each note has a name, description, and text/plain mimetype

Available Tools

Adding Notes

You can add new notes to the server using the add-note tool:

  • Required arguments:
    • name: String identifier for the note
    • content: The text content of the note

The tool will update the server state and notify clients of resource changes.

Available Prompts

Summarizing Notes

The server provides a summarize-notes prompt that creates summaries of all stored notes:

  • Optional arguments:
    • style: Controls detail level (options: "brief" or "detailed")

This prompt combines all current notes with your style preference to generate a summary.

Debugging

For debugging purposes, you can use the MCP Inspector tool:

npx @modelcontextprotocol/inspector uv --directory E:\Claude\comfy-ui-mcp-server run comfy-ui-mcp-server

After launching, the Inspector will display a URL that you can access in your browser to begin debugging the server connections.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later