fetch_imagesLABSCO SUMMARY
The step between "here is a link" and the model seeing the picture.
It handles the parts that otherwise break: several images at once, local files and remote URLs in the same request, and oversized files compressed before they arrive rather than after they fail.
What it is
A fetch-and-prepare step for images. It takes a mixed list of web URLs and local file paths, retrieves them in parallel, compresses the large ones, and hands each back as a base64 string with its MIME type, so the model receives something it can actually look at.
What you get
fetch_images— takesimage_sources, a list of URLs or file paths, and returns each processed image as base64 with its MIME type- Both sources in one call: http and https URLs alongside local paths, mixed freely in the same list
- Automatic compression for images larger than 1MB, and specialised handling for large local files
- Parallel processing across the list, and MIME types mapped from the file extension
Requirements
Python 3.10+ and the uv package manager. Clone the repository and point your client at uv --directory <YOUR_PATH_TO_MCP_IMAGES> run mcp_image.py; uv installs the dependencies declared in pyproject.toml on first launch. The README's uv pip install -r requirements.txt step does not apply, because the repository has no requirements.txt. When a fetch fails, the README's checklist is the right order: confirm the dependencies installed, then that local paths are correct and readable, then whether the content type is one the server maps.
Setup effort
Build from source
USE CASES
Asking about images you found online
Pass the URLs and get them back as base64 with types attached, so the model reads the images rather than the links.
Bringing a local screenshot into the chat
Give the file path directly — no upload step, and large files are compressed on the way through.
Comparing several images at once
Send the whole list in one call; they are fetched in parallel rather than one at a time.
Mixing sources in one question
URLs and local paths go in the same list, so a comparison between something on disk and something on the web is a single request.
1 tool
Listed in project docs. Your client may show a different list.
BEFORE YOU INSTALL
What to know first
Tools you get
1 tool named in the project's documentation.
Requires
Python 3.10+
Where it runs
Both documented clients run the server on your machine.
INSTALLATION
Connect your client
You clone this one yourself.
Server setup
git clone https://github.com/IA-Programming/mcp-images.gitMCP Clients
Windsurf, Cursor
{
"mcpServers": {
"image": {
"command": "uv",
"args": [
"--directory",
"<YOUR_PATH_TO_MCP_IMAGES>",
"run",
"mcp_image.py"
]
}
}
}