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

Metadata

Release files for mcpcn-image-info-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcpcn-image-info-mcp 0.1.0
File Size Uploaded
mcpcn_image_info_mcp-0.1.0.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcpcn-image-info-mcp 0.1.0
File Interpreter ABI Platform
mcpcn_image_info_mcp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.6 kB

Release files / mcpcn_image_info_mcp-0.1.0.tar.gz

Download URL mcpcn_image_info_mcp-0.1.0.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a985d67e67922f5435f39612fa9bad739d82b6652245427664a0294dd8d58ab5
BLAKE2b-256 checksum
How to use checksums
2d4747215ec4d020d5991cff07f7297747f0a11c772872353beb2382770a646e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / mcpcn_image_info_mcp-0.1.0-py3-none-any.whl

Download URL mcpcn_image_info_mcp-0.1.0-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1a54132494fad6bf8f04ef9c314fe24cf94cfc05e8552c2e42241dd8c6e6b6cb
BLAKE2b-256 checksum
How to use checksums
4d3a43a076af6b6f5f78df066bec96fcc1a58ae3be9d12eaaf2ce36e518a0e26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page