Prefire
MCP server by BarredEwe Community
Renders SwiftUI #Preview blocks as PNG images so an AI agent can see the views it changes. Built for iOS developers who use Claude Code, Cursor, Codex or VS Code.
About
Prefire renders the SwiftUI #Preview blocks in a Swift project as PNG images and exposes them through an MCP server. An agent can call list_previews, render_previews and build_board to see the views it has changed. Renders target the devices, color scheme and Dynamic Type the user asks for, and a render command can also output PNG and JSON files.
The same previews also become snapshot tests, a Playbook catalog of components and user stories, and flow views. Prefire runs as a Swift Package Manager plugin, an Xcode build tool plugin, or a CLI installed with Homebrew. It suits iOS developers who want their previews checked in CI and reviewed by AI agents.
Written from the project's README and checked against it.
Tools it gives your assistant
list_previewsLists the SwiftUI previews the agent can render.render_previewsRenders selected previews to PNG images for the agent to view.build_boardBuilds an HTML board of the last render, grouped by user story.
What you need
- Swift 6.0 or higher
- Xcode 16.0 or higher
- iOS 14 or higher, or macOS 13 or higher
- Homebrew for the CLI install
Try asking
- Render the SwiftUI previews I changed in this project
- Show the Sign in preview in dark mode on iPhone 16 Pro
- Build a board of the last render grouped by user story
Good to know
- macOS support covers snapshot tests only.
- The Mint install method is in Beta.
- NavigationView in a preview does not work in Playbook.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to Prefire
All alternatives →Turns GitHub repositories into architecture diagrams, written explanations, Mermaid source and narrated explainer videos. Built for developers who want to understand a codebase, and for AI agents that need to read one.
Mocks, records, and chaos-tests HTTP(S) dependencies for development and testing. One port serves many protocols, including gRPC, WebSockets, and LLM chat APIs. Built for developers and testers who need stand-in services during tests.
Provides MCP server and CLI tools that let AI coding agents build, test and manage iOS and macOS projects with Xcode and simulators. It is aimed at developers working on Apple platform apps.
Creates editable draw.io diagrams in AI chat from Mermaid, PlantUML, CSV or draw.io XML. Built for people who want diagrams from text prompts that stay editable in draw.io.
Indexes your code, git history, tests and decisions on your machine so AI coding agents can query the index instead of re-reading files. Built for developers who want fewer files opened and clearer answers about change risk and code health.
Gives your AI assistant hosted codebase intelligence for repos indexed on repowise.dev. Use it to ask how code works, what a change may break, and which tests to run.
Compare with GitDiagram, mockserver or XcodeBuildMCP
Prefire: common questions
Why use Prefire instead of Xcode's RenderPreview?
The source says Prefire needs no running Xcode, renders many previews in one build, and works in CI. It also renders on the devices, color scheme and Dynamic Type you choose.
Do I need to write test code to use Prefire?
No. The source says Prefire turns existing #Preview blocks into snapshot tests without you writing test code.
Which view types does Prefire support?
The source lists support for UIView and UIViewController, and NSView and NSViewController, alongside SwiftUI previews.
Is Prefire the official server?
Prefire is a community project by BarredEwe, not verified by a company domain.
Is Prefire free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is Prefire safe to use?
It scores 85 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to Prefire?
Similar MCP servers: GitDiagram, mockserver, XcodeBuildMCP, draw.io.
Does Prefire work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
