Sponsored by Deepsite.site

Image Extractor

Created By
ifmelate9 months ago
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

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

Server Config

{
  "mcpServers": {
    "image-extractor": {
      "command": "node",
      "args": [
        "/full/path/to/mcp-image-extractor/dist/index.js"
      ],
      "disabled": false
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Playwright McpPlaywright MCP server
ChatWiseThe second fastest AI chatbot™
DeepChatYour AI Partner on Desktop
Serper MCP ServerA Serper MCP Server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Tavily Mcp
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
CursorThe AI Code Editor
Amap Maps高德地图官方 MCP Server
WindsurfThe new purpose-built IDE to harness magic