npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

kds-mcp

v0.1.6

Published

MCP server for fetching component context from GitLab repositories with Storybook support

Readme

kds-mcp

Model Context Protocol (MCP) server that provides component context from GitLab repositories. Fetches component structure, props, and Storybook usage examples directly from your private GitLab repository.

Features

  • 🔍 Fetch component structure, props, and implementation details from GitLab
  • 📚 Extract Storybook usage examples and component stories
  • 📱 Support for both React and Flutter components
  • 🚀 Built-in caching to minimize API calls during interactive sessions
  • 🔐 Works with private GitLab repositories
  • 🤖 Ready-to-use context bundles optimized for AI assistants

Installation

For End Users

Install globally via npm:

npm install -g kds-mcp

Or use directly with npx (no installation required):

npx -y kds-mcp

For Development

  1. Clone the repository:

    git clone https://github.com/kevinananda/kds-mcp.git
    cd kds-mcp
  2. Install dependencies:

    npm install
  3. Add an .env file based on .env.example:

    cp .env.example .env
  4. Run in development mode:

    npm run dev

Configuration

Environment Variables

Create a .env file or set environment variables with the following:

| Variable | Required | Default | Description | |----------|----------|---------|-------------| | GITLAB_TOKEN | ✅ | - | Personal access token with read_api scope | | GITLAB_PROJECT_ID | ✅ | - | Numeric ID or URL path of the target project | | GITLAB_BASE_URL | ❌ | https://gitlab.com | GitLab instance URL | | COMPONENT_ROOT | ❌ | src/components | Root directory for components | | STORY_ROOT | ❌ | src/stories | Root directory for Storybook stories | | MOBILE_COMPONENT_ROOT | ❌ | lib/components | Root directory for mobile components | | MOBILE_STORY_ROOT | ❌ | lib/stories | Root directory for mobile stories | | DEFAULT_REF | ❌ | main | Default Git branch or tag |

Claude Desktop Setup

Add to your claude_desktop_config.json:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json

Using npx (recommended):

{
  "mcpServers": {
    "kds-mcp": {
      "command": "npx",
      "args": ["-y", "kds-mcp"],
      "env": {
        "GITLAB_TOKEN": "your-gitlab-token-here",
        "GITLAB_PROJECT_ID": "your-project-id",
        "GITLAB_BASE_URL": "https://gitlab.com",
        "COMPONENT_ROOT": "src/components",
        "STORY_ROOT": "src/stories"
      }
    }
  }
}

Using global install:

{
  "mcpServers": {
    "kds-mcp": {
      "command": "kds-mcp",
      "env": {
        "GITLAB_TOKEN": "your-gitlab-token-here",
        "GITLAB_PROJECT_ID": "your-project-id"
      }
    }
  }
}

Note: Restart Claude Desktop after updating the configuration.

Usage

Once configured, the following tools are available in Claude Desktop:

Tools

  • list_components - List all available components (specify framework: "react" or framework: "flutter")
  • get_component_context - Get component implementation and props (specify framework: "react" or framework: "flutter")
  • get_component_usage_context - Get Storybook/Widgetbook usage examples (specify framework: "react" or framework: "flutter")

Example Queries

Ask Claude:

  • "List all available React components"
  • "Show me the Button component implementation for React"
  • "Get usage examples for the Card component in Flutter"
  • "Fetch the TextField component for Flutter"

Getting a GitLab Token

  1. Go to your GitLab instance (e.g., gitlab.com)
  2. Navigate to User SettingsAccess Tokens
  3. Create a new token with the read_api scope
  4. Copy the token and add it to your configuration

Architecture

  • src/server.ts – MCP server entry-point and tool declarations.
  • src/component-bundle.ts – orchestration logic that combines GitLab data and parsing results.
  • src/gitlab.ts – GitLab API wrapper with pagination and retry handling.
  • src/parsers/* – Source and Storybook extraction helpers.
  • src/cache.ts – Simple TTL cache used for component bundles and GitLab responses.
  • src/config.ts – Environment configuration with runtime validation.

Next Steps

  • Flesh out the component + story parsers for your codebase conventions.
  • Add tests around parsing and API layers.
  • Extend the MCP toolset (e.g. list_components) as needed.