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

visual-compare-mcp

v1.5.0

Published

MCP server for precise visual component comparison, alignment analysis, color comparison, border analysis, and constructive feedback

Downloads

79

Readme

Visual Compare MCP

A specialized Model Context Protocol (MCP) server designed for precise visual component comparison and providing constructive feedback about differences between them.

Features

  • Alignment Analysis: Specialized tool for comparing UI alignment and geometric positioning (compareAlignments)
  • General Image Comparison: Comprehensive tool for analyzing any visual differences between images (compareImages)
  • Color Analysis: Specialized tool for detailed color scheme and palette comparison (compareColors)
  • Border Analysis: Specialized tool for analyzing border styles, border-radius, and edge treatments (compareBorders)
  • MCP Protocol Support: Standardized interface for communication with AI models
  • Constructive Feedback: Detailed analysis formatted for processing by other AI models

Installation & Setup

This is an MCP server that integrates with Claude Code.

NPM Installation

  1. Install the package:
npm install visual-compare-mcp
  1. Configure MCP in Claude Code by creating/editing .clauderc or setting environment variable:
{
    "mcpServers": {
        "visual-match": {
            "command": "npx",
            "args": ["visual-compare-mcp"],
            "env": {
                "ANTHROPIC_API_KEY": "your-api-key-here"
            }
        }
    }
}

Usage

The server provides four specialized tools for different types of image comparison:

MCP Tool: compareAlignments

Specialized for UI component alignment analysis.

Parameters:

  • image1 (string): Path or URL to the first image (potentially misaligned UI)
  • image2 (string): Path or URL to the second image (reference UI with correct alignment)

Returns: Analysis focusing on:

  • Vertical and horizontal alignment lines
  • Element positioning and geometric relationships
  • Broken or shifted alignments
  • Pure geometric analysis (excludes colors/typography)

MCP Tool: compareImages

General-purpose image comparison tool that provides comprehensive visual analysis.

Parameters:

  • image1 (string): Path or URL to the first image
  • image2 (string): Path or URL to the second image

Returns: Comprehensive analysis including:

  • Visual differences and similarities
  • Content variations
  • Layout and structural changes
  • Color and styling differences
  • UI/UX implications

MCP Tool: compareColors

Specialized tool for detailed color analysis and comparison.

Parameters:

  • image1 (string): Path or URL to the first image
  • image2 (string): Path or URL to the second image

Returns: Detailed color analysis including:

  • Automatic color palette extraction from images (using color-thief-node)
  • Specific color values and hex codes for dominant colors
  • Color palette differences with exact hex values
  • Contrast and brightness variations
  • Saturation differences
  • Background vs foreground color changes
  • Overall color theme differences

MCP Tool: compareBorders

Specialized tool for analyzing border styles and edge treatments.

Parameters:

  • image1 (string): Path or URL to the first image
  • image2 (string): Path or URL to the second image

Returns: Detailed border analysis including:

  • Border thickness and styles (solid, dashed, dotted)
  • Border-radius values and corner treatments
  • Border colors and visual effects
  • Shadow effects and outlines
  • Edge smoothness and anti-aliasing
  • Specific measurements (e.g., "4px border-radius", "2px solid border")

Optional: HTTP API

For development and testing purposes, the server also provides an HTTP API:

npm start  # Starts HTTP server on http://localhost:3000

POST /compareImages

Request: multipart/form-data with two image files

  • image1 (file): First component image
  • image2 (file): Second component image

Example:

curl -X POST http://localhost:3000/compareImages \
  -F "[email protected]" \
  -F "[email protected]"

Use Cases

  • Design to Code: Convert designs to functional components
  • Quality Assurance: Verify implementation matches design specifications
  • Iterative Development: Progressive component refinement
  • Cross-platform Consistency: Ensure uniform appearance across platforms

Requirements

  • Node.js ≥ 18.0.0
  • Supported image formats: PNG, JPG, WEBP

License

MIT

Contributing

Contributions are welcome! Please read our contributing guidelines and submit pull requests to our repository.

Support

For issues and feature requests, please visit our GitHub repository.