原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

Prefire

作者:BarredEwe版本 6.6.0i★ –i在你的电脑上运行
注册名称io.github.BarredEwe/prefire

安装

概览

作者提供的说明(英文原文)

Render SwiftUI #Preview as PNG images, so an AI agent sees the views it changes

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 其他

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 注册中心没有列出需要填写的密钥。

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

下载作者的 .mcpb 文件

链接指向作者自己的文件;我们不托管也不重新打包它。打开文件后,Claude Desktop 会进行安装。

在终端中运行这条命令

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月6日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 BarredEwe 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“其他”中的其他服务器比较i

  • 星标数多于此分类中其他 32466 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 32466 个服务器的 83% 更新
  • 基础检查结果等于或优于此分类中其他 32466 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

Prefire 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(6.6.0)于7天前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 MCPB。

有什么可以替代它?

同一分类中有:Spec Driven Development, Remote Desktop Commander, HotCodePush

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Spec Driven Development

作者:formulahendry

MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.

在你的电脑上运行★ 440MIT14个月前更新
安装

Remote Desktop Commander

作者:desktop-commander

Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.

在云端运行★ 211昨天更新
安装

HotCodePush

作者:hotcodepush-team

Manage over-the-air (OTA) updates for React Native, Expo, Capacitor and Cordova apps.

在云端运行今天更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

Quick Start · Installation · Usage · AI agents · Configuration · Docs · Website

🔥 What is Prefire?

Your previews are already tests. Prefire turns the #Preview blocks you write anyway into snapshot tests, a Playbook catalog and images your AI agent can see. You don't write a line of test code.

📸 Snapshot tests Every preview becomes a snapshot test on the devices you pick. A changed padding fails the build, not the release.

How it works →

📚 Playbook A catalog of every component and user story inside your app, with their states and render times.

See Playbook →

🤖 Renders for AI agents Claude Code, Cursor and Codex render your previews through an MCP server and see the UI they just changed.

Set up →

🤖 Using an AI agent? brew install barredewe/prefire/prefire, then claude mcp add prefire -- prefire mcp in your project. The agent renders SwiftUI previews on any iPhone or iPad, light or dark, without Xcode Previews. Setup →

🚀 Key Features

  • 🧠 Smart Preview Parsing — including #Preview, @Previewable
  • 📸 Snapshot Testing — automatic test generation from previews (iOS, tvOS, macOS)
  • 📚 Playbook View — auto-generated interactive component catalog (iOS)
  • 🏃 Flow-aware — build user stories from multiple preview steps
  • 🤖 AI-ready — render previews to PNG for agents with prefire render and an MCP server
  • 🧩 UIKit + AppKit Support — support for UIView/UIViewController and NSView/NSViewController
  • ⚙️ SPM + Xcode Plugins — works in CLI, Xcode build phases, or CI
  • 🧠 Fast Caching — fingerprint-based AST and body caching avoids redundant work
  • ✍️ Stencil Templates — customize output with your own templates
Why Prefire?
  • 🔥 No second set of UI states. Tests come from the previews you already keep up to date.
  • 🔥 Regressions fail CI. Snapshots are compared on every run, on every device you list.
  • 🔥 Designers and QA see every state. Playbook shows components and user stories on a device.
  • 🔥 Agents check their own UI work. They render the previews they changed before calling a task done.

⚡ Quick Start

📦 Example project available at: Prefire Example

1. Add Prefire to Your Project
// Package.swift

dependencies: [ .package(url: "https://github.com/BarredEwe/Prefire.git", from: "6.3.0"), .package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.18.0"), ], .testTarget( dependencies: [ .product(name: "Prefire", package: "Prefire"), .product(name: "SnapshotTesting", package: "swift-snapshot-testing"), ], plugins: [ .plugin(name: "PrefireTestsPlugin", package: "Prefire") ] )

2. Write #Preview
#Preview {

Button("Submit") }

3. Run tests

Just run the test target 🚀 — Prefire will auto-generate snapshots based on your previews.

💡 If your test target is empty, Prefire will still generate files and snapshot code during build.


📦 Installation

MethodHow
SPM PluginPrefireTestsPlugin / PrefirePlaybookPlugin in Package.swift
Xcode Build Tool PluginAdd PrefireTestsPlugin to the test target's build phases
CLIbrew install barredewe/prefire/prefire
Mint (*Beta*)mint install BarredEwe/Prefire
GitHub Actions / CIAny of the above, see Troubleshooting

Step-by-step setup is in the Installation guide.

Requirements
  • Swift 6.0 or higher
  • Xcode 16.0 or higher
  • iOS 14 or higher; macOS 13 or higher (macOS: snapshot tests only, see Configuration)

