Skip to main content
Glama
donaldrichard19-LVD

ui-component-judgment-mcp

ui-component-judgment-mcp

MCP-Server, der ein Tool bereitstellt, recommend_component, das beurteilt, ob ein UI-Komponentenbedarf mit einer bestehenden shadcn/ui- oder 21st.dev-Komponente gedeckt werden sollte oder einen individuellen Build erfordert, der von einer echten App-Referenz von Mobbin geleitet wird. Liefert ein strukturiertes Urteil, keine Liste von Suchergebnissen – gebaut für einen Agenten, der es mitten im Build konsumiert, nicht für einen Menschen zum Stöbern.

Dies implementiert die Urteilsebene, die im Produktbrief validiert wurde: Feld-/Anforderungsabdeckung, bewertet anhand echter Komponentenevidenz, schwellwertbasiert in use_existing / custom_build, mit einem no_candidates_found-Eimer, der von geringer Abdeckung getrennt bleibt, einer statischen Skip-Liste für triviale Primitive und einem computed_at-Zeitstempel, da Abdeckung eine Momentaufnahme ist, keine dauerhafte Tatsache.

So funktioniert es

Der Server scraped shadcn/21st.dev/Mobbin nicht selbst. Jeder Tool-Aufruf macht eine Anfrage an die Anthropic Messages API (claude-sonnet-4-6) mit dem serverseitigen web_search-Tool aktiviert und einem System-Prompt, der den gesamten Prozess kodiert: Skip-Listen-Prüfung, Anforderungsextraktion, Kandidatensuche, Evidenzabdeckungsbewertung, Schwellwert und – bei custom_build – eine Mobbin-Referenzsuche. Das Modell gibt strukturiertes JSON zurück, das der Server unverändert an den aufrufenden Agenten weitergibt.

Triviale Primitive (button, input, checkbox, label, badge, spinner, tooltip, avatar, icon) werden lokal abgefangen, bevor ein API-Aufruf erfolgt, sodass sie keine Anfrage verbrauchen.

Related MCP server: ui-registry-mcp

Einrichtung

npm install
npm run build

Erfordert ANTHROPIC_API_KEY, gesetzt in der Umgebung, in der der Server läuft.

Ausführen

ANTHROPIC_API_KEY=sk-ant-... npm start

Dies startet einen MCP-Server über stdio. Weisen Sie Ihren MCP-Client (Claude Code, Cursor, Claude Desktop usw.) darauf hin – die genaue Konfiguration hängt vom Client ab, sieht aber im Allgemeinen so aus:

{
  "mcpServers": {
    "ui-component-judgment": {
      "command": "node",
      "args": ["/path/to/ui-component-mcp/dist/index.js"],
      "env": { "ANTHROPIC_API_KEY": "sk-ant-..." }
    }
  }
}

Tool: recommend_component

Eingabe:

{
  "component_need": "price breakdown with fees and taxes",
  "domain": "Airbnb-style rental marketplace",
  "framework": "React + Tailwind",
  "existing_stack": "already using shadcn/ui"
}

component_need sollte spezifisch sein, keine Kategorie – „Preisaufschlüsselung mit Gebühren und Steuern“ nicht „Preisgestaltung“. Vage Kategorienamen sind das, was während der Validierung falsch-positive Übereinstimmungen erzeugt hat (eine generische SaaS-Preistabellen-Komponente, die als Übereinstimmung für einen Buchungs-Checkout gewertet wurde).

Ausgabe: JSON, das Folgendem entspricht:

{
  "verdict": "use_existing | custom_build",
  "confidence": "high | medium | low",
  "reason": "scored | no_candidates_found | skip_list",
  "computed_at": "2026-08-23",
  "requirements_checked": [ { "requirement": "...", "met": true, "evidence": "..." } ],
  "coverage": "5/7 (71%)",
  "recommendation": {
    "source": "21st.dev | shadcn | null",
    "install_command": "string | null",
    "reference": { "source": "Mobbin", "url": "...", "flow_name": "..." }
  }
}

Kosten

Jeder nicht-triviale Aufruf führt eine kurze mehrstufige Tool-Schleife aus (Suche → Bewertung → Antwort), die bei aktuellen Preisen mit Sonnet 5 ungefähr $0,06–$0,10 kostet ($2/M Eingabe, $10/M Ausgabe, $0,01 pro web_search-Aufruf) – skip-listed Primitive kosten $0, da sie nie die API erreichen. Drei Dinge halten das niedrig, ohne die Qualität zu beeinträchtigen:

  • Prompt-Caching im System-Block (cache_control: ephemeral) – die Anweisungen sind bei jedem Aufruf identisch, sodass wiederholte Turns und wiederholte Aufrufe aus dem Cache lesen, anstatt den vollen Preis erneut zu berechnen.

  • Ein 2-Suche-Budget für die Kandidatenfindung (1 mehr, wenn custom_build eine Mobbin-Suche auslöst), wobei shadcn und 21st.dev im selben Turn statt nacheinander durchsucht werden, sodass das wachsende Gespräch pro Aufruf weniger oft erneut gesendet wird.

  • UI_JUDGMENT_MODEL-Umgebungsvariable (Standard: claude-sonnet-5) – ermöglicht den Wechsel zu einem günstigeren Modell (z. B. Haiku 4.5) ohne Codeänderung. Bevor Sie einem günstigeren Modell in der Produktion vertrauen, führen Sie die 5 validierten Testfälle aus dem Produktbrief erneut aus (Preisaufschlüsselung, Stornierungsrichtlinie, Einnahmen-Dashboard, Galerie, Messaging) und vergleichen Sie die Urteile mit denen von Sonnet – dies wurde nicht getestet, nur durchdacht.

