Token导航 LogoToken导航TokenDH.com
Image Analysis MCP logo
运维云端stdio官方级别未说明来源级核验

Image Analysis MCP

MCP Server

一个全面的只读图像分析MCP服务器,为Claude提供详细的图像检查能力。

工具数

0

提示词数

0

GitHub Stars

4

资源数

0
图像分析PythonClaudeClaude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

jfdasher

提供方

jfdasher

最后核验

2026/5/17 20:22

运行时

Docker

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

docker run --rm image-analysis-mcp:latest python -c "import image_analysis_mcp; print('✓ OK')"

详细介绍

图像分析MCP服务器

全面 只读的 图像分析MCP(模型上下文协议)服务器,为Claude提供详细的图像检查功能。

特性

  • 元数据和EXIF提取:相机设置、GPS、时间戳等
  • 直方图分析:带统计的RGB和亮度直方图
  • 音调分析:阴影、中间色调、高光、动态范围和剪裁检测
  • 颜色分析:主色、色温、饱和度和偏色检测
  • 空间特征:锐度评分、噪声估计、边缘密度和模糊检测
  • 频率分析:基于FFT的细节级别评估(可选)
  • 预览生成:Base64编码预览图像(可选)

支持格式

标准格式

  • JPEG(.jpg、.JPEG)
  • PNG(.PNG)
  • TIFF(.tif、.TIFF)
  • WebP(.WebP)

RAW格式

  • 佳能RAW(.cr2、.cr3)
  • 尼康RAW(.nef)
  • 索尼RAW(.arw)
  • Adobe DNG(.DNG)
  • 富士RAW(.raf)
  • 奥林巴斯RAW(.orf)

安装

选项1:Docker(推荐)

最简单的入门方法-不需要Python设置!

# Build the Docker image
cd image_analysis
docker build -t image-analysis-mcp:latest .

# Test it works
docker run --rm image-analysis-mcp:latest python -c "import image_analysis_mcp; print('✓ OK')"

医生.md 查看完整的Docker文档。

选项2:诗歌

# Prerequisites: Python 3.12+, Poetry
cd image_analysis

# Install dependencies
poetry install

# Activate the virtual environment
poetry shell

选项3:pip

# Prerequisites: Python 3.12+
cd image_analysis

# Install the package
pip install -e .

用法

运行MCP服务器

服务器可以直接运行:

# Using Poetry
poetry run image-analysis-mcp

# Or if in activated virtual environment
image-analysis-mcp

Claude桌面配置

添加到您的Claude Desktop配置文件(claude_desktop_config.json):

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json 视窗: %APPDATA%\Claude\claude_desktop_config.json Linux: ~/.config/Claude/claude_desktop_config.json

使用Docker(推荐)

{
  "mcpServers": {
    "image-analysis": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-v",
        "/path/to/your/images:/images:ro",
        "image-analysis-mcp:latest"
      ]
    }
  }
}

然后参考图像如下 /images/photo.jpg 在克劳德。

用诗

{
  "mcpServers": {
    "image-analysis": {
      "command": "poetry",
      "args": ["run", "image-analysis-mcp"],
      "cwd": "/absolute/path/to/image_analysis"
    }
  }
}

使用pip(全局安装)

{
  "mcpServers": {
    "image-analysis": {
      "command": "image-analysis-mcp"
    }
  }
}

可用工具

1. get_metadata

快速元数据和EXIF提取,无需加载完整图像数据。

参数:

  • filepath (str):图像文件的路径

例子:

What camera was used for IMG_1234.CR2?

2. get_histogram

使用通道统计提取RGB和亮度直方图。

参数:

  • filepath (str):图像文件的路径
  • process_raw (bool,可选):处理RAW文件(默认值:True)

例子:

Show me the histogram for landscape.jpg

3. analyze_image

全面的图像分析,包括所有属性。

参数:

  • filepath (str):图像文件的路径
  • include_frequency (bool,可选):包括FFT分析(默认值:False)
  • include_preview (bool,可选):生成预览图像(默认值:False)
  • preview_max_dimension (int,可选):预览最大大小(默认值:1920)
  • preview_format (str,可选):“JPEG”、“PNG”或“WEBP”(默认为“JPEG”)
  • preview_quality (int,可选):质量1-100(默认值:85)
  • process_raw (bool,可选):处理RAW文件(默认值:True)

例子:

Analyze photo.jpg and tell me if it's sharp enough for printing
Analyze this RAW file and show me a preview

建筑

此服务器遵循 完全无国籍 架构:

  • 每个工具调用都是独立的
  • 图像被加载、分析并立即丢弃
  • 无缓存或会话状态
  • 可预测和可重复的结果

演出

现代硬件的典型性能:

操作2MP图像12MP图像50MP图像
get_metadata10ms15ms25ms
get_histogram50ms150ms600ms
analyze_image200毫秒800毫秒3000毫秒
analyze_image (带预览)300ms1100ms4000ms
analyze_image (带FFT)500ms2000ms8000ms

对话示例

检查图像质量

User: Is wedding_photo.jpg sharp enough for a large print?
Claude: [Uses analyze_image to check sharpness, noise, and resolution]

暴露分析

User: Is this sunset photo overexposed?
Claude: [Uses analyze_image to check histogram and clipping]

颜色分析

User: What are the dominant colors in this landscape?
Claude: [Uses analyze_image to extract dominant colors and temperature]

元数据提取

User: What camera settings were used for IMG_5678.NEF?
Claude: [Uses get_metadata to extract EXIF data]

错误处理

服务器提供明确的错误消息:

  • FILE_NOT_FOUND:文件不存在
  • PERMISSION_DENIED:无法读取文件
  • UNSUPPORTED_FORMAT:不支持格式
  • CORRUPTED_FILE:文件已损坏
  • OUT_OF_MEMORY:图像太大
  • INVALID_PARAMETER:参数值错误
  • RAW_PROCESSING_FAILED:RAW转换失败

发展

运行测试

poetry run pytest

代码格式化

poetry run black src/

类型检查

poetry run mypy src/

许可证

本项目按原样提供,供Claude Desktop和MCP使用。

作者

吉姆·达舍尔

版本

1.0.0-2025年10月28日

目录标签

目录标签

图像分析PythonClaude本地部署元数据提取直方图分析色调分析颜色分析空间属性分析

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Docker

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP