Navigation
Image Extractor: Lightning-Fast, Effortless Image Harvesting - MCP Implementation

Image Extractor: Lightning-Fast, Effortless Image Harvesting

Extract images from any document in seconds – fast, easy, and free! Your time is precious – stop struggling, start loving your workflow.

Research And Data
4.3(160 reviews)
240 saves
112 comments

This tool saved users approximately 7705 hours last month!

About Image Extractor

What is Image Extractor: Lightning-Fast, Effortless Image Harvesting?

Image Extractor is a versatile tool designed to streamline the process of extracting images from local files, URLs, or raw base64 data. It automatically converts images into optimized base64 format, reducing their size while maintaining quality for efficient integration with large language models (LLMs). This tool ensures seamless analysis by resizing images to a maximum resolution of 512x512 pixels, maximizing compatibility with LLM context windows.

How to Use Image Extractor: Lightning-Fast, Effortless Image Harvesting?

Installation Methods

  • Smithery Integration: Install via the official Smithery platform for automated configuration.
  • Manual Setup: Clone the repository and execute build commands for custom deployments.
  • Docker Deployment: Use pre-built Docker images to run the service in containerized environments.

Configuration Steps

  1. Set port settings (default: 8000) to avoid conflicts.
  2. Define maxImageSize (default: 10MB) to restrict large file processing.
  3. Restrict URL sources using allowedDomains for security.

Tool Execution

Invoke extraction commands directly within supported platforms like Claude:

        
            // From local file
            extract_image_from_file(file_path="images/photo.jpg")
            
            // From URL
            extract_image_from_url(url="https://example.com/image.jpg")
        
    

Image Extractor Features

Key Features of Image Extractor: Lightning-Fast, Effortless Image Harvesting?

  • Automatic Optimization: Resizes images to 512x512 for LLM compatibility without manual intervention.
  • Multiprotocol Support: Handles file paths, URLs, and base64 inputs through dedicated endpoints.
  • Granular Control: Customizable limits for image size and domain restrictions via configuration.
  • Lightweight Integration: Works natively with LLM platforms using standardized API workflows.

Use Cases of Image Extractor: Lightning-Fast, Effortless Image Harvesting?

  • AI-Powered Analysis: Preprocess images for vision-language models like CLIP or DALL-E.
  • Automation Pipelines: Integrate into CI/CD workflows for image validation or metadata extraction.
  • Security Scans: Process user-uploaded images for content moderation before storage.
  • API Gateways: Serve as a middleware for normalizing image formats in microservices architectures.

Image Extractor FAQ

FAQ: Image Extractor

Why does the tool resize images?

To ensure compatibility with LLM context limits while preserving essential visual information through intelligent scaling algorithms.

Can I use non-JPEG formats?

Yes, the tool processes all common image formats (PNG, WebP, BMP) transparently during conversion.

How do I troubleshoot connection issues?

Verify port 8000 is open and check firewall rules. Use docker logs for containerized deployments.

What security measures are included?

Domain whitelisting and size restrictions prevent abuse, while base64 validation ensures input integrity.

Content

MCP Image Extractor

MCP server for extracting and converting images to base64 for LLM analysis.

This MCP server provides tools for AI assistants to:

  • Extract images from local files
  • Extract images from URLs
  • Process base64-encoded images

How it looks in Cursor:

image

Installation

Via Smithery (Recommended)

The easiest way to install and use this MCP server is via Smithery.

For Claude Desktop

  1. Open your terminal and run:
npx @smithery/cli install @ifmelate/mcp-image-extractor --client claude
  1. The server will be automatically configured and ready to use in Claude Desktop.

For Cursor or Other Clients

For Cursor or other MCP clients, you can install the server from Smithery directly:

  1. Visit Smithery and go to the Image Extractor page
  2. Click on the "Connect" button and follow the instructions to install

Manual Installation

Since this package is only available in the Smithery registry and not in npm, you need to install it directly from GitHub:

