Enables logo extraction from Apple's website, with specialized support for Apple Touch Icons and analysis of logo candidates from apple.com.
Utilizes Axios for HTTP request handling when extracting logos from websites, supporting the core functionality of the logo extraction system.
Leverages Cheerio for HTML parsing and DOM operations when analyzing website content to identify and extract logo elements.
Allows extraction of logo icons from Google website, identifying and retrieving the most appropriate favicon or logo image based on an intelligent scoring system.
Implements Sharp for image processing and optimization of extracted logos, supporting various transformation operations on the retrieved logo files.
Provides specialized support for SVG format logos with prioritization in the scoring system and ability to output optimized SVG files.
Built with TypeScript to provide type-safe development experience for the logo extraction and processing system.
Logo MCP - 基于AI MCP协议的网站Logo提取系统
一个智能的网站Logo提取系统,基于Model Context Protocol (MCP) 构建,能够自动识别并提取网站的Logo图标。
功能特性
- 🔍 智能识别: 支持多种Logo获取方式
- HTML link标签 (favicon, icon)
- Apple Touch Icon
- OpenGraph协议图像
- 页面中的Logo图像元素
- 常见favicon路径检测
- 🎯 智能选择: 当存在多个Logo候选项时,自动选择最符合主视觉的版本
- 基于尺寸、格式、来源的评分系统
- 优先选择SVG矢量格式
- 智能去重和排序
- 🖼️ 格式支持:
- 输入: PNG, JPG, SVG, ICO, WebP, GIF
- 输出: PNG, SVG
- AI优化处理
- ⚡ 错误处理: 完善的错误处理机制,友好的错误提示
安装
使用方法
作为MCP服务器运行
开发模式
MCP工具
1. extract_logo - 提取网站Logo
从指定网站URL提取Logo图标。
参数:
url
(必需): 要提取Logo的网站URLoptimize
(可选): 是否对Logo进行AI优化处理,默认为trueformat
(可选): 输出格式选择 ('png', 'svg', 'both'),默认为'both'size
(可选): 输出图片尺寸(像素),默认为256
示例:
返回结果:
2. analyze_logo_candidates - 分析Logo候选项
分析网站的所有Logo候选项并返回详细信息。
参数:
url
(必需): 要分析的网站URL
示例:
返回结果:
评分系统
系统使用智能评分算法来选择最佳Logo:
Favicon评分 (基础分60)
- 尺寸加分: ≥128px (+30), ≥64px (+20), ≥32px (+10)
- 格式加分: SVG (+20), PNG (+15)
Apple Touch Icon评分 (基础分80)
- 尺寸加分: ≥180px (+20), ≥120px (+15), ≥76px (+10)
Logo图像评分 (基础分50)
- Alt属性: 包含"logo" (+25), "brand" (+15), "company" (+10)
- Class属性: 包含"logo" (+20), "brand" (+15)
- 路径: 包含"logo" (+15), "brand" (+10), SVG格式 (+10)
常见路径评分
/logo.svg
: 95分/logo.png
: 90分/assets/logo.svg
: 90分/apple-touch-icon.png
: 85分/assets/logo.png
: 85分
技术架构
- TypeScript: 类型安全的开发体验
- MCP SDK: Model Context Protocol支持
- Cheerio: HTML解析和DOM操作
- Axios: HTTP请求处理
- Sharp: 图像处理和优化
- URL Parse: URL解析和处理
错误处理
系统包含完善的错误处理机制:
- 网络超时处理 (10秒超时)
- 重定向跟踪 (最多5次)
- 图像格式验证
- 友好的错误消息
- 优雅降级处理
开发
项目结构
开发命令
许可证
MIT License
贡献
欢迎提交Issue和Pull Request来改进这个项目!
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
An intelligent website logo extraction system built on the Model Context Protocol (MCP) that automatically identifies and extracts logo icons from websites.
Related MCP Servers
- -securityAlicense-qualityMCP Tool Server for Logo Generation. This server provides logo generation capabilities using FAL AI, with tools for image generation, background removal, and image scaling.Last updated -170PythonGPL 3.0
- AsecurityAlicenseAqualityA Model Context Protocol server that extracts images from URLs or base64 data and converts them into a format suitable for LLM analysis, allowing AI models to process and understand visual content.Last updated -32939MIT License
- -securityAlicense-qualityA search service based on multiple image APIs and icon generation capabilities, specifically designed for integration with Cursor MCP service. Supports image search, download, and AI-generated icons.Last updated -4PythonMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI models to extract structured data from websites through the extract\_structured\_data tool.Last updated -1259JavaScriptMIT License