Phonebook logo

Phonebook

MCP-driven gallery builder for SwiftUI and Jetpack Compose previews, with setup checks, coverage analysis, generation, and static-site output.

Install Phonebook

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "phonebook": {
      "command": "npx",
      "args": [
        "-y",
        "@stag-build/phonebook"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

The install command installed and started the server, which then stopped for configuration (such as an API key) that our sandbox does not have — expected for servers that connect to your account.

npx -y @stag-build/phonebook

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked Today.

Overview

Phonebook MCP server turns existing SwiftUI #Preview and Jetpack Compose @Preview declarations into a browsable static gallery. Its MCP interface lets coding agents diagnose setup, inspect preview coverage, suggest missing previews, generate screenshots, and build the site. Use it when a mobile team needs a self-hosted component catalog without adding separate test cases or relying on a SaaS service.

Use cases

  • Create a browsable catalog of existing mobile UI previews
  • Analyze components missing previews or dark variants
  • Generate preview screenshots in CI without an Android emulator
  • Build a static gallery for designers to review
  • Ask a coding agent to diagnose preview setup

Key features

  • Harvests SwiftUI and Jetpack Compose previews
  • Groups previews into component and state cards
  • Provides MCP tools for setup, coverage, generation, and builds
  • Generates plain static HTML, CSS, and JavaScript
  • Supports Android JVM rendering and iOS simulator rendering
  • Resolves Android library setup against the project's Kotlin version

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

8/8 checks healthy over the last 47d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 11d ago via OSV.dev · @stag-build/phonebook (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars13Stargazers on the source repository.
npm downloads1.5kPackage downloads in the last 30 days.
Last commit4d agoMost recent push to the default branch.
Install checkRunsOur sandbox started it; it then asked for an API key or config.

How Phonebook works

What Phonebook does

Phonebook creates a Storybook-style gallery from previews already present in an Android or iOS codebase. It collects rendered preview images and metadata into a bundle containing manifest.json and an images/ directory, then converts that bundle into a static HTML site.

The gallery groups previews into component and state cards by interpreting preview names, so teams can review UI variations without adding special annotations. Designers can open the generated site without installing the application or its development toolchain. Each repository is processed independently, and one run targets one platform.

Phonebook is intended for teams that want a local or CI-generated visual catalog, preview coverage checks, and an agent-assisted way to fill gaps in their mobile UI previews.

How it works

The generate command delegates rendering to the platform-specific preview engine. Android uses Roborazzi and ComposablePreviewScanner on the JVM through Robolectric, so generation can run on Linux CI without an emulator. iOS uses SnapshotPreviews through xcodebuild test on a simulator, which requires macOS.

The build command consumes the generated bundle and creates a plain HTML, CSS, and JavaScript site. By default, index.html is placed in the bundle directory and reuses its existing images. Supplying an output directory creates a separate site directory, which can be useful for publishing or combining bundles later. The resulting site can be opened through file:// or served by a static host.

For Android, init detects the project's Kotlin version and resolves compatible setup instructions. doctor checks the configuration and can identify Kotlin and Roborazzi metadata mismatches before they appear as compiler failures.

Setup and configuration

Install the CLI globally with npm or Homebrew, or invoke it without installation through npx @stag-build/phonebook. The MCP process runs with npx -y @stag-build/phonebook mcp and uses standard input/output, allowing supported coding-agent clients to launch it locally.

Android projects use a phonebook.config.json file beside settings.gradle.kts. The configuration includes an application name, the android platform, the Gradle modules to process, and the build variant. Android setup also requires the Roborazzi, Robolectric, ComposablePreviewScanner, preview-scanner support, and Compose UI test dependencies described by the generated setup instructions.

An Android run can target a repository with -C /path/to/repository. The generated files are written under build/phonebook/, and the standard output site is available at phonebook-out/index.html. iOS projects use SnapshotPreviews and an XCTest target.

Tools and capabilities

The MCP interface exposes these operations:

  • check_setup diagnoses project setup in the same role as phonebook doctor.
  • analyze_coverage finds components without previews or dark-mode variants.
  • get_preview_guidance provides guidance for adding previews.
  • run_generate renders previews into a Phonebook bundle.
  • run_build creates the static gallery from that bundle.

Android generation also supports --changed and --files A.kt,B.kt. These modes limit rendering to previews declared in selected files and use a temporary Gradle init script under the build directory rather than modifying source files. If a project supplies its own preview tester class, that project setting takes precedence and the run renders every preview in the module.

Limitations and notes

A repository run is single-platform: an Android repository or an iOS repository produces one bundle and one site. Android generation runs without an emulator, while iOS generation needs macOS and a simulator.

Android Studio Gemini Agent Mode cannot connect to Phonebook's local stdio MCP process because its MCP integration currently accepts remote httpUrl servers. Claude Code, Codex CLI, Claude Desktop, Cursor, and Xcode agent configurations are documented for local use. Xcode agent support requires Xcode 26.3 or newer.

The generated output is static rather than an application-backed service. Publishing it elsewhere requires hosting the generated files or using the build command's separate output directory.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Phonebook

Phonebook is an MCP server that connects coding agents to a mobile preview gallery workflow. Its main tools check project setup, analyze preview coverage, provide preview guidance, generate Android or iOS preview bundles, and build the resulting static HTML gallery from SwiftUI or Jetpack Compose previews.

Run it without a separate installation using `npx -y @stag-build/phonebook mcp`, then add that command to your MCP client's configuration. The CLI can also be installed globally with npm or Homebrew when you want to run Phonebook commands directly.

Yes, Phonebook works with Cursor through a local MCP configuration. Add the `phonebook` server with `npx -y @stag-build/phonebook mcp` to the project `.cursor/mcp.json` or the global `~/.cursor/mcp.json` file.

Yes, Android generation runs on the JVM with Robolectric, Roborazzi, and ComposablePreviewScanner, so it does not require an emulator. Configure the Android module and variant, then run `generate` from the repository or ask a connected coding agent to run it.

Yes, Phonebook supports iOS previews through SnapshotPreviews and `xcodebuild test` on a simulator. The iOS workflow requires macOS, an XCTest target, and the SnapshotPreviews Swift Package dependency.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewPhonebook AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/phonebook?style=directory)](https://allmcps.com/mcp/phonebook)
HTML Embed
<a href="https://allmcps.com/mcp/phonebook"><img src="https://allmcps.com/api/badge/phonebook?style=directory" alt="Phonebook on AllMCPs" /></a>