Skip to main content
Glama

logo-mcp

一个智能Logo提取和分析的MCP(Model Context Protocol)服务器,支持从网站URL自动识别并提取Logo图标,并提供详细的Logo分析功能。

功能特性

  • 多源识别:支持从favicon、Apple Touch图标、OpenGraph图像、CSS类名等多种方式提取Logo

  • 智能评分:自动评估候选Logo质量,选择最佳版本

  • 格式支持:支持PNG、JPG、SVG等多种图像格式

  • 尺寸优化:自动选择合适尺寸的Logo版本

  • 详细信息:提供Logo尺寸、格式、类型等完整信息

  • 多候选比较:显示所有可能的Logo候选项及其评分

  • 质量评估:自动评估Logo图像质量和可用性

  • 快速URL获取:支持直接获取最佳Logo的URL地址

Related MCP server: Logo.dev MCP Server

安装使用

作为MCP服务器使用

  1. 安装依赖:

npm install @lucianaib/logo-mcp
  1. 在MCP客户端配置中添加:

{
  "mcpServers": {
    "logo-mcp": {
      "command": "npx",
      "args": ["@lucianaib/logo-mcp"]
    }
  }
}

![CodeBuddy 配置成功示例.png](src\CodeBuddy 配置成功示例.png)

开发环境设置

  1. 克隆仓库:

git clone https://github.com/lfrbmw/Logo-MCP.git
cd Logo-MCP
  1. 安装依赖:

npm install
  1. 构建项目:

npm run build
  1. 启动开发服务器:

npm run dev

MCP工具

使用示例:

使用mcp提取 https://juejin.cn/的 Logo

实战找到logo.png

get_best_logo_url

从网站提取并返回最佳Logo的URL地址,适用于只需要获取最佳Logo URL的场景

参数:

  • url (必需): 要分析的网站URL

示例:

{
  "name": "get_best_logo_url",
  "arguments": {
    "url": "https://www.google.com"
  }
}

分析Logo的基本信息(尺寸、格式、质量等),支持onlyBestUrl参数只返回最佳Logo的URL

参数:

  • url (必需): 要分析的网站URL

  • onlyBestUrl (可选): 是否只返回最佳Logo的URL,默认为false

示例:

{
  "name": "analyze_logo",
  "arguments": {
    "url": "https://www.github.com",
    "onlyBestUrl": false
  }
}

技术架构

核心模块

  • LogoExtractor: 负责从网站提取Logo候选项,实现多源识别和智能评分算法

  • ImageProcessor: 提供图像处理功能,包括格式转换、尺寸调整和质量增强

依赖库

  • @modelcontextprotocol/sdk: MCP协议支持,提供服务器和通信框架

  • axios: HTTP请求处理,用于获取网站内容和下载Logo图像

  • cheerio: HTML解析,用于从网页中提取Logo相关信息

  • sharp: 图像处理,提供格式转换、尺寸调整和增强功能

  • image-size: 图像尺寸检测,用于获取Logo图像的尺寸信息

  • url-parse: URL解析,用于处理和规范化网站URL

  • mime-types: MIME类型检测,用于识别图像文件格式

