プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。レビューとアカウント機能は今後のステップで始まります。
PopNx MCPAIを使う人のための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の3つの柱

この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。

できること

このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。

  • 接続方法: パソコンで動く
  • トランスポート: stdio
  • カテゴリ: その他

インストール

使っているAIアプリを選んで、設定をコピーしてください。

インストールの前に

  • 基本チェック:1項目中1項目に合格
  • あなたのパソコンで、あなたのユーザーと同じ権限(ファイル、ネットワーク、アプリ)で動きます。
  • レジストリには、入力が必要なキーは載っていません。

どのアプリを使っていますか?

上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。

作者の .mcpb ファイルをダウンロード

リンク先は作者自身のファイルです。私たちが置いたり再パッケージしたりしたものではありません。ファイルを開くと、Claude Desktopがインストールします。

ターミナルでこれを実行します

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

これはパソコンで動くサーバーですが、ChatGPTがつなげるのはインターネット上のサーバーだけです。ほかのアプリを選んでください。

選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。

この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。

できること

パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。

基本チェックi

誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月6日にチェック

  • ✓ 合格

    作者とリポジトリが一致

    レジストリ名は、リポジトリを所有するGitHubアカウント BarredEwe で確認済みです

  • … 未チェック

    今もメンテナンスされている

    このリポジトリはまだGitHubから読み取っていません

  • … 未チェック

    ライセンスがある

    このリポジトリはまだGitHubから読み取っていません

  • – 対象外

    エンドポイントが応答する

    これはパソコンで動くため、インターネット上のエンドポイントはありません

  • – 対象外

    OAuthでサインイン

    パソコンで動き、代わりにローカルの設定を使います

  • … 未チェック

    ツールの説明に隠れた指示がない

    パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです

その他のほかのサーバーとの比較i

  • このカテゴリのほかの32476件のうち0%よりスターが多い
  • このカテゴリのほかの32476件のうち83%より最近レジストリに公開
  • 基本チェックの結果が、このカテゴリのほかの32476件のうち100%と同じかそれ以上

レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。

よくある質問

Prefireは安全ですか?

当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。

どんなキーやコードが必要ですか?

レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。

パソコンで動きますか、それともクラウドですか?

あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。

今もメンテナンスされていますか?

GitHubリポジトリの最終更新は–、最新バージョン(6.6.0)がレジストリに届いたのは7 日前です。

どのアプリで使えますか?

Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにMCPBも必要です。

代わりに使えるものは?

同じカテゴリには:Spec Driven Development, Remote Desktop Commander, zanadir

代わりの候補

同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。

カードの見方:★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i

Remote Desktop Commander

作者:desktop-commander

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

クラウドで動く★ 211昨日更新
インストール

zanadir

作者:MustacheCase

Find what a repository's CI is missing, and which security checks cannot fail the build.

パソコンで動く今日更新
インストール

作者の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に聞く