# Prefire MCP server

> Renders SwiftUI #Preview blocks as PNG images and snapshot tests so AI agents can see the views they change.

- Repository: https://github.com/BarredEwe/Prefire
- Page: https://hostedmcp.org/servers/barredewe/prefire
- Transport: stdio
- Stars: 535
- License: Apache-2.0
- Latest version: 6.6.1

## FAQ

### How do I add Prefire's MCP server to Claude Code?

Run `claude mcp add prefire -- prefire mcp` in the folder containing your .prefire.yml, after installing Prefire with Homebrew.

### What does the Prefire MCP server let an agent do?

The agent can list previews, render them to PNG images on a chosen device and color scheme, and build an HTML board of the results.

### Can Prefire render previews without Xcode running?

Yes, Prefire renders previews in its snapshot tests without a running Xcode, and it works in CI.

### How do I render a SwiftUI preview to PNG from the command line?

Use `prefire render` with an optional device and color scheme, which outputs PNG images plus JSON.

### Do I need an API key to use Prefire?

No, it is a local command-line tool installed via Homebrew or SPM and requires no authentication.