Bekannte Einschränkungen (aus der Validierung übernommen)

  • Kein Caching, bewusst. Jeder Aufruf sucht und bewertet von Grund auf neu. Ein custom_build-Urteil kann veralten, wenn Bibliotheken neue Komponenten veröffentlichen (validiert: shadcns Chat-Primitive vom Juni 2026 verwandelten eine wahrscheinlich individuelle Messaging-Komponente in eine nahezu perfekte Übereinstimmung). Wenn Sie Caching auf der Ebene des aufrufenden Agenten hinzufügen, halten Sie es nur sitzungsbezogen – persistieren Sie niemals ein Urteil über Sitzungen oder Builds hinweg.

  • Die Skip-Liste ist ein Ausgangspunkt, noch nicht gegen reale Nutzung validiert. Protokollieren Sie jeden Aufruf und ob er die Skip-Liste getroffen hat; achten Sie auf Agenten, die das Tool trotzdem für skip-listed Elemente aufrufen (Liste zu eng) oder generische UI für etwas liefern, das hätte übersprungen werden sollen (Liste fehlt ein Eintrag).

  • Nicht Ende-zu-Ende in einer vollständig sandboxed Umgebung testbar. Dieser Server benötigt ausgehenden Netzwerkzugriff auf api.anthropic.com plus das, was das web_search-Tool des Modells erreicht – er wird nicht an einem Ort laufen, der allgemeinen Internetzugriff blockiert.

  • Anforderungsextraktion und Abdeckungsbewertung sind Ermessensentscheidungen des Modells in einem einzigen Durchgang, keine deterministischen Lookups. Überprüfen Sie frühe Ausgaben stichprobenartig gegen echte Komponenten, bevor Sie der Pipeline unbeaufsichtigt vertrauen, wie bei der manuellen Validierung.

Available Tools

1 tool
recommend_componentA

Judges whether a UI component need should be met with an existing shadcn/ui or 21st.dev component, or requires a custom build guided by a real-app reference from Mobbin. Returns a structured verdict (use_existing | custom_build), not a list of search results. Call this whenever you are about to scaffold a new, non-trivial UI component from scratch, when you're unsure your own default output will look production-quality, or when the user references a specific app's pattern to match.

NameRequiredDescriptionDefault
domainYesThe product type/domain, e.g. 'Airbnb-style rental marketplace'. Shapes what requirements get extracted for the component need.
frameworkYese.g. 'React + Tailwind', 'Vue 3'.
component_needYesSpecific description of the UI component needed -- not a category. e.g. 'price breakdown with fees and taxes', not 'pricing'. Vague category names produce false-positive matches.
existing_stackNoOptional. e.g. 'already using shadcn/ui'. Used only as a tiebreaker between similarly-scored candidates, never as a hard filter.

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly states the output format ('structured verdict, not a list') and mentions reliance on Mobbin references for custom builds. It does not detail failure modes or edge cases, but for a non-destructive decision tool, this is sufficient and adds meaningful context beyond the raw schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences, each earning its place: the first states the core purpose, the second clarifies the output type, and the third lists usage triggers. It is front-loaded with the primary action and avoids any fluff or redundant details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no output schema, the description adequately explains the return value (a verdict with two possibilities) and the context in which it should be used. It also notes it is not a search tool, which is critical for correct invocation. Combined with full schema coverage for parameters, nothing essential is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description itself adds no additional parameter-specific semantics; the schema already explains each parameter clearly (e.g., 'component_need' should be specific, not a category). The description does not repeat or enhance this, so it stays at the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('judges') and resource ('UI component need'), clearly states the decision outcome (use_existing | custom_build), and explicitly distinguishes itself from search tools by saying 'not a list of search results'. This makes the tool's purpose unambiguous even without siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides explicit trigger conditions: 'whenever you are about to scaffold a new, non-trivial UI component from scratch', 'when you're unsure your own default output will look production-quality', or 'when the user references a specific app's pattern'. This is direct, actionable guidance on when to invoke the tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 1 tool updatev0.1.0
    • First observedrecommend_component

TDQS

A4.5/5.0

Scored across 1 tool

Disambiguation5/5

With only a single tool, there is no possibility of confusion between tools. The tool's purpose is clearly defined and unambiguous.

Naming Consistency5/5

The tool name 'recommend_component' follows a clear verb_noun pattern, which is consistent with common naming conventions. No other tools exist to introduce inconsistency.

Tool Count3/5

A single tool is on the thin side for most servers, but it serves a specific, well-defined purpose. It is not trivial and may be sufficient for the intended scope, though additional related tools could add value.

Completeness5/5

The tool fully covers its stated purpose: making a judgment between using existing components or building custom. It provides a structured verdict without missing essential aspects like referencing Mobbin or shadcn/ui. No obvious gaps within the defined domain.

Maintenance

ActivityActive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Provides AI assistants with tools to grade, generate, and validate UI components against the components.build specification. Supports searching documentation, checking compliance, and generating framework-agnostic accessible components.
    11
    8 npm
    Apache 2.0
  • A
    license
    A
    quality
    D
    maintenance
    Provides coding agents live access to shadcn-style component registries, enabling them to search, compare, and fetch real component source code for UI composition.
    5
    69 npm
    5
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    STOP UI SLOP. Gives coding agents searchable evidence from 800,000+ real web and iOS screens, design contracts, and a hard UI finish gate.
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Design review for UI code, inside your coding agent. Reviews React, Vue, Svelte, CSS and SwiftUI against 313 rules and returns scored findings with file:line fixes your agent can apply and verify.
    MIT