Skip to main content
Glama

tkh-components-mcp

UI components, design tokens, and a UI/UX spec rebuilt from theknowledgehouse.org, served over the Model Context Protocol (MCP). Any MCP client (Claude Desktop, Claude Code, Cursor, etc.) can browse the components, customize them with props, and generate full pages in the TKH style.

  • No dependencies. Plain Node 18+. Nothing to npm install.

  • Transport: stdio (newline-delimited JSON-RPC 2.0). Protocol versions 2025-06-18, 2025-03-26, and 2024-11-05.

Quick start

cd tkh-components-mcp
node scripts/test.js      # 14 protocol smoke tests
node scripts/export.js    # writes components/<name>/component.{html,css,js} + dist/*.html
open dist/index.html      # full homepage rebuild

Related MCP server: UI Toolkit MCP Server

Connect it to a client

Claude Code

claude mcp add tkh-components -- node /ABSOLUTE/PATH/tkh-components-mcp/server.js

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json) / Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "tkh-components": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/tkh-components-mcp/server.js"]
    }
  }
}

Tools

Tool

What it does

list_components

Lists all components (optional category filter)

get_component

name + format: spec, html, css, js, bundle (default), standalone, raw (original captured markup). Accepts props overrides

search_components

Keyword search, e.g. "slider", "dropdown"

get_design_tokens

json / css (custom properties) / base-css (globals, ripple buttons, reveal)

get_design_spec

The full written UI/UX spec

get_site_content

Scraped content (nav, testimonials, news, footer...) as JSON

render_page

Composes sections (names, or {name, props}) into one standalone HTML doc. Optional outputPath writes it to disk

Resources: tkh://design-spec, tkh://tokens.json, tkh://base.css, tkh://content.json, tkh://page.html, tkh://component/{name}, and tkh://raw/{name}. Prompt: build_tkh_page(goal).

Components

name

category

notes

header

navigation

Gold underline hover, gray dropdowns, Donate ripple button, burger + fullscreen overlay below 992px

announcement-bar

marketing

Lavender strip + rounded purple CTA

hero-video

hero

Wave-line bg + 16:9 autoplay video (or image)

mission

content

Centered H2 + paragraphs on off-white

pillars

content

3-up uppercase label + 89px lavender icon circles

testimonials

social-proof

Seamless-loop slider, 8s autoplay, auto-height, BACK n/total NEXT

news-grid

content

Purple section, 3/2/1 responsive cards

footer

navigation

Link columns w/ chevrons, contact icons, logo, social, badges

legal-bar

navigation

Lavender legal strip

button

primitive

Ripple button: primary (gold) / tertiary (purple), sm/md, rounded

Example call

{ "name": "render_page", "arguments": {
  "title": "Volunteer with us",
  "sections": [
    "header",
    { "name": "announcement-bar", "props": { "text": "Mentor sign-ups close Friday!", "cta": { "label": "Sign Up", "href": "/volunteer" } } },
    { "name": "mission", "props": { "title": "Give back to the pipeline", "paragraphs": ["..."] } },
    "testimonials", "footer", "legal-bar"
  ],
  "outputPath": "./out/volunteer.html"
} }

Layout

server.js               MCP server (stdio)
src/base.js             tokens -> CSS vars, globals, ripple button, reveal JS
src/registry.js         component registry, renderPage, search
src/components/*.js     one module per component: {name, description, props, css, js, render()}
src/tokens.json         measured design tokens
src/content.json        scraped homepage content (defaults for props)
components/_raw/*.html  original markup captured from the live site (reference)
components/<name>/      exported static html/css/js per component
dist/                   standalone previews (index.html = full page)
DESIGN_SPEC.md          written UI/UX spec

Notes

  • Images and the hero video are hot-linked from the TKH CloudFront CDN. Swap them via props for your own project.

  • The originals use Bootstrap 4, Swiper, AOS, and jQuery. These rebuilds swap those for small vanilla CSS/JS with the same measured values and timings.

  • The mobile fullscreen menu is an approximation. The desktop layout was measured directly.

  • The brand, logos, photos, and copy belong to The Knowledge House. Use this as a design reference, or with their permission.

Available Tools

7 tools
get_componentGet componentA
Read-only

Get one component. format: "spec" (props schema + defaults), "html" (rendered markup), "css", "js", "bundle" (html+css+js, default), "standalone" (full HTML doc with base styles, ready to open), or "raw" (original markup captured from theknowledgehouse.org). Pass props to override the default content.

Inputs: name (required), props, format.

get_design_specGet UI/UX specB
Read-only

The full written UI/UX specification of theknowledgehouse.org homepage (layout, typography, colors, interactions, responsive rules).

Inputs: no named parameters.

get_design_tokensGet design tokensA
Read-only

Design tokens measured from the live site (colors, Lato type scale, spacing, layout, motion, scrollbar). format "json" (default), "css" (CSS custom properties only), or "base-css" (tokens + global styles + ripple buttons + reveal animation).

Inputs: format.

get_site_contentGet site contentA
Read-only

Structured content scraped from the homepage (nav tree, announcement, mission, pillars, 5 testimonials, news, footer links, social, badges). Useful as a template for your own props.

Inputs: no named parameters.

list_componentsList componentsA
Read-only

List every saved TKH component (name, title, category, description, prop names). Optionally filter by category.

Inputs: category.

render_pageRender pageA

Compose components into one standalone HTML page (base styles, Lato font, per-component CSS/JS deduped). sections defaults to the full homepage order. Optionally write the result to outputPath.

Inputs: title, extraCss, sections, outputPath.

search_componentsSearch componentsA
Read-only

Keyword search across component names, descriptions, categories and props (e.g. "slider", "dropdown", "cards").

Inputs: query (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 7 tools

    Disambiguation4/5

    Most tools are clearly distinct (get_component for one item, get_design_tokens, get_design_spec, get_site_content, render_page all target different resources). search_components and list_components overlap slightly since list can filter by category while search does keyword matching, but the descriptions clarify the boundary.

    Naming Consistency5/5

    Consistent snake_case verb_noun pattern throughout: search_components, list_components, get_component, get_design_tokens, get_design_spec, get_site_content, render_page. The 'get_' family and the search/list/render verbs are used predictably.

    Tool Count5/5

    Seven tools is well-scoped for a component-library/reference server, with each tool earning its place (discovery, retrieval, tokens, spec, content, composition). No redundant or thin entries.

    Completeness4/5

    The read-and-compose surface is strong: discovery (search/list), retrieval with multiple output formats (get_component), design system data (tokens/spec/content), and page composition (render_page). There is no write/create/update path for components, but the server's apparent purpose is serving reference components, so this is a minor gap.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers