Skip to main content
Glama
ui-layouts-mcp
by ui-layouts

@ui-layouts/mcp

npm version node version

MCP Badge

@ui-layouts/mcp provides AI assistants with several valuable tools to help them search, understand, and retrieve UI components from ui-layouts.com.

Each tool can be used independently, but they are designed to work together as a complete "component exploration pipeline."

πŸ“¦ Installation & MCP Setup

Requirements

  • Node.js: >=20.10.0

  • MCP Client: Claude Desktop, Cursor, or compatible MCP client

Quick Start

Run @ui-layouts/mcp without installing it globally using npx. This is the recommended way to get started:

{
  "mcpServers": {
    "ui-layouts-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": ["@ui-layouts/mcp"]
    }
  }
}

πŸ’‘ Note: npx will automatically download and run the latest version of @ui-layouts/mcp when needed. No global installation required!

Using with Claude Code (CLI)

claude mcp add ui-layouts-mcp --scope user -- npx -y @ui-layouts/mcp

This registers the MCP server under the CLI-safe name ui-layouts-mcp while still using the @ui-layouts/mcp npm package.


Related MCP server: MCP Vue UI Kit Server

πŸ› οΈ Tools

πŸ” search_components

Search the ui-layouts.com docs pages, blocks sections, and registry item names. Results are ranked, best match first. A query can have several words (e.g. drag and drop), and an entry that matches more of them ranks higher. Separators do not matter, so datepicker finds date picker. A query word matches a whole word or the start of one (3 letters or more). There is no fuzzy or plural matching.

Each result lists the registry items that matched the query. Registry items that belong to no docs page are listed separately. Pass any of these names to get_source_code.

Parameters

  • q β€” one or more words, matched against name, key, group, tags, and registry item names

  • limit β€” max results to return (default 20, max 100). The header shows how many matched in total (e.g. 20 of 31), plus the count of matching items without a docs page

When it's useful

  • To find a specific UI component or block by name or tag

  • To find which entry a registry item (e.g. btn-bg-shine) belongs to

  • To explore available components by category


πŸ“˜ get_docs

Fetch the complete documentation for a component as raw MDX markdown, read from the ui-layouts source repo on GitHub. Installation commands, props tables, and structure snippets come through as-is. The response header lists the entry's registry items. Pass one of those names to get_source_code to get the example code. A blocks entry (e.g. hero-section) has no docs page, so it returns only its items.

Parameters

  • key β€” entry key (e.g. accordion, hero-section)

  • href β€” entry href (e.g. /components/accordion, /blocks/hero-section), used when key is omitted

  • maxChars β€” max characters of markdown to return (default 20000)

  • timeoutMs β€” fetch timeout in milliseconds (default 7000)

When it's useful

  • To read implementation guides and examples

  • To view a component’s structure, props, or variants

  • To extract technical explanations for AI-assisted reasoning or integration


🧩 get_component_meta

Fetch structured HTML metadata for a specific component from ui-layouts.com. It includes fields such as title, description, keywords, Open Graph, and Twitter card. Registry item names for get_source_code come from get_docs, not from this tool.

When it's useful

  • To understand a component’s intent or SEO context

  • To generate previews or summaries automatically


πŸ’Ύ get_source_code

Fetch the actual TypeScript/React source code of a registry item directly from https://www.ui-layouts.com/r/{componentName}.json. The tool returns every file of the item, each under its path, so the files an example imports come with it. The header lists the npm dependencies to install.

maxChars is one budget across all files, spent in file order. When it runs out, the response ends with a notice that names the files that were cut short or left out and the maxChars that returns the rest.

Parameters

  • componentName β€” registry item name from the items of get_docs (e.g. liquid-glass-weather)

  • maxChars β€” max characters of file content to return, across all files (default 20000, max 200000)

  • timeoutMs β€” fetch timeout in milliseconds (default 7000)

When it's useful

  • To review or analyze the source code of a component

  • To use the component implementation as a code example

  • To verify that a component matches your design or API expectations


πŸ’¬ Prompts

The MCP server also provides reusable prompt templates that guide AI assistants to perform complex tasks using the available tools.

🎯 find_component

Help find the best ui-layouts component(s) for specific requirements, use cases, or design needs.

Parameters:

  • requirements: What you need (e.g. 'collapsible content sections with smooth animation')

  • tags (optional): Comma-separated tags to filter by (e.g. 'interactive,layout')

  • maxCandidates (optional): Max candidates to fetch docs for (default: '3', range: 1-10)

What it does:

  • Generates multiple search queries with synonyms

  • Calls search_components multiple times and merges results

  • Fetches documentation for top candidates using get_docs

  • Provides structured recommendations with:

    • Recommended: name/key/href/tags, why, trade-offs

    • Alternatives: 1-3 alternative options

    • Next steps: Exact tool calls to continue

