Render and interact with SwiftUI previews outside of Xcode. CLI and MCP server for AI-driven UI development.
{
"mcpServers": {
"previewsmcp": {
"command": "<see-readme>",
"args": []
}
}
}No install config available. Check the server's README for setup instructions.
Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Render and interact with SwiftUI previews outside of Xcode. CLI and MCP server for AI-driven UI development.
Is it safe?
No package registry to scan.
No authentication — any process on your machine can connect.
MIT. View license →
Is it maintained?
Last commit 1 days ago. 3 stars.
Will it work with my client?
Transport: stdio. Works with Claude Desktop, Cursor, Claude Code, and most MCP clients.
A standalone SwiftUI preview host for humans and AI agents.
Run, snapshot, and interact with #Preview blocks from the command line or over MCP — no Xcode process required.
git clone https://github.com/obj-p/PreviewsMCP.git
cd PreviewsMCP
swift run previewsmcp examples/spm/Sources/ToDo/ToDoView.swift
A live macOS preview window opens. Edit the source file and the window hot-reloads.
PreviewsMCP compiles your #Preview closure into a dylib and loads it into a real app process (macOS NSApplication or iOS simulator UIApplication) with hot-reload — driven entirely from the command line or over MCP. No Xcode process required.
That makes it a standalone, extensible preview workflow:
@State preserved across literal edits.xcodeproj / .xcworkspace), and BazelXcode previews run your code inside Apple's preview agent — a real app process, but an opaque one. You can't hook into its lifecycle, run your own initialization, or extend it. FirebaseApp.configure(), custom font registration, auth setup, and DI containers have nowhere to run. The ecosystem answer is "mock everything," and at scale teams maintain micro apps — standalone app targets that render a single feature with controlled dependencies. Airbnb's dev apps drive over 50% of local iOS builds. Point-Free's isowords has 9 preview apps. Every team pays the maintenance tax: separate targets, schemes, and mock setups that drift.
Because PreviewsMCP hosts your preview in its own app process, you can extend that process. The setup plugin provides the hook: a PreviewSetup protocol where setUp() runs once per session (SDK init, auth, font registration, DI container) and wrap() surrounds every preview render (themes, environment values). It's the micro app's dependency layer extracted into a reusable framework — without maintaining a separate app target.
brew tap obj-p/tap
brew install previewsmcp
git clone https://github.com/obj-p/PreviewsMCP.git
cd PreviewsMCP
swift build -c release
The binary is at .build/release/previewsmcp.
@State where it can.colorScheme, dynamicTypeSize, locale, layoutDirection, legibilityWeight) in a single call, with presets for light/dark, xSmall–accessibility5, rtl, ltr, and boldText.#Preview macros and legacy PreviewProvider, with mid-session switching.setUp(), per-render theme/environment wrapping via wrap(). See the full integration guide.No automated test available for this server. Check the GitHub README for setup instructions.
This server is missing a description. Tools and install config are also missing.If you've used it, help the community.
Add informationNo known vulnerabilities.
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
An open-source AI agent that brings the power of Gemini directly into your terminal.
XcodeBuildMCP provides tools for Xcode project management, simulator management, and app utilities.
DataForSEO API modelcontextprotocol server
MCP Security Weekly
Get CVE alerts and security updates for PreviewsMCP and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.