Petal Components MCP logo

Petal Components MCP

Expose petal_components schemas and Phoenix setup guidance to AI coding assistants over MCP.

Install Petal Components MCP

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

Streamable HTTP (Remote)
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "petal-components-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "petal-components-mcp"
      ]
    }
  }
}

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

Hosted endpointLive · 4d agoLive Remote EndpointOur automated health check connected to this remote MCP endpoint successfully.Last checked 4d ago · Nov 26, 2026, 04:00 UTC

Clients with native remote MCP support can connect directly to this URL.

Remote endpoint
https://mcp.petal.build/mcp

Automated check passed— started and listed 2 tools correctly ().

Overview

petal-components-mcp connects AI coding assistants to petal_components, the shadcn-style component library for Phoenix LiveView. It serves installation guidance, a complete component catalog, and detailed schemas with attrs, slots, defaults, allowed values, and HEEx examples. The hosted MCP endpoint is available at https://mcp.petal.build/mcp over HTTP. Reach for it when an agent needs to install petal_components or generate HEEx using real component APIs instead of guessed Tailwind markup.

Use cases

  • Install petal_components in a Phoenix project
  • List available Phoenix LiveView components
  • Check attrs and slots before writing HEEx
  • Generate component markup from verified schemas

Key features

  • Phoenix project installation instructions
  • Complete petal_components catalog
  • Component attrs, slots, defaults, and allowed values
  • Working HEEx usage examples
  • Schema extraction from Phoenix component metadata

Tools3

What Petal Components MCP lets your agent do. Expand a tool for its parameters.

Verified live~413 tokens of context

Security & health

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

ActiveLast checked

Recent health check succeeded.

16/16 checks healthy over the last 83d

What it can do

From the 3 tools this server returned when we ran it.

Read-only tools · 3
Tool definitions changed on 2026-11-18. Review them if you approved this server earlier.
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceNot published
Package age184 days
Maintainers1

Observed 2026-11-18 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 16d ago via OSV.dev · petal-components-mcp (npm)

Adoption & maintenance

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

GitHub stars1Stargazers on the source repository.
npm downloads181Package downloads in the last 30 days.
Last commit11d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed3Callable tools this server registers over MCP.

How Petal Components MCP works

What petal-components-mcp does

petal-components-mcp gives MCP-compatible coding assistants structured access to petal_components, a component library for Phoenix LiveView. Its responses help an agent discover the available UI vocabulary and use components with the correct HEEx interface.

The server covers three focused tasks:

  • Retrieve installation instructions for a Phoenix project.
  • Enumerate all components included in petal_components.
  • Inspect one component's complete schema and an example of how to use it in HEEx.

The component schema includes attributes, slots, default values, accepted values, documentation, and a working usage example. This makes the server useful before writing tags such as <.button>, <.modal>, <.table>, or <.field>.

How it works

A TypeScript service packages a JSON snapshot of the component metadata. That snapshot is generated from the petal_components package by a Mix extraction task. The task loads the library's PetalComponents.* modules and reads their Phoenix.Component.__components__/0 metadata, then writes the result to src/schemas.json.

The built service runs as a standalone application and exposes the MCP endpoint at https://mcp.petal.build/mcp. The deployment is hosted on Fly.io. A health endpoint is also available at /healthz; it reports whether the service is healthy along with the bundled petal_components version and component count.

Setup and configuration

For Claude Code, add the hosted endpoint with:

Terminal
claude mcp add petal --transport http https://mcp.petal.build

After registration, ask the coding assistant to work on a Phoenix project. It can call the installation tool before making project changes, then use the component listing and schema tools while composing HEEx.

To run the service locally, install dependencies, build it, and start it on a chosen port:

Terminal
npm install
npm run build
PORT=8765 npm start

The local MCP endpoint is http://localhost:8765/mcp. A local Claude Code registration uses:

Terminal
claude mcp add petal-local --transport http http://localhost:8765/mcp

Schema extraction is performed with npm run extract. The extraction project downloads petal_components from Hex and does not require a local clone of that library.

Tools and capabilities

get_install_instructions returns the steps needed to add petal_components to a Phoenix project. Its guidance covers the dependency declaration, fetching dependencies, Tailwind v4 CSS configuration, and importing the library in the web module. It also includes an optional usage_rules step for synchronizing component guidance into CLAUDE.md or AGENTS.md. The instructions are designed to be safe for partially configured projects.

list_components returns every component shipped by petal_components with a short description. Use it to check whether an existing component fits before creating custom Tailwind markup.

get_component accepts a component name and returns its detailed schema, including attrs, slots, defaults, allowed values, documentation, and a HEEx example.

Limitations and notes

The service exposes the bundled schema snapshot, so the deployed data must be regenerated and redeployed when petal_components changes. The project describes natural-language component search and composed pattern generation as planned additions rather than available tools. The server is focused on petal_components and Phoenix LiveView rather than general-purpose UI libraries.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

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

Frequently Asked Questions about Petal Components MCP

petal-components-mcp is an MCP server that connects AI coding assistants to petal_components, a shadcn-style component library for Phoenix LiveView. Its main tools provide Phoenix installation instructions, list available components, and return detailed schemas with attrs, slots, defaults, allowed values, and HEEx examples.

Add the hosted HTTP endpoint with `claude mcp add petal --transport http https://mcp.petal.build`. After registration, Claude Code can call the installation, component listing, and schema tools from a Phoenix project.

Yes, petal-components-mcp is intended to work with Cursor. Connect Cursor to the hosted MCP endpoint at `https://mcp.petal.build/mcp` using its HTTP MCP configuration.

Run `npm install`, `npm run build`, and `PORT=8765 npm start`, then connect an MCP client to `http://localhost:8765/mcp`. The local service also provides a health check at `http://localhost:8765/healthz`.

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 PreviewPetal Components MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/petal-components-mcp?style=directory)](https://allmcps.com/mcp/petal-components-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/petal-components-mcp"><img src="https://allmcps.com/api/badge/petal-components-mcp?style=directory" alt="Petal Components MCP on AllMCPs" /></a>