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

@fragments-sdk/cli

v0.15.10

Published

CLI, MCP server, and dev tools for Fragments design system

Readme

@fragments-sdk/cli

CLI, MCP server, and dev tools for the Fragments design system. This is the single tool package — it includes the CLI commands, the MCP server for AI agents, the dev viewer, screenshot capture, visual diffing, and migration tools.

Install

npm install @fragments-sdk/cli

CLI Usage

# Build fragments.json
fragments build

# Validate fragment files
fragments validate

# Generate AI-ready context
fragments context

# See all commands
fragments --help

MCP Server

The MCP server gives AI agents (Claude Code, Claude Desktop, etc.) access to your design system.

With Claude Code

Add to your Claude Code MCP settings (~/.claude/settings.json):

{
  "mcpServers": {
    "fragments": {
      "command": "npx",
      "args": ["-y", "--package", "@fragments-sdk/cli", "fragments-mcp"]
    }
  }
}

Or run the dedicated binary:

npx fragments-mcp

Options:

-p, --project-root <path>  Project root directory (default: cwd)
-u, --viewer-url <url>     Viewer URL (default: http://localhost:6006)

How It Works

  1. Install a component library that ships fragments.json (e.g., npm install @fragments-sdk/ui)
  2. Add the MCP server to your AI tool
  3. The server reads fragments.json from the installed package and exposes component data to the AI agent

The server searches for fragments.json in two places:

  • Your project directory (walks upward from cwd) — for library authors running fragments build
  • Your package.json dependencies — for consumers who installed a fragments-enabled package

Available MCP Tools

| Tool | Description | |------|-------------| | discover | List components, suggest by use case, find alternatives, or get a full context summary | | inspect | Get detailed component info: props, usage guidelines, code examples — all in one call | | blocks | Search composition blocks (e.g., "Login Form", "Settings Page") | | render | Render a component screenshot, verify against baseline, or compare to Figma | | fix | Generate patches to fix token compliance issues |

Visual tools

The render and fix tools require Playwright. Install it separately if you need visual tools:

npm install playwright

These tools are optional. All other tools work without Playwright.

Programmatic Usage

import { createMcpServer, startMcpServer } from '@fragments-sdk/cli/mcp';

// Start with stdio transport (default)
await startMcpServer({ projectRoot: process.cwd() });

// Or create the server instance for custom transports
const server = createMcpServer({ projectRoot: process.cwd() });

License

MIT