Referenced in example URLs for image fetching, demonstrating compatibility with Brave search image results.
Provides a donation link to support the developers through the Buy Me A Coffee platform.
Integrates with Windsurf (a Codeium component) through configuration in the Windsurf mcp_config.json file.
Supports processing images from numpy arrays, allowing direct integration with numpy-based image processing workflows.
Built on Python 3.10+ with support for virtual environments and package management through uv.
MCP Server - Image
A Model Context Protocol (MCP) server that provides tools for fetching and processing images from URLs, local file paths, and numpy arrays. The server includes a tool called fetch_images that returns images as base64-encoded strings along with their MIME types.
Support Us
If you find this project helpful and would like to support future projects, consider buying us a coffee! Your support helps us continue building innovative AI solutions.
Your contributions go a long way in fueling our passion for creating intelligent and user-friendly applications.
Table of Contents
Features
Fetch images from URLs (http/https)
Load images from local file paths
Specialized handling for large local images
Automatic image compression for large images (>1MB)
Parallel processing of multiple images
Proper MIME type mapping for different file extensions
Comprehensive error handling and logging
Prerequisites
Python 3.10+
uv package manager (recommended)
Installation
Clone this repository
Create and activate a virtual environment using uv:
Install dependencies using uv:
Running the Server
There are two ways to run the MCP server:
1. Direct Method
To start the MCP server directly:
2. Configure for Windsurf/Cursor
Windsurf
To add this MCP server to Windsurf:
Edit the configuration file at ~/.codeium/windsurf/mcp_config.json
Add the following configuration:
Cursor
To add this MCP server to Cursor:
Open Cursor and go to Settings (Navbar → Cursor Settings)
Navigate to Features → MCP Servers
Click on + Add New MCP Server
Enter the following configuration:
Available Tools
The server provides the following tools:
fetch_images: Fetch and process images from URLs or local file paths Parameters: image_sources: List of URLs or file paths to images Returns: List of processed images with base64 encoding and MIME types
Usage Examples
You can now use commands like:
"Fetch these images: [list of URLs or file paths]"
"Load and process this local image: [file_path]"
Examples
Debugging
If you encounter any issues:
Check that all dependencies are installed correctly
Verify that the server is running and listening for connections
For local image loading issues, ensure the file paths are correct and accessible
For "Unsupported image type" errors, verify the content type handling
Look for any error messages in the server output
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
A Model Context Protocol server that enables fetching and processing images from URLs, local file paths, and numpy arrays, returning them as base64-encoded strings with proper MIME types.
Related MCP Servers
- AsecurityAlicenseAqualityModel Context Protocol server for fetching web content and processing images. This allows Claude Desktop (or any MCP client) to fetch web content and handle images appropriately.Last updated -11,80029MIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that provides web content fetching and conversion capabilities.Last updated -4562MIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that extracts images from URLs or base64 data and converts them into a format suitable for LLM analysis, allowing AI models to process and understand visual content.Last updated -34714MIT License
- AsecurityFlicenseAqualityA Model Context Protocol server that manages desktop images, providing functionality to count, list, and compress image files stored on the desktop.Last updated -303