Skip to main content
Glama

Pixl

Open-source MCP server for designing mobile UIs. Pixl plugs into whatever AI coding host you already use (Claude Code, Cursor, …) and turns it into a guided mobile-UI design tool. Your host's model does the generating — Pixl supplies the taste it lacks: a locked design-system token contract, a linter that rejects off-standard output, and a local browser preview with a phone-frame gallery and a draggable user-journey flow map. Everything runs locally.

Status: v0.1, feature-complete — MCP server, workspace, live preview, design-system presets + token contract, screen generation with the taste linter, and the draggable user-journey flow canvas.

How it fits together

host (Claude Code / Cursor) ──MCP stdio──▶ pixl-mcp (Node/TS)
                                             │  owns .pixl/ workspace, runs linter
                                             ▼
                            localhost:4321  Vite + React preview
                              ├── Screen gallery (phone frames, live-reload)
                              └── Flow canvas (dotted bg, draggable)

State lives in a .pixl/ folder in your project: tokens.json, design/*.md, screens/*.html, flow.json.

Related MCP server: CodeCrafted Design MCP

Install

Pixl auto-starts when your host connects: it creates the .pixl/ workspace, boots the preview, and opens localhost:4321 in your browser. No pixl_init call needed — just point your host at it and start asking for screens.

npx (recommended):

Cursor — ~/.cursor/mcp.json:

{ "mcpServers": { "pixl": { "command": "npx", "args": ["-y", "pixl-mcp"] } } }

Claude Code:

claude mcp add pixl -- npx -y pixl-mcp

Docker (no Node needed; fully isolated). -p 4321:4321 forwards the preview; the sh -c wrapper reaps any prior container so relaunches don't clash on the port:

{
  "mcpServers": {
    "pixl": {
      "command": "sh",
      "args": [
        "-c",
        "docker rm -f pixl-mcp >/dev/null 2>&1; exec docker run --rm -i --name pixl-mcp -p 4321:4321 -v \"$PWD\":/work -w /work pixl-mcp"
      ]
    }
  }
}

Build the image first with docker build -t pixl-mcp . (or pull it once published).

Develop

npm install --include=dev   # this machine has npm omit=dev set globally
npm run build               # compile the server to dist/
npm run typecheck
npx vitest run               # linter unit tests (pass/fail fixtures)
node scripts/smoke.mjs        # workspace + preview API end-to-end
node scripts/mcp-smoke.mjs    # drives the server as a real MCP client
node scripts/phase2-smoke.mjs # design system + screen plan
node scripts/phase3-smoke.mjs # write/lint screen: reject bad, accept fixed
node scripts/phase4-smoke.mjs # flow graph + drag-persist round-trip

Register a local build (from source)

Claude Code:

npm install --include=dev && npm run build
claude mcp add pixl -- node /absolute/path/to/pixl-mcp/dist/index.js

The preview auto-starts and opens localhost:4321 — then ask your assistant to set a design system and generate screens.

Tools

Tool

Purpose

pixl_init

Re-open the preview / fetch its URL (auto-runs on startup — you don't call it)

pixl_status

Report workspace state

pixl_list_presets / pixl_set_design_system / pixl_plan_screens

Design system + screen plan

pixl_write_screen / pixl_lint_screen

Generate + lint screens

pixl_set_flow

User-journey flow graph

MIT.

Available Tools

8 tools
pixl_initInitialize PixlA

Create the .pixl workspace in the current project, boot the local browser preview, and open it. Call this first. Returns the preview URL to relay to the user.

NameRequiredDescriptionDefault
openBrowserNoOpen the preview in the default browser automatically.
pixl_lint_screenLint a screenA

Lint provided HTML against the active token contract WITHOUT saving. Use to check a draft before committing it with pixl_write_screen.

NameRequiredDescriptionDefault
htmlYesFull screen HTML to lint.
pixl_list_presetsList design presetsA

List the curated design-system presets. Show these to the user and let them pick one (by id) before calling pixl_set_design_system.

NameRequiredDescriptionDefault

No parameters

pixl_plan_screensPlan screens & journeyA

Record the screen list and the user journey between them. Writes screens.md and seeds the flow map. Do this after the design system is set and before generating screens.

NameRequiredDescriptionDefault
journeyNoDirected transitions between screen ids.
screensYesOrdered list of screens.
pixl_set_design_systemSet design systemA

Lock the design system. Pass a presetId (from pixl_list_presets) with optional overrides, OR fully custom tokens. Writes tokens.json + design/*.md and returns the TOKEN CONTRACT — obey it for every screen you generate.

NameRequiredDescriptionDefault
presetIdNoPreset id, e.g. 'clean-saas'. Omit only if passing customTokens.
overridesNo
customTokensNoFull custom token set (same shape as a preset's tokens). Use for a bespoke system.
pixl_set_flowSet flowA

Set/update the user-journey graph the flow canvas renders. Provide the edges (transitions between screen ids). Nodes default to one per planned screen and keep any positions the user has dragged. Writes flow.json and live-updates the Flow tab.

NameRequiredDescriptionDefault
edgesYesDirected transitions between screens.
nodesNoOptional explicit node set/positions; omit to use one node per screen.
pixl_statusPixl statusA

Report current workspace state: whether initialized, the active design system, screen count, flow node count, and preview URL.

NameRequiredDescriptionDefault

No parameters

pixl_write_screenWrite a screenA

Submit a screen's HTML. It is linted against the token contract; on pass it is saved to screens/.html and live-renders in the gallery, on fail the violations are returned and NOTHING is saved — fix them and resubmit.

NameRequiredDescriptionDefault
idYesScreen id; matches a screen from pixl_plan_screens.
htmlYesFull self-contained HTML document for the screen, sized to the viewport and using the contract's headBlock + role classes.
nameYesHuman-readable screen name.
descriptionNo

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 8 tool updatesv0.1.0
    • First observedpixl_init
    • First observedpixl_lint_screen
    • First observedpixl_list_presets
    • First observedpixl_plan_screens
    • First observedpixl_set_design_system
    • First observedpixl_set_flow
    • First observedpixl_status
    • First observedpixl_write_screen

TDQS

A4.4/5.0

Scored across 8 tools

Disambiguation5/5

Each tool has a unique, clearly defined purpose (init, lint, list presets, plan screens, set design system, set flow, status, write screen) with no overlap or ambiguity.

Naming Consistency5/5

All tools follow a consistent 'pixl_verb_noun' pattern in snake_case, making the naming predictable and understandable.

Tool Count5/5

8 tools is well within the optimal range for a specialized server covering initialization, design system, planning, linting, and writing screens.

Completeness4/5

The tool set covers the core workflow end-to-end, though there is no explicit tool to list or delete screens (pixl_status only reports count). This minor gap does not significantly hinder usability.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    Design contract layer for AI agents. Scans Figma, code, Storybook, and token files, reconciles conflicts, and serves a single machine-readable source of truth so every agent gets the same authoritative design rules before it builds. Local-first.
    9
    34 npm
    21
    Apache 2.0
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI coding assistants to inspect frontend projects, search a curated design and motion recipe catalog, prepare and preview structured design plans, apply changes with backups and rollback, capture previews, audit UI accessibility and performance, and monitor activity via a web dashboard.
    13 npm
    MIT