Image Extractor MCP server

Enables image processing and analysis by extracting images from URLs or base64 data, with features for resizing, format conversion, and secure domain filtering.
Back to servers
Setup instructions
Provider
ifmelate
Release date
Mar 18, 2025
Language
TypeScript
Stats
8 stars

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.

Installation Options

Using npx in mcp.json (Recommended)

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.

Local Path Installation

If you prefer using a local installation:

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

Manual Installation

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
    }
  }
}

Docker Installation

To run using Docker:

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

Available Tools

extract_image_from_file

Extracts and converts local image files to base64.

Parameters:

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

extract_image_from_url

Extracts and converts images from URLs to base64.

Parameters:

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

extract_image_from_base64

Processes an already base64-encoded image.

Parameters:

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

Using the Tools

All 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.

How to install this MCP server

For Claude Code

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.

For Cursor

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.

Adding an MCP server to Cursor globally

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"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.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

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later