# Clone and install 
git clone https://github.com/ifmelate/mcp-image-extractor.git
cd mcp-image-extractor
npm install
npm run build
npm link

This will make the mcp-image-extractor command available globally.

Configuration

For Claude Desktop

After installing via Smithery, the server should be automatically configured. If you need to manually configure it, add the following to your Claude Desktop settings:

{
  "mcpServers": {
    "image-extractor": {
      "command": "npx",
      "args": ["--yes", "@smithery/mcp-image-extractor"]
    }
  }
}

Settings file location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

For VSCode with Cline Extension

Add this configuration to the Cline MCP settings:

{
  "mcpServers": {
    "image-extractor": {
      "command": "npx",
      "args": ["--yes", "@smithery/mcp-image-extractor"]
    }
  }
}

Settings file location:

  • macOS: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  • Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json

For Cursor

You can configure Cursor to use this MCP server in one of the following ways:

Option 1: Using Cursor MCP Settings UI

Add this configuration through Cursor's MCP Settings UI:

{
  "mcpServers": {
    "image-extractor": {
      "command": "npx",
      "args": ["--yes", "@smithery/mcp-image-extractor"],
      "disabled": false
    }
  }
}

Option 2: Using .cursor/mcp.json file

For local development or when working in a specific project, you can add a .cursor/mcp.json file in your project root:

{
  "mcpServers": {
    "image-extractor": {
      "command": "node",
      "args": ["/full/path/to/mcp-image-extractor/dist/index.js"],
      "disabled": false
    }
  }
}

Or, if you've installed via npm link:

{
  "mcpServers": {
    "image-extractor": {
      "command": "mcp-image-extractor",
      "disabled": false
    }
  }
}

Important Note for Cursor Users : If you see "Failed to create client" error, try these alternatives:

Option 1: Use direct GitHub 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
    }
  }
}

Option 2: Clone and run locally

git clone https://github.com/ifmelate/mcp-image-extractor.git
cd mcp-image-extractor
npm install
npm run build

Then configure in .cursor/mcp.json:

{
  "mcpServers": {
    "image-extractor": {
      "command": "node",
      "args": ["/full/path/to/mcp-image-extractor/dist/index.js"],
      "disabled": false
    }
  }
}

Configuration Options

When connecting via Smithery UI, you can configure:

  • port : The port number for the server (default: 8000)
  • maxImageSize : Maximum image size in bytes (default: 10485760)
  • allowedDomains : Comma-separated list of allowed domains for URL extraction (default: all domains allowed)

Available Tools

extract_image_from_file

Extracts an image from a local file and converts it to base64.

Parameters:

  • file_path (required): Path to the local image file

Note: All images are automatically resized to optimal dimensions (max 512x512) for LLM analysis to limit the size of the base64 output and optimize context window usage.

extract_image_from_url

Extracts an image from a URL and converts it to base64.

Parameters:

  • url (required): URL of the image to extract

Note: All images are automatically resized to optimal dimensions (max 512x512) for LLM analysis to limit the size of the base64 output and optimize context window usage.

extract_image_from_base64

Processes a base64-encoded image for LLM analysis.

Parameters:

  • base64 (required): Base64-encoded image data
  • mime_type (optional, default: "image/png"): MIME type of the image

Note: All images are automatically resized to optimal dimensions (max 512x512) for LLM analysis to limit the size of the base64 output and optimize context window usage.

Example Usage

Here's an example of how to use the tools from Claude:

Please extract the image from this local file: images/photo.jpg

Claude will automatically use the extract_image_from_file tool to load and analyze the image content.

Please extract the image from this URL: https://example.com/image.jpg

Claude will automatically use the extract_image_from_url tool to fetch and analyze the image content.

Docker

Build and run with Docker:

docker build -t mcp-image-extractor .
docker run -p 8000:8000 mcp-image-extractor

License

MIT

Related MCP Servers & Clients