🛠 Usage

Choose previews

Prefire finds every `#Preview` automatically. For PreviewProvider, add the PrefireProvider protocol:

struct Text_Previews: PreviewProvider, PrefireProvider {

static var previews: some View { ... } }

Exclude a preview with .prefireIgnored():

#Preview {

Text("") .prefireIgnored() }

To opt in instead of opting out, set preview_default_enabled: false in .prefire.yml and mark the previews you want with .prefireEnabled():

#Preview {

Text("") .prefireEnabled() }

Snapshot tests

PrefireTestsPlugin generates the tests into the DerivedData folder when the test target builds. Run the test target as usual.

Tune the timing and precision of a single snapshot:

#Preview {

TestView() .snapshot(delay: 0.3, precision: 0.95, perceptualPrecision: 0.98) }

For previews that load or animate, wait instead of guessing a delay:

.snapshot(waitForIdle: true)                     // until nothing changes on screen

.snapshot(waitUntil: { viewModel.isLoaded }) // until a condition is true

How waiting works, its limits and how the modifiers combine: Snapshot timing and precision.

Snapshots are compared with swift-snapshot-testing.

Playbook (Demo) View

Show all previews as an interactive catalog with PlaybookView:

  • isComponent: true lists all the Views
  • isComponent: false groups them by UserStory
import Prefire 

struct ContentView: View { var body: some View { PlaybookView(isComponent: true, previewModels: PreviewModels.models) } }

To keep previews and PreviewModels out of release builds, see Excluding previews from release builds.

Flows

Connect previews into one Flow with .previewUserStory. Playbook shows them together, in order:

static var previews: some View {

PrefireView() .previewUserStory(.auth) }

static var previews: some View { AuthView() .previewUserStory(.auth) }

States

If a preview contains more than one View, mark the State of each:

static var previews: some View {

TestView("Default")

TestView("Loading") .previewState(.loading) }

Parameterized previews

Prefire expands each argument of a native SwiftUI parameterized preview into its own snapshot and Playbook preview:

#Preview("TextView", traits: .sizeThatFitsLayout, arguments: ["- A", "- B", "- C"]) { suffix in

Text("1 \(suffix)") }


🧰 API

FeatureModifier
Include in snapshot.prefireEnabled()
Exclude from snapshot.prefireIgnored()
Group in a flow.previewUserStory(.auth)
Mark a UI state.previewState(.error)
Customize snapshot.snapshot(delay: 0.3, precision: 0.95)
Wait until the preview settles.snapshot(waitForIdle: true, timeout: 2.0)
Wait for a condition.snapshot(waitUntil: { viewModel.isLoaded })
Parameterized preview#Preview(..., arguments: values)

💡 CLI Usage

# Generate snapshot tests

prefire tests

Generate playbook models

prefire playbook

Run prefire tests --help or prefire playbook --help for more options.


🤖 Let AI agents see SwiftUI

Prefire renders previews in its snapshot tests, built anew and on the devices you choose, so it can show them to an AI agent as images, which Xcode Previews can't do reliably outside Xcode.

# Render previews to PNG + JSON

prefire render "Sign in" --device "iPhone 16 Pro" --color-scheme dark

An HTML board of the last render, grouped by user story

prefire board

Add the MCP server to your agent, from the folder with .prefire.yml:

AgentInstall
Claude Codeclaude mcp add prefire -- prefire mcp, or the plugin with a skill: /plugin marketplace add BarredEwe/Prefire then /plugin install prefire@prefire
Cursor
Codexcodex mcp add prefire -- prefire mcp
VS Codecode --add-mcp '{"name":"prefire","command":"prefire","args":["mcp"]}'

An agent then calls list_previews, render_previews and build_board. Set the scheme to build in render_configuration of .prefire.yml; see the AI guide. Why not Xcode's own RenderPreview? Prefire needs no running Xcode, renders many previews in one build, on the devices, color scheme and Dynamic Type you ask for, and works in CI.


🗂 Configuration: .prefire.yml

test_configuration:

target: MyApp

playbook_configuration: preview_default_enabled: true

All options are in the Configuration guide. To change the generated code, see Templates.


🧠 How It Works

  1. 🔍 Parses all source files — finds #Preview and PreviewProvider blocks and the .prefireEnabled() / .prefireIgnored() modifiers
  2. 📂 Caches `Types` and `PreviewBodies` — keyed by file modification date + SHA-256 of inputs, so nothing is re-parsed if nothing changed
  3. 🔢 Generates snapshot tests — from Stencil templates, respecting .prefire.yml
  4. 📘 Generates Playbook models — groups by UserStory and State into PreviewModels.generated.swift

🩺

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx