TechBuzzPro

ComfyUI with Codex MCP and Computer Use: Setup Guide

· 6 min read · Windows & PC

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To use ComfyUI with Codex MCP and computer use, you run ComfyUI locally, connect it to an MCP client that supports the Codex MCP server, and enable the client's computer-use feature so the model can click and type in the ComfyUI browser window. The exact menus vary by client and version, so treat the steps below as a map, not a script. This setup lets a model read the ComfyUI interface, load workflows, queue prompts, and adjust settings through simulated mouse and keyboard input rather than through ComfyUI's API. It is slower and less reliable than API calls, but it works when you want the model to operate the same UI you see.

What You'll Need

  • A computer that can run ComfyUI locally, with a supported GPU and enough VRAM for the models you plan to use.
  • ComfyUI installed and launching correctly in your browser at its local address (usually 127.0.0.1:8188).
  • An MCP-capable client that supports both the Codex MCP server and a computer-use or screen-control tool. Examples include desktop AI clients that expose MCP server settings and a computer-use toggle; the labels differ by app.
  • The Codex MCP server installed and configured in that client. The client's own documentation will name the exact configuration file or settings screen.
  • A computer-use tool enabled in the client, with screen-recording and accessibility permissions granted on your OS.
  • A stable internet connection for the model, and a local network that allows the client to reach ComfyUI.

Step-by-Step

  1. Install and verify ComfyUI. Follow the official ComfyUI installation instructions for your OS. Launch it and confirm the web interface loads in your browser. Load a simple default workflow and queue one prompt to make sure generation works before adding automation. If ComfyUI fails here, fix it first; computer use cannot repair a broken install.
  2. Keep ComfyUI in a predictable window. Open ComfyUI in a dedicated browser window, maximize it, and avoid moving or resizing it during the session. Computer-use tools locate buttons by screen position and visual appearance, so a stable layout reduces misclicks. Close unrelated tabs and notifications that could overlap the canvas.
  3. Install the Codex MCP server. Use the official installation method described by the Codex MCP project. Typically this means installing a package or binary and noting the command that starts the server. Do not use unofficial forks or modified builds.
  4. Add the server to your MCP client. Open your client's MCP or tool settings and add a new server entry. Provide the command and any arguments the Codex MCP documentation specifies. Save and restart the client if it asks you to. Confirm the server shows as connected; if it does not, check the client's logs for the exact error.
  5. Enable computer use. In the same client, find the computer-use or screen-control setting and turn it on. Grant the operating system permissions it requests, such as screen recording on macOS or accessibility control on Windows. Without these permissions the model can see the screen but cannot click or type.
  6. Point the model at ComfyUI. Start a new session and tell the model that ComfyUI is open in the browser window and that it should operate the interface directly. Describe the workflow you want in plain language, for example which checkpoint to load and what prompt to queue. Ask it to confirm each major action before moving on.
  7. Supervise the first run. Watch the screen while the model works. Computer use can misread buttons, especially on dark themes or scaled displays. If it clicks the wrong control, stop the session, reset the ComfyUI view, and start again with a narrower instruction.
  8. Save a working workflow. Once a run succeeds, save the workflow in ComfyUI so future sessions can load it by name instead of rebuilding it through clicks. This dramatically reduces the number of computer-use actions needed.

Common Mistakes

  • Running computer use before ComfyUI is confirmed working manually. Automation multiplies existing problems.
  • Leaving the browser zoom or OS display scaling at a non-default value, which shifts where the model expects buttons to be.
  • Forgetting to grant screen-recording or accessibility permissions, then assuming the MCP server is broken.
  • Giving long, multi-part instructions in one go. The model loses track and clicks through menus in the wrong order.
  • Using a client that supports MCP but not computer use, or vice versa. Both capabilities must be present in the same client.
  • Expecting API-level speed and reliability. Computer use is visual and sequential; it is slower by design.

Tips

  • Use a light theme in ComfyUI if the model struggles to distinguish dark buttons.
  • Keep the ComfyUI window at 100% zoom and a standard resolution such as 1920x1080.
  • Ask the model to describe what it sees before acting; this surfaces misreads early.
  • Break tasks into single actions: load checkpoint, then set prompt, then queue. Confirm each.
  • Save frequently used workflows with clear names so the model can load them from the sidebar.
  • If your client supports it, restrict computer use to the ComfyUI window only to avoid stray clicks elsewhere.

Troubleshooting

If the model cannot see the screen, recheck OS permissions and restart the client. If it sees the screen but clicks land in the wrong place, reset browser zoom and display scaling, then restart the session. If the Codex MCP server will not connect, verify the command path and arguments in the client's server settings and check the client log for the exact failure. If ComfyUI stops responding during a run, queue nothing new, let the current job finish or cancel it from the ComfyUI queue panel, then reload the page. If generations fail after a model-driven change, reload your saved workflow to return to a known-good state. If the client crashes mid-session, close ComfyUI's browser tab, reopen it, and start a fresh session rather than resuming a half-finished sequence.

Frequently Asked Questions

Do I need both Codex MCP and computer use?

Yes, for this workflow. Codex MCP provides the model connection; computer use provides the ability to click and type in ComfyUI. A client with only one of the two cannot complete the loop.

Can I use this with ComfyUI running on another machine?

Only if the computer-use tool can see that machine's screen, for example through a remote desktop window. Computer use operates on visible pixels, so an off-screen ComfyUI instance cannot be controlled.

Is computer use as reliable as ComfyUI's API?

No. The API is deterministic and fast; computer use depends on visual recognition and is slower and more error-prone. Use it when you specifically want UI-level control.

Why does the model keep clicking the wrong button?

Usually display scaling, browser zoom, or a theme with low contrast. Reset zoom to 100%, use a standard resolution, and try a light theme.

Does this work on mobile?

No. ComfyUI and computer-use clients are desktop tools. Mobile browsers cannot run the local ComfyUI server or grant the required screen-control permissions.

What should I do if the MCP server disconnects mid-run?

Stop the session, reconnect the server in the client's MCP settings, reload ComfyUI, and restart with a saved workflow so you do not repeat earlier steps.