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 🙏

© 2025 – Pkg Stats / Ryan Hefner

designrails

v0.1.5

Published

CLI tool to set up MCP servers for AI-powered UX design assistance

Downloads

52

Readme

designrails

CLI tool to quickly set up MCP servers for AI-powered UX design assistance in your coding environment.

What is Design Rails?

Design Rails provides an MCP (Model Context Protocol) server that gives AI coding tools access to UX design expertise. The CLI tool helps you configure this server in your preferred development environment with a single command.

Features

  • One-Command Setup - Configure MCP servers with a single command
  • Multi-Tool Support - Works with Claude Code, Cursor, and VS Code
  • Interactive or Direct - Choose your tool interactively or use flags for automation
  • Smart Configuration - Automatically creates config files and directories as needed
  • Safe Updates - Prompts before overwriting existing configurations

Installation

No installation required! Use with npx, pnpm dlx, yarn dlx, or bun x:

# npm
npx designrails@latest setup

# pnpm
pnpm dlx designrails@latest setup

# yarn
yarn dlx designrails@latest setup

# bun
bunx --bun designrails@latest setup

Or install globally:

npm install -g designrails

Usage

Interactive Mode

Run without flags for a guided setup experience:

npx designrails@latest setup

You'll be prompted to:

  1. Select your AI coding tool:

    • Claude Code
    • Cursor
    • VS Code
  2. Update instructions file:

    • Optionally add Design Rails guidance to your tool's instruction file:
      • Claude Code: CLAUDE.md
      • Cursor: .cursorrules
      • VS Code: .github/copilot-instructions.md
  3. Choose design context folder location:

    • Default: design-context (in your project root)
    • Or specify a custom path

Direct Mode with Flags

Skip the tool selection prompt by specifying your tool directly. You'll still be prompted for instructions file and design context folder preferences:

# Set up Claude Code
npx designrails@latest setup --claude
npx designrails@latest setup --claude-code

# Set up Cursor
npx designrails@latest setup --cursor

# Set up VS Code
npx designrails@latest setup --vscode
npx designrails@latest setup --vs-code

What It Does

Both interactive and direct modes will:

  1. Ask if you want to update your tool's instruction file with Design Rails guidance
  2. Ask where to create the design context folder (default: ./design-context)
  3. Create the MCP server configuration:
    • Claude Code: .mcp.json in your project directory
    • Cursor: .cursor/mcp.json in your project directory
    • VS Code: .vscode/mcp.json in your project directory

The only difference between modes:

  • Interactive: Shows intro and asks which tool to set up
  • Direct: Skips tool selection (you already specified it with a flag)

All configurations point to https://designrails.com/api/mcp as the MCP server URL.

Example Output

Interactive Mode:

Design Rails Setup
Give your AI coding tool access to UX design expertise

This setup will:
  1. Connect your AI tool to the Design Rails server
  2. Create a folder for your product's design guidelines
  3. Help you populate those guidelines to get started

? Which tool would you like to set up? Claude Code

Design Context Folder
This folder will store your product's design guidelines:
  • Brand colors, typography, spacing rules
  • Common UI patterns and component usage
  • Accessibility requirements and UX principles
Your AI tool will reference these files when building UI features.

? Where should we create this folder? design-context
✓ Created design context folder: design-context
You'll populate this folder in the next step.

AI Tool Instructions
We can add guidance to CLAUDE.md that tells your AI:
  • When to consult Design Rails for UI decisions
  • Where to find your design context files
  • How to maintain design system consistency
This helps your AI make better UX decisions automatically.

? Add Design Rails guidance to CLAUDE.md? Yes
✓ Updated CLAUDE.md with Design Rails guidance

Design Context Folder
This folder will store your product's design guidelines:
  • Brand colors, typography, spacing rules
  • Common UI patterns and component usage
  • Accessibility requirements and UX principles
Your AI tool will reference these files when building UI features.

? Where should we create this folder? design-context

✓ Created design context folder: design-context

✓ Claude Code configuration updated!
ℹ Configuration file: .mcp.json

What's Next:
  1. Restart Claude Code so it loads Design Rails
  2. Run /mcp to see the Design Rails server listed
  3. Sign in to Design Rails when prompted
  4. Once authenticated, paste this prompt to populate your design context:

 Help me initialize design context using the Design Rails MCP

✓ Setup complete!

Direct Mode (with --claude flag):

Design Rails Setup
Give your AI coding tool access to UX design expertise

AI Tool Instructions
We can add guidance to CLAUDE.md that tells your AI:
  • When to consult Design Rails for UI decisions
  • Where to find your design context files
  • How to maintain design system consistency
This helps your AI make better UX decisions automatically.

? Add Design Rails guidance to CLAUDE.md? Yes
✓ Updated CLAUDE.md with Design Rails guidance

Design Context Folder
This folder will store your product's design guidelines:
  • Brand colors, typography, spacing rules
  • Common UI patterns and component usage
  • Accessibility requirements and UX principles
Your AI tool will reference these files when building UI features.

? Where should we create this folder? design-context

✓ Created design context folder: design-context

✓ Claude Code configuration updated!
ℹ Configuration file: .mcp.json

What's Next:
  1. Restart Claude Code so it loads Design Rails
  2. Run /mcp to see the Design Rails server listed
  3. Sign in to Design Rails when prompted
  4. Once authenticated, paste this prompt to populate your design context:

 Help me initialize design context using the Design Rails MCP

✓ Setup complete!

Configuration Details

Creates a JSON configuration like:

{
  "mcpServers": {
    "uxmcp": {
      "url": "https://designrails.com"
    }
  }
}

Development

This package is part of the UXMCP monorepo.

Local Development

# Install dependencies
pnpm install

# Run in development mode
pnpm --filter designrails dev

# Build
pnpm --filter designrails build

# Type checking
pnpm --filter designrails check-types

Project Structure

apps/cli/
├── src/
│   ├── commands/
│   │   └── mcp.ts          # MCP setup logic for all tools
│   ├── utils/
│   │   └── logger.ts       # Colored console output utilities
│   └── index.ts            # Main CLI entry point (Commander.js)
├── dist/                   # Compiled output
├── package.json
├── tsconfig.json
└── README.md

Tech Stack

  • Framework: Commander.js for CLI structure
  • Prompts: Inquirer.js for interactive questions
  • Styling: Chalk for colored terminal output
  • Loading: Ora for spinners
  • Language: TypeScript

Options

  • --version, -v - Show version number
  • --help, -h - Show help information

License

MIT