Skip to main content

图片信息查看 MCP

查看图片详细信息的 MCP 服务器,支持多种图片格式的元数据查询。

功能特性

  • 基本信息:文件路径、大小、尺寸、格式、颜色模式
  • EXIF 数据:拍摄设备、日期、曝光参数、GPS 坐标等(JPEG/TIFF)
  • 动画信息:帧数、时长、循环次数等(GIF/WebP 动画)
  • 格式特有信息:PNG 文本块等

支持的格式

  • JPEG / JPG
  • PNG
  • GIF(包含动画信息)
  • WebP(包含动画信息)
  • TIFF
  • BMP
  • ICO

安装

cd /path/to/图片-查看图片信息
uv sync

使用方法

作为 MCP 服务器运行

uv run image-info-mcp

Claude Desktop 配置

{
  "mcpServers": {
    "image-info": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/图片-查看图片信息",
        "run",
        "image-info-mcp"
      ]
    }
  }
}

工具

get_image_info

获取图片的详细信息。

参数:

  • file_path: 图片文件路径

返回示例(JPEG):

{
  "file_path": "/path/to/photo.jpg",
  "file_name": "photo.jpg",
  "file_size_bytes": 2048576,
  "format": "JPEG",
  "size": {
    "width": 4000,
    "height": 3000
  },
  "color_mode": "RGB",
  "has_transparency": false,
  "dpi": [300, 300],
  "exif": {
    "camera_make": "Canon",
    "camera_model": "EOS R5",
    "date_time_original": "2024:01:15 14:30:00",
    "exposure_time": 0.004,
    "f_number": 2.8,
    "iso": 100,
    "focal_length": 50.0,
    "gps": {
      "latitude": 31.230416,
      "longitude": 121.473701
    }
  }
}

返回示例(GIF):

{
  "file_path": "/path/to/animation.gif",
  "file_name": "animation.gif",
  "file_size_bytes": 512000,
  "format": "GIF",
  "size": {
    "width": 800,
    "height": 600
  },
  "color_mode": "P",
  "has_transparency": true,
  "animation": {
    "is_animated": true,
    "frame_count": 24,
    "frame_durations_ms": [100, 100, ...],
    "total_duration_ms": 2400,
    "total_duration_seconds": 2.4,
    "loop_count_raw": 0,
    "playback_mode": "infinite_loop"
  }
}

许可证

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcpcn_image_info_mcp-0.1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcpcn_image_info_mcp-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file mcpcn_image_info_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: mcpcn_image_info_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for mcpcn_image_info_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a985d67e67922f5435f39612fa9bad739d82b6652245427664a0294dd8d58ab5
MD5 179e1bade1468cfa84b5fe2afd1dda9a
BLAKE2b-256 2d4747215ec4d020d5991cff07f7297747f0a11c772872353beb2382770a646e

See more details on using hashes here.

File details

Details for the file mcpcn_image_info_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcpcn_image_info_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1a54132494fad6bf8f04ef9c314fe24cf94cfc05e8552c2e42241dd8c6e6b6cb
MD5 c6c5c3c7a12a6d41df210125febf98c1
BLAKE2b-256 4d3a43a076af6b6f5f78df066bec96fcc1a58ae3be9d12eaaf2ce36e518a0e26

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page