petalframework/petal-components-mcp — explained in plain English
Analysis updated 2026-05-18
Let Claude Code, Cursor, or Windsurf look up real petal_components schemas before writing Phoenix LiveView UI code.
Browse a catalogue of every available petal_components component with a one-line summary.
Fetch the full attribute, slot, and default value spec for a specific component with a usage example.
Host a self-updating component schema server that stays in sync with the latest petal_components release.
| petalframework/petal-components-mcp | 0xradioac7iv/tempfs | abboskhonov/hermium | |
|---|---|---|---|
| Stars | 0 | 0 | 0 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | easy | moderate | moderate |
| Complexity | 2/5 | 3/5 | 4/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
The hosted server works with a single CLI command, running locally requires Node.js and Elixir/Mix for schema extraction.
petal-components-mcp is a server that helps AI coding assistants write correct code when building user interfaces with a component library called petal_components. The petal_components library is a set of pre-built UI components for Phoenix LiveView, which is a web framework for the Elixir programming language. Without this server, AI assistants writing Phoenix templates tend to invent their own styling from scratch and ignore the petal_components building blocks entirely, producing inconsistent output. With the server connected, the AI can look up exactly what each component accepts, its required and optional settings, and see a usage example before writing any code. The server follows the Model Context Protocol, a standard plug-in format that lets AI coding tools like Claude Code, Cursor, and Windsurf call out to external knowledge sources. It exposes two tools: list_components returns a catalogue of all available petal_components with a one-line description of each, and get_component returns the full specification for a single component, including all its accepted attributes, slots, named regions for child content, default values, and a working code example. The server is written in TypeScript and works by bundling a JSON snapshot of the entire petal_components library. That snapshot is generated automatically by a script that inspects the library's own component registry, so the schemas stay in sync with whatever version of petal_components is current. The hosted version runs at mcp.petal.build and can be added to Claude Code with a single command. Running it locally is also supported for development purposes, with the same extraction script pulling the latest petal_components release from Hex so nothing needs to be copied over by hand. Two more tools, a natural language search and a way to generate composed UI patterns from multiple components, are planned for a future release.
An MCP server that gives AI coding assistants full schemas for the petal_components UI library, so they write idiomatic Phoenix LiveView markup instead of inventing raw styling.
Mainly TypeScript. The stack also includes TypeScript, MCP, Phoenix LiveView.
MIT license: free to use, modify, and distribute, including commercially, as long as the copyright notice is kept.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.