MCP_with_Opencv is a Python server that provides advanced image enhancement and processing using OpenCV, accessible via the Model Context Protocol (MCP). It’s designed for easy integration with intelligent platforms, including Claude Desktop.
- Image enhancement (sharpen, denoise, contrast, grayscale, etc.)
- Fast OpenCV backend
- Structured MCP server for automated requests/responses
- Compatible with Claude Desktop and other MCP clients
Claude Desktop can interact with this MCP server by sending image data and enhancement prompts. Output images are returned as binary data, ready for direct use or display in Claude Desktop.
Basic Integration Steps:
-
Run MCP_with_Opencv locally: python opencv-image-enhancer.py
-
Configure Claude Desktop to point at your MCP server (e.g.,
http://localhost:8080). -
Send an image and a prompt ("sharpen", "denoise", etc.) through Claude Desktop's MCP connector.
from mcp.client import MCPClient
client = MCPClient("http://localhost:8080") with open("input.png", "rb") as f: img_bytes = f.read() result = client.call_tool( "enhance_image", {"image": {"data": img_bytes, "format": "png"}, "prompt": "denoise"} ) with open("output.png", "wb") as out_f: out_f.write(result["enhanced_image"]["data"])
The enhanced image is now ready for display in Claude Desktop
-
Python 3.14 or newer
-
Dependencies: pip install mcp[cli] opencv-python numpy Pillow
-
Clone this repo: git clone https://github.com/ammusharaff/MCP_with_Opencv.git cd MCP_with_Opencv
-
Start the server: python opencv-image-enhancer.py
-
Send a request from Claude Desktop (or any MCP client).
opencv-image-enhancer.py— main server logicpyproject.toml— dependencies.python-version— ensures correct interpreter version.gitignore— recommended ignores for Python