- Home
- MCP servers
- Image
Image
- python
17
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"ia-programming-mcp-images": {
"command": "uv",
"args": [
"run",
"python",
"mcp_image.py"
]
}
}
}This MCP Server provides a focused toolset for fetching and processing images from URLs, local file paths, or numpy arrays, returning base64-encoded images along with their MIME types. It is designed for easy integration with MCP clients and automated image workflows.
How to use
You run the MCP Server locally and connect to it from your MCP client. Start the server using the Direct Method command, then call the available tool to fetch images. The primary tool is fetch_images, which accepts a list of image sources (URLs or file paths) and returns each image as a base64-encoded string with its MIME type. You can provide a mix of online images and local files, and the server will handle loading, compression for large images, and proper MIME mapping.
Typical usage pattern you can follow: start the server, then instruct your MCP client to invoke fetch_images with your list of sources. You’ll receive a structured response that includes the encoded image data and their corresponding MIME types for easy decoding on the client side.
If you are using Windsurf or Cursor to manage MCP servers, you would add the server configuration so your client can discover and communicate with it automatically.
How to install
Prerequisites you need before installing are Python 3.10 or newer and the uv package manager for running MCP servers. You will also need a Python environment management approach such as a virtual environment.
Step 1: Create and activate a virtual environment using uv,
uv venv
# On Windows:
.venv\Scripts\activate
# On Unix/MacOS:
source .venv/bin/activate
```,
Step 2: Install dependencies using uv,
uv pip install -r requirements.txt
Configuration and running the server
Direct Method to run the MCP Server directly from your terminal.
uv run python mcp_image.py
Configure for Windsurf to automatically manage this MCP server from your Windsurf panel.
{
"mcpServers": {
"image": {
"command": "uv",
"args": ["--directory", "/path/to/mcp-image", "run", "mcp_image.py"]
}
}
}
Cursor configuration
Add the MCP server to Cursor so it can start and manage the server from the UI.
{
"mcpServers": {
"image": {
"command": "uv",
"args": ["--directory", "/path/to/mcp-image", "run", "mcp_image.py"]
}
}
}
What you can do with the fetch_images tool
Tool name: fetch_images. Purpose: Fetch and process images from URLs or local file paths. Returns a list of processed images with base64 encoding and MIME types.
Usage examples
Example scenarios you may run from your MCP client include:
- Fetch these images: [list of URLs or file paths]
Available tools
fetch_images
Fetch and process images from URLs or local file paths, returning images as base64-encoded strings along with their MIME types.