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

clean-code-react

v0.4.0

Published

MCP server providing code quality guidance for AI coding assistants

Readme

Clean Code React MCP Server

A Model Context Protocol (MCP) server that provides comprehensive React and TypeScript pattern guidance for AI coding assistants.

Overview

Clean Code React helps AI coding assistants writeN better React/TypeScript code by providing:

  • Essential Patterns: From basic Container/Presentational to advanced Builder and Factory patterns
  • Bad vs Good Examples: Compare problematic code with improved solutions
  • Detailed Guidance: Comprehensive descriptions, use cases, and best practices
  • Pattern Discovery: Get an overview of all patterns or dive deep into specific ones

Usage

Typical Configuration

{
  "mcpServers": {
    "clean-code-react": {
      "command": "npx",
      "args": ["clean-code-react@latest"]
    }
  }
}

Cursor

Install MCP Server

Claude Code

claude mcp add clean-code-react npx clean-code-react@latest

VS Code

code --add-mcp '{"name":"clean-code-react","command":"npx","args":["clean-code-react@latest"]}'

What You Get

This MCP server provides AI coding assistants with access to:

  • Essential React Patterns - From basic Container/Presentational to advanced Builder and Factory patterns
  • Code Quality Fundamentals - Four principles of writing good code: Readability, Predictability, Cohesion, and Coupling
  • Bad vs Good Examples - Compare problematic code with improved solutions
  • Best Practices - Comprehensive guidance and common mistakes to avoid

Available Patterns

React Patterns

  • Container/Presentational - Separate data logic from presentation
  • Render Props - Share code between components using render props
  • Compound Component - Create flexible, composable component APIs
  • Higher-Order Component - Enhance components with additional functionality

Architecture Patterns

  • Dependency Injection - Manage dependencies and improve testability
  • Service Layer - Organize business logic and external integrations
  • Adapter Pattern - Bridge incompatible interfaces

Code Quality Patterns

  • Declarative Programming - Write more readable, maintainable code
  • Prop Drilling Solutions - Solve prop drilling with modern techniques

Design Patterns

  • Builder Pattern - Construct complex objects step by step
  • Factory Pattern - Create objects without specifying exact classes
  • Strategy Pattern - Define algorithms and make them interchangeable

How to Use

Simply ask your AI coding assistant to use the clean-code-react MCP server when working on React code:

Examples

Refactor existing code:

"Refactor this component using clean-code-react mcp"

Build new features:

"Build a user settings page using clean-code-react mcp"

Improve code quality:

"Apply clean-code-react mcp's quality fundamentals to improve this code"

The AI assistant will automatically discover and apply the most appropriate patterns and principles for your specific use case.

Development

# Install dependencies
npm install

# Run in development mode
npm run dev

# Build for production
npm run build

# Run type checking
npm run typecheck

# Run linting
npm run lint

# Inspect server with MCP Inspector (for debugging)
npm run inspect

MCP Inspector

The project includes the MCP Inspector for debugging and development:

npm run inspect

This opens a web interface where you can:

  • Test all available tools interactively
  • Inspect tool schemas and responses
  • Debug server behavior
  • Validate MCP protocol implementation

Architecture

src/
├── patterns/        # Pattern definitions with colocated data
├── tools/           # MCP tool implementations
├── types/           # TypeScript type definitions
├── server.ts        # Core server setup with all tools
└── index.ts         # Entry point with stdio transport

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Ensure all patterns have bad/good examples
  5. Update pattern descriptions and use cases
  6. Submit a pull request

License

MIT