1. 多源候选提取

  • Favicon链接 (<link rel="icon">)

  • Apple Touch图标 (<link rel="apple-touch-icon">)

  • OpenGraph图像 (<meta property="og:image">)

  • CSS类名识别 (.logo, #logo, .brand等)

  • 品牌相关图像

2. 智能评分算法

  • 类型权重:Logo类名 > Apple Touch > Favicon > 品牌图像 > OG图像

  • 尺寸评分:偏好32-512px的正方形或接近正方形图像

  • 质量检测:过滤损坏或空白图像

3. 最佳选择

根据综合评分自动选择最符合主视觉的Logo版本

1. 多源提取

  • HTML解析: 从页面meta标签提取favicon、apple-touch-icon等

  • CSS分析: 通过类名和ID识别可能的Logo元素

  • OpenGraph: 解析OG图像标签获取社交媒体使用的Logo

  • 智能检测: 识别页面上可能的品牌标识元素

2. 候选评分

  • 类型权重: 根据来源类型分配权重(如明确的logo类名权重更高)

  • 尺寸分析: 评估图像尺寸是否适合作为Logo(32px-512px范围内)

  • 宽高比: 优先选择接近正方形的图像

  • 质量检测: 检查图像是否损坏或过于模糊

3. 结果输出

  • 详细分析: 提供所有候选项的详细信息及评分

  • 最佳推荐: 根据综合评分推荐最合适的Logo

  • 快速获取: 支持直接返回最佳Logo的URL地址

错误处理

  • 网络错误:超时重试和友好提示

  • 图像损坏:自动检测和跳过

  • 格式不支持:清晰的错误信息

  • 无Logo情况:返回友好的无结果提示

性能优化

  • 并发处理:多候选Logo并行验证

  • 缓存机制:避免重复下载

  • 内存管理:及时释放图像缓冲区

  • 超时控制:防止长时间阻塞

贡献指南

  1. Fork项目

  2. 创建功能分支 (git checkout -b feature/AmazingFeature)

  3. 提交更改 (git commit -m 'Add some AmazingFeature')

  4. 推送到分支 (git push origin feature/AmazingFeature)

  5. 打开Pull Request

许可证

本项目采用MIT许可证 - 查看 LICENSE 文件了解详情

作者

支持

如果您遇到问题或有功能建议,请在 GitHub Issues 中提出。


Logo MCP - 让Logo提取变得简单智能 🚀

Available Tools

2 tools
get_best_logo_urlB

从网站提取并返回最佳Logo的URL地址,适用于只需要获取最佳Logo URL的场景

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes要分析的网站URL

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. The description mentions extraction and returning a URL, but doesn't disclose important behavioral traits: what '最佳' (best) means (criteria for selection), whether this makes network requests, potential rate limits, error handling, or what happens if no logo is found. For a tool that presumably performs web scraping/analysis with zero annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise - a single sentence in Chinese that directly states the purpose and usage context. Every word earns its place with no redundancy or unnecessary elaboration. It's front-loaded with the core functionality.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that this is a tool that performs web analysis/extraction with no annotations and no output schema, the description is incomplete. It doesn't explain what constitutes '最佳' (best) logo, what format the returned URL will be in, potential limitations or requirements (e.g., the website must be accessible), or error conditions. For a tool with this complexity and no structured metadata, the description should provide more contextual information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% (the single parameter 'url' has a clear description in the schema: '要分析的网站URL' - website URL to analyze). The tool description doesn't add any parameter-specific information beyond what's already in the schema. With high schema coverage, the baseline is 3 even without additional param details in the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '从网站提取并返回最佳Logo的URL地址' (extract and return the best logo URL from a website). It specifies the verb ('提取并返回' - extract and return) and resource ('Logo的URL地址' - logo URL address). However, it doesn't explicitly differentiate from the sibling tool 'analyze_logo' - it only says it's '适用于只需要获取最佳Logo URL的场景' (suitable for scenarios where only the best logo URL is needed), which is somewhat implied differentiation but not explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides some usage guidance: '适用于只需要获取最佳Logo URL的场景' (suitable for scenarios where only the best logo URL is needed). This implies when to use this tool (when you just need the URL) versus potentially more comprehensive analysis with 'analyze_logo', but it's not explicit about when NOT to use it or clear alternatives. No prerequisites or exclusions are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv1.0.0
    • First observedanalyze_logo
    • First observedget_best_logo_url

TDQS

B3/5.0
Disambiguation2/5

The two tools have significant functional overlap, as both can return the best logo URL. The analyze_logo tool provides broader analysis but includes the best URL functionality, while get_best_logo_url is specifically for that purpose, creating ambiguity about when to use each tool.

Naming Consistency4/5

Both tools follow a clear verb_noun naming pattern (analyze_logo, get_best_logo_url), which is consistent and readable. The minor deviation is that one uses 'analyze' while the other uses 'get', but this reflects their different primary purposes.

Tool Count2/5

With only 2 tools, the server feels under-scoped for a logo analysis domain. This minimal set lacks operations for common needs like logo validation, format conversion, or batch processing, making it too thin for robust functionality.

Completeness2/5

The toolset is severely incomplete for logo analysis. It misses essential operations such as logo validation, format conversion (e.g., to PNG/SVG), resizing, color extraction, or batch processing, leaving significant gaps that will limit agent effectiveness.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/OnePieceLwc/logo-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server