Skip to main content
MCP server CX Codex

Prefire — Claude Code MCP server: render SwiftUI #Preview to PNG

Prefire — an MCP server that renders SwiftUI #Preview to PNG without Xcode Previews. AI agents see the UI they just changed.

Apache-2.0 ★ 535 updated 2026-10-27

Open on GitHub

What Prefire does

Prefire runs #Preview on any iPhone, iPad, light or dark theme and saves the result as PNG. The agent calls the render command, gets an image and checks the UI without Xcode Previews.

Inside: a CLI command prefire render builds the preview on the chosen device and returns the file path. Supports iOS, tvOS, macOS (the latter snapshot tests only). Requires Swift 6.0 and Xcode 16.0: the build fails without them.

Install with brew install barredewe/prefire/prefire, then claude mcp add prefire -- prefire mcp at the project root. The agent gets a render tool and uses it when changing SwiftUI code.

What it helps with

  • check SwiftUI changes visually without running Xcode Previews
  • render a preview on a specific device and theme for the agent
  • get a PNG of the UI from #Preview via MCP
  • show the agent the result of edits in SwiftUI components

Example prompts for the agent

  • render ContentView on iPhone 15 Pro in dark mode
  • show preview of LoginButton on iPad mini
  • save image of ProfileCard for light theme

How to install Prefire

Install

The MCP registry has no launch command for it: see the repository README

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Prefire

How to install Prefire in Claude Code?

Run brew install barredewe/prefire/prefire, then claude mcp add prefire -- prefire mcp at the project root. The server is added to the MCP config.

What does Prefire do?

Renders SwiftUI #Preview to PNG on a chosen device and theme. The agent gets the image and sees UI changes without running Xcode Previews.

What does Prefire require?

Swift 6.0, Xcode 16.0 and iOS 14 or higher (or macOS 13 for snapshot tests, or tvOS). Without these versions the render command will not start.

Similar MCP servers

All MCP servers for Frontend and UI →

Project sponsors

Companies that keep this analytics open