CDS Components MCP Server

CDS Components MCP Server

Enables AI assistants to search, understand, and generate code for design system components by syncing and indexing a component library.

Category
Visit Server

README

CDS Components MCP Server

An MCP (Model Context Protocol) server for your component library and design system, enabling AI assistants to search, understand, and generate code using your components.

Features

  • Component Search: Search by name, props, or functionality
  • Component Details: Retrieve full documentation including props, examples, and dependencies
  • Similar Components: Find alternatives based on requirements
  • Prop Validation: Check if props match library conventions
  • Code Generation: Generate boilerplate code with correct imports and props

Architecture

src/
├── types.ts              # TypeScript interfaces
├── config.ts             # Configuration management
├── repo-sync.ts          # Git repository synchronization
├── parsers/
│   ├── component.ts      # Parse React/TypeScript components
│   ├── story.ts          # Parse Storybook stories
│   ├── tokens.ts         # Parse design tokens
│   └── mdx.ts           # Parse MDX documentation
├── indexer.ts           # Orchestrates all parsers
├── search.ts            # Search and similarity algorithms
└── index.ts             # MCP server entry point

Installation

# Install dependencies
pnpm install

# Build the project
pnpm build

Configuration

Create a .env file from the example:

cp .env.example .env

Configure your repository settings:

REPO_OWNER=your-org
REPO_NAME=your-design-system-repo
REPO_BRANCH=main
PACKAGES_PATH=packages/components,packages/tokens

Usage

Running the Server

node dist/index.js

Configuring with Claude Desktop

Add to your Claude Desktop config (~/.config/claude/claude_desktop_config.json):

{
  "mcpServers": {
    "cds-components": {
      "command": "node",
      "args": ["/path/to/cds-components-mcp/dist/index.js"],
      "env": {
        "REPO_OWNER": "your-org",
        "REPO_NAME": "your-design-system",
        "REPO_BRANCH": "main",
        "PACKAGES_PATH": "packages/components,packages/tokens"
      }
    }
  }
}

Available Tools

1. search_components

Search for components by name, props, or functionality.

Arguments:

  • query (string, required): Search query
  • filterBy (string, optional): Filter by "name", "props", "functionality", or "all"

Example:

Find all button components

2. get_component_details

Retrieve full documentation for a specific component.

Arguments:

  • componentName (string, required): Name of the component

Example:

Get details for Button component

3. find_similar_components

Suggest alternative components based on requirements.

Arguments:

  • requirements (string, required): Description of component requirements
  • componentType (string, optional): Type or category filter

Example:

Find components for displaying user profiles

4. validate_component_usage

Check if props and patterns match library conventions.

Arguments:

  • componentName (string, required): Component to validate
  • props (object, required): Props object to validate

Example:

Validate Button usage with props {variant: "primary", size: "large"}

5. generate_component_code

Generate boilerplate code with correct imports and props.

Arguments:

  • componentName (string, required): Component name
  • props (array, optional): List of prop names
  • includeStyles (boolean, optional): Include style templates

Example:

Generate code for Button component

How It Works

  1. Repository Sync: Clones or pulls your design system repository
  2. Indexing: Parses all components, stories, tokens, and docs using TypeScript AST
  3. Search: Uses relevance scoring to find matching components
  4. Tool Execution: Returns formatted documentation and code snippets

Supported File Types

  • Components: .tsx, .jsx
  • Stories: .stories.tsx, .stories.ts
  • Tokens: .json, .ts, .js, .css, .scss
  • Documentation: .mdx, .md

Development

# Watch mode for development
pnpm watch

# Build
pnpm build

License

ISC

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured