Skip to main content
Glama
README.md
# 🎨 Aicon - AI Icon Search & Generation

> **MCP Server + API** for intelligent icon management with AI-powered generation and web-based authentication.

## πŸš€ Quick Start

### For Users
```bash
# 1. Install the MCP server
npm install -g aicon-mcp

# 2. Add to Claude Desktop (claude_desktop_config.json)
{
  "mcpServers": {
    "aicon": {
      "command": "aicon",
      "args": []
    }
  }
}

# 3. Authenticate in Claude Desktop
# Use: login({action: "login"}) to start web authentication
```

### For Developers/Admins
See **[DEPLOY.md](DEPLOY.md)** for complete deployment instructions.

---

## πŸ“‹ What This Does

- **πŸ” Search Icons**: Find from 275,000+ existing icons (Material, Heroicons, Lucide, etc.)
- **🎨 Generate Icons**: Create custom icons using AI (powered by Runware.ai)
- **πŸ“₯ Download Icons**: Save as SVG or PNG with background removal
- **πŸ” Web Authentication**: Claude Code-style login flow with subscription plans
- **πŸ“Š Usage Tracking**: Monitor API usage and rate limits
- **πŸ”‘ Secure**: API key authentication with permission controls

---

## πŸ” Authentication System

### **Web-Based Login Flow**
1. Run `login({action: "login"})` in Claude Desktop
2. Browser opens automatically for authentication
3. Login/register with credentials  
4. Select subscription plan (Free/Pro/Enterprise)
5. API key generated and saved automatically
6. All icon tools now available!

### **Subscription Plans**
- **πŸ†“ FREE**: 100 searches/month, SVG downloads
- **πŸš€ PRO**: Unlimited searches + AI generation ($9/month)
- **🏒 ENTERPRISE**: Everything unlimited + API access ($29/month)

---

## πŸ—οΈ Architecture

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   MCP Server    │───▢│   Backend API   │───▢│   External APIs β”‚
β”‚   (Local)       β”‚    β”‚   (Vercel)      β”‚    β”‚ Iconify+Runware β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚                        β”‚                        β”‚
        β–Ό                        β–Ό                        β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Claude Desktop  β”‚    β”‚   Supabase DB   β”‚    β”‚  Generated SVGs β”‚
β”‚   (AI Client)   β”‚    β”‚ (Usage & Keys)  β”‚    β”‚   (./Aicon/)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

---

## πŸ“¦ Components

### 1. **MCP Server** (`/src/`)
- **Tools**: 6 MCP tools including web authentication
- **Config**: Multi-level configuration (env, user, project)
- **Storage**: Local file management for downloaded icons
- **Client**: HTTP client with request tracking

### 2. **Backend API** (Deployed to Vercel)
- **Endpoints**: REST API for icon search, generation, usage
- **Auth**: Production API key system with permissions
- **Database**: Supabase integration for usage tracking
- **Processing**: Image manipulation (Sharp, Potrace)

---

## πŸ› οΈ Development

### MCP Server
```bash
npm install
npm run dev        # Development mode
npm run build      # Build TypeScript
npm run typecheck  # Type checking
```

---

## 🎯 Usage Examples

### Authenticate First
```javascript
// Start web authentication in Claude Desktop
login({action: "login"})

// Check authentication status
login({action: "status"})

// View subscription plans
login({action: "plans"})
```

### Search for Icons
```javascript
// Search icons after authentication
search_icons({
  query: "home",
  library: "heroicons", 
  style: "outline"
})
```

### Generate Custom Icons
```javascript
// Generate AI icons (Pro/Enterprise plans)
generate_icons({
  subject: "rocket ship",
  context: "space app",
  style: "filled",
  colors: "blue gradient"
})
```

### Download Icons
```javascript
// Download icons in various formats
fetch_icons({
  id: "heroicons:home",
  type: "iconify",
  format: "svg"
})
```

---

## πŸ“Š Features

- βœ… **275,000+ Icons** from 200+ open source icon libraries
- βœ… **AI Generation** with background removal
- βœ… **Web Authentication** Claude Code-style login flow
- βœ… **Subscription Plans** Free/Pro/Enterprise tiers
- βœ… **Format Support** (SVG, PNG)
- βœ… **Rate Limiting** with usage tracking  
- βœ… **Production Ready** with comprehensive tests
- βœ… **Claude Integration** via MCP protocol

---

## πŸ“„ License

MIT License - see LICENSE file for details.

TDQS

C2.8/5.0

Scored across 1 tool

Disambiguation5/5

With only a single tool, there is no possibility of confusion between tools. The purpose of 'login' is clear and distinct within its narrow scope.

Naming Consistency5/5

The single tool name 'login' is a clear, conventional verb that is easy to understand. There are no other tools to create inconsistencies or mixed naming conventions.

Tool Count2/5

A single tool is too few for a server that promises 'premium features' and implies an underlying application surface. The server appears to offer authentication only, leaving core functionality unexposed.

Completeness1/5

The tool surface is severely incomplete. Only authentication is available; there are no tools to perform any actual premium functions, data operations, or other workflows that the login is meant to unlock.

Maintenance

ActivityInactive
ResponsivenessNo issues