Remix Icon MCP logo

Remix Icon MCP

by FradSer

A powerful icon search and recommendation service built on Cloudflare Workers. It provides intelligent icon discovery through advanced semantic matching algorithms.

View on GitHub

Last updated: N/A

Remix Icon MCP

English | 简体中文

A powerful icon search and recommendation service built on Cloudflare Workers, providing intelligent icon discovery through advanced semantic matching algorithms.

Features

  • Smart Icon Search: Find icons based on natural language descriptions using multiple similarity algorithms
  • Multi-language Support: Optimized for both English and Chinese text input
  • Category Management: Browse and search icons by categories
  • Advanced Matching: Uses multiple algorithms for better search results:
    • Jaccard Similarity
    • N-gram Matching
    • Category Matching
    • Exact Matching
    • Levenshtein Distance
    • Name Matching
    • Tag-based Matching
  • Inverted Index: Fast preliminary search using an inverted index
  • Caching: LRU caching for improved performance

API Endpoints

Find Icons

findIcons(description: string): ResponseContent[]

Finds icons based on user description, returns top 5 recommendations with similarity scores.

Get Icon Categories

getIconCategories(): ResponseContent[]

Returns a list of all available icon categories.

Find Icons by Category

findIconsByCategory(description: string, category: string): ResponseContent[]

Searches for icons within a specific category based on description, returns top 5 recommendations.

Project Structure

.
├── src/                   # Source code directory
│   ├── index.ts           # Main entry point
│   ├── data/              # Data files including icon catalog
│   ├── domain/            # Domain models and services
│   │   ├── icon/          # Icon domain models
│   │   └── search/        # Search functionality
│   ├── infrastructure/    # Infrastructure components
│   │   ├── logging/       # Logging utilities
│   │   └── result/        # Result handling
│   └── utils/             # Utility functions
│       ├── similarity/    # Similarity calculation algorithms
│       └── text/          # Text processing utilities
├── tests/                 # Test files
│   ├── integration/       # Integration tests
│   └── unit/              # Unit tests
└── wrangler.jsonc         # Cloudflare Workers configuration

Technical Details

  • Built on Cloudflare Workers platform
  • Uses LRU caching for performance optimization
  • Implements weighted multi-algorithm similarity scoring
  • Supports both character and word-level matching for Chinese text
  • Configurable similarity thresholds and weights
  • Uses inverted index for faster preliminary search

Performance Optimization

  • Implements caching with LRU (Least Recently Used) strategy
  • Maximum cache size: 2000 entries
  • Minimum score threshold: 0.08
  • Optimized similarity calculations for both English and Chinese text
  • Two-tier search strategy: inverted index for fast preliminary results, followed by detailed scoring

Response Format

All endpoints return responses in the following format:

interface ResponseContent {
    type: 'text';
    text: string;
}

Development

This project is built using TypeScript and Cloudflare Workers. The main functionality is implemented in the RemixIconMCP class which extends WorkerEntrypoint.

Setup and Deployment

# Install dependencies
npm install

# Run development server
npm run dev

# Deploy to Cloudflare Workers
npm run deploy

# Run tests
npm run test

License

MIT License