The MCP Image Extractor server helps AI assistants work with images by extracting them from files or URLs and converting them to base64 format for analysis. It provides optimized image processing capabilities that make it easier for language models to interpret visual content.
The simplest way to install this MCP server is by referencing it directly in your .cursor/mcp.json
file:
{
"mcpServers": {
"image-extractor": {
"command": "npx",
"args": [
"-y",
"mcp-image-extractor"
]
}
}
}
This method automatically uses the latest version and doesn't require a separate installation step.
If you prefer using a local installation:
{
"mcpServers": {
"image-extractor": {
"command": "node",
"args": ["/full/path/to/mcp-image-extractor/dist/index.js"],
"disabled": false
}
}
}
For a global installation:
git clone https://github.com/ifmelate/mcp-image-extractor.git
cd mcp-image-extractor
npm install
npm run build
npm link
Then configure in .cursor/mcp.json
:
{
"mcpServers": {
"image-extractor": {
"command": "mcp-image-extractor",
"disabled": false
}
}
}
To run using Docker:
docker build -t mcp-image-extractor .
docker run -p 8000:8000 mcp-image-extractor
Extracts and converts local image files to base64.
Parameters:
file_path
(required): Path to the local image fileExtracts and converts images from URLs to base64.
Parameters:
url
(required): URL of the image to extractProcesses an already base64-encoded image.
Parameters:
base64
(required): Base64-encoded image datamime_type
(optional, default: "image/png"): MIME type of the imageAll tools automatically resize images to optimal dimensions (max 512x512) to limit context window usage while preserving important details.
Example prompts for Claude:
Please extract the image from this local file: images/photo.jpg
Claude will use the extract_image_from_file
tool to load and analyze the image.
Please extract the image from this URL: https://example.com/image.jpg
Claude will use the extract_image_from_url
tool to fetch and analyze the image.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "image-extractor" '{"command":"npx","args":["-y","mcp-image-extractor"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"image-extractor": {
"command": "npx",
"args": [
"-y",
"mcp-image-extractor"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"image-extractor": {
"command": "npx",
"args": [
"-y",
"mcp-image-extractor"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect