mcp-image-reader
Allows reading and viewing images hosted on Bilibili by sending an appropriate Referer to avoid hotlink protection.
Allows reading and viewing images hosted on Pixiv by sending an appropriate Referer to avoid hotlink protection.
Allows reading and viewing images hosted on Xiaohongshu by sending an appropriate Referer to avoid hotlink protection.
Allows reading and viewing images hosted on Zhihu by sending an appropriate Referer to avoid hotlink protection.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-image-reader
An MCP server that lets AI agents actually see images — local files and remote URLs alike.
Most agent file-reading tools give up on binary data: they either refuse the file or hand the
model a wall of mojibake. The MCP protocol itself has a native ImageContent block (base64 +
mimeType); when a tool returns an Image, the client routes it into the model's vision input
instead of its text input. This server does exactly that, plus the three things that make it
usable in practice:
Re-encodes anything Pillow can open to JPEG and caps the long edge, so one screenshot doesn't eat your whole context window.
Sends a plausible
Referer, so hotlink-protected CDNs stop answering with 403.Optional directory allowlist, to narrow "can read any file on disk" down to what you intend.
Install
pip install mcp-image-readerOr skip installing and let uvx fetch it on demand:
uvx mcp-image-readerRelated MCP server: Atlas Vision MCP
Wire it into a client
Kiro (.kiro/settings/mcp.json), Claude Desktop, Cursor, Windsurf — all use the same stdio shape:
{
"mcpServers": {
"image-reader": {
"command": "uvx",
"args": ["mcp-image-reader"],
"autoApprove": ["view_image", "view_images", "list_images", "download_images"]
}
}
}If you installed with pip, set "command": "mcp-image-reader" and leave args empty.
Clients that use disabled/env keys (Kiro) or alwaysAllow (some others) can add them as usual.
Tools
Tool | What it does |
| Read one image: absolute local path or |
| Read a batch; a failed item is reported inline, the rest still come through |
| List image files with sizes, so the model can pick what to open |
| Save remote images locally, |
max_side defaults to 1024, which is plenty for judging composition, palette, lighting and
texture. Push it to ~1600 when you need fine detail such as small text. Values above 4096 are
clamped; quality is clamped to 1–95.
Configuration
Variable | Default | Purpose |
| unset (no limit) | Allowlist for local reads; separate paths with |
| auto-detected | Force a specific |
| Chrome UA | Custom |
|
| Per-image download ceiling, in bytes |
|
| HTTP timeout, in seconds |
Built-in Referer hints cover a few CDNs that validate against the site rather than their own
host (Xiaohongshu, Weibo, Zhihu, Pixiv, Bilibili, Douyin). Anything else falls back to the image
URL's own origin.
Security
By default this server can read any file the process running it can read, and can issue
requests to arbitrary http(s) addresses. That's fine for local personal use. If the client
isn't fully trusted, or the server runs somewhere shared, set an allowlist:
"env": { "IMAGE_READER_ALLOW_DIRS": "/home/me/assets:/home/me/screenshots" }The Referer handling exists so that normal access to publicly reachable images isn't broken by
hotlink checks. It is not a way around authentication or authorization. Read only content you're
entitled to read, and respect the terms of the sites you fetch from.
Development
pip install -e ".[dev]"
pytest # fully offline, no network needed
ruff check .License
MIT
This server cannot be deployed
Related MCP Connectors
Convert and resize static image URLs to WebP, PNG or JPEG for uploads and agent workflows.
Image & PDF tools for AI agents: compress, convert, resize, PDF, AI vision, pipeline.
Generate images, GIFs, videos, and PDFs from HTML, URLs, or templates — from your AI agent.
AI image + video generation for agents: --flag prompt DSL, async generate/poll, x402 pay-per-use.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables text-only LLMs to analyze images by routing them to an OpenAI-compatible vision backend, supporting local files, URLs, and data URLs.22 npmMIT
- AlicenseAqualityBmaintenanceEnables text-only coding agents to analyze local images using a dedicated vision provider, returning markdown and structured JSON evidence for screenshots, diagrams, UI mockups, and error captures.11138 npm11MIT
- AlicenseAqualityDmaintenanceEnables AI agents to analyze images via Gemini vision models, supporting local paths, URLs, and data URLs with custom prompts.2MIT
- AlicenseAqualityAmaintenanceEnables converting images (JPEG, PNG, GIF, WebP) into text descriptions using OpenAI-compatible vision models, with support for both local files and URLs.221 npmMIT