Strategy:

  • Uses intelligent search with synonyms (e.g. accordion/collapse/disclosure)

  • Prioritizes components matching provided tags

  • Ranks by relevance and compares multiple candidates


πŸ› οΈ implement_component

Get a step-by-step implementation guide for a ui-layouts component, including code examples, integration steps, and best practices.

Parameters:

  • componentKey (optional): Component key (e.g. 'accordion', 'sparkles-title')

  • componentHref (optional): Component href (e.g. '/components/accordion')

  • One of componentKey or componentHref is required.

  • framework (optional): Target framework (e.g. 'react', 'next', 'vite', 'general', default: 'react')

  • includeSourceCode (optional): Whether to include source code ('true' or 'false', default: 'true')

What it does:

  • Fetches component documentation and optionally source code

  • Generates a comprehensive implementation guide with:

    • Overview: Component purpose, features, and when to use

    • Installation: Dependencies and setup for the target framework

    • Basic Usage: Minimal working example with explanations

    • Configuration: Available props and customization options

    • Advanced Examples: Real-world use cases with code

    • Integration: Framework-specific setup and patterns

    • Styling & Customization: Theming and appearance customization

    • Best Practices: Performance tips, accessibility, common pitfalls

    • Troubleshooting: Common issues and solutions

Output:

  • Practical, copy-paste ready code examples

  • Framework-specific integration guidance

  • Real code from source when available


πŸ’‘ Tip: The path from a keyword to source code is: search_components β†’ get_docs β†’ get_source_code

Step

Description

Example

β‘ 

Find components matching a keyword or tag

search_components { "q": "accordion" }

β‘‘

Fetch the documentation (MDX) and item names

get_docs { "key": "accordion" }

β‘’

Get the source files of an item

get_source_code { "componentName": "single-layout-accordion" }

β€”

Optional: page metadata (title, Open Graph)

get_component_meta { "key": "accordion" }


βš™οΈ Server Info


πŸ”„ Updating the registry

src/registry.json is the index the tools search. It mirrors the docs navigation and registry.json of the ui-layouts site repo. When the site adds a docs page or a registry item, edit the file by hand.


🧠 Example Usage in Cursor / Claude

> call tool search_components { "q": "slider" }
> call tool get_docs { "key": "range-slider" }
> call tool get_source_code { "componentName": "dual-range-slider" }

πŸ‘€ Author (Naymur & Jinho)

Be A Sponsor

Available Tools

4 tools
get_component_metaB

Fetch the HTML metadata (title, description, keywords, Open Graph, Twitter card) of a component's page on https://www.ui-layouts.com.

Inputs: key, href, timeoutMs.

get_docsA

Fetch the docs of a component as MDX markdown from the ui-layouts source repo. The header lists the entry's registry items; pass one of those names to get_source_code. A blocks entry has no docs page and returns only its items.

Inputs: key, href, maxChars, timeoutMs.

get_source_codeA

Fetch the source code of a registry item from https://www.ui-layouts.com/r/{componentName}.json. Returns every file of the item with its path, plus the npm dependencies to install. maxChars is one budget across all files; when it runs out, the response ends with a notice naming the files that were cut short or left out.

Inputs: componentName (required), maxChars, timeoutMs.

search_componentsA

Search ui-layouts docs pages, blocks sections, and registry item names. Results are ranked, best match first. A query can have several words, and an entry that matches more of them ranks higher. A query word matches a whole word or the start of one (3+ letters). There is no fuzzy or plural matching, so use the singular ('modal', not 'modals').

Inputs: q (required), limit.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 4 tools

    Disambiguation4/5

    Each tool has a distinct retrieval target: discovery via search_components, documentation MDX via get_docs, page metadata via get_component_meta, and registry source via get_source_code. The only mild overlap is between get_docs and get_component_meta, since both retrieve information about a component, but the descriptions clearly separate documentation content from HTML metadata.

    Naming Consistency5/5

    All tool names use consistent snake_case and follow a verb_noun pattern: search_components, get_docs, get_component_meta, get_source_code. Retrieval tools share the get_ prefix, while the discovery tool uses search_, making the convention predictable.

    Tool Count5/5

    Four tools is well-scoped for a documentation and registry lookup server: search, docs, metadata, and source code. Each tool serves a clear role without redundant operations.

    Completeness4/5

    The set covers discovery, documentation, metadata, and source-code retrieval, which are the core workflows for exploring ui-layouts components. A minor gap is the lack of a browsing or listing operation for components/blocks/registry items, though search_components largely compensates for this.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers