Fetch with Images MCP server

Integrates web scraping and image processing capabilities to fetch, extract, and optimize web content.
Back to servers
Setup instructions
Provider
kazuph
Release date
Jan 08, 2025
Language
TypeScript
Package
Stats
12.0K downloads
22 stars

This MCP server allows Claude Desktop (or any MCP client) to fetch web content and process images. It extracts web content as markdown, processes images with optimization, and provides flexible configuration options for how content is handled.

Installation

Quick Setup for Claude Desktop

To use this tool with Claude Desktop, add the following to your Claude Desktop configuration file:

{
  "tools": {
    "imageFetch": {
      "command": "npx",
      "args": ["-y", "@kazuph/mcp-fetch"]
    }
  }
}

The configuration file is located at: ~/Library/Application Support/Claude/claude_desktop_config.json

You can easily access this through Claude Desktop:

  1. Open Claude Desktop
  2. Click Claude in the Mac menu bar
  3. Click "Settings"
  4. Click "Developer"

Required Accessibility Setup

For automated clipboard operations to work properly:

  1. Open System Settings
  2. Go to Privacy & Security > Accessibility
  3. Click the "+" button
  4. Add Claude from your Applications folder
  5. Turn ON the toggle for Claude

Usage

Basic Content Fetching

To fetch web content without images:

{
  "url": "https://example.com"
}

Fetching with Images (Saved to Files)

To fetch web content and save images to your local system:

{
  "url": "https://example.com",
  "enableFetchImages": true,
  "imageMaxCount": 3
}

Images will be saved to ~/Downloads/mcp-fetch/YYYY-MM-DD/ directory.

Fetching with Images for AI Display

To fetch web content and encode images for AI display:

{
  "url": "https://example.com",
  "enableFetchImages": true,
  "returnBase64": true,
  "imageMaxCount": 3
}

Paginating Through Images

To fetch additional images from the same content:

{
  "url": "https://example.com",
  "enableFetchImages": true,
  "imageStartIndex": 3,
  "imageMaxCount": 3
}

Configuration Parameters

The following parameters can be used to customize the behavior:

  • url (required): The URL to fetch
  • maxLength (default: 20000): Maximum length of content to return
  • startIndex (default: 0): Starting position in content
  • imageStartIndex (default: 0): Starting position for image collection
  • raw (default: false): Return raw content instead of processed markdown
  • imageMaxCount (default: 3): Maximum number of images to process per request
  • imageMaxHeight (default: 4000): Maximum height of merged image
  • imageMaxWidth (default: 1000): Maximum width of merged image
  • imageQuality (default: 80): JPEG quality (1-100)
  • enableFetchImages (default: false): Enable fetching and processing of images
  • saveImages (default: true): Save processed images to local files
  • returnBase64 (default: false): Return base64 encoded images for AI display
  • ignoreRobotsTxt (default: false): Ignore robots.txt restrictions

Features

  • Web Content Extraction: Automatically extracts and formats web content as markdown
  • Article Title Extraction: Extracts and displays the title of the article
  • Image Processing: Optional processing of images from web pages
  • File Saving: Images are automatically saved to a local directory
  • Dual Output: Both file saving and optional Base64 encoding for AI display
  • Pagination Support: Supports pagination for both text and images
  • JPEG Optimization: Automatically optimizes images as JPEG for better performance
  • GIF Support: Extracts first frame from animated GIFs

System Requirements

  • macOS (required for clipboard operations)
  • Node.js 18+
  • Claude Desktop

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 "imageFetch" '{"command":"npx","args":["-y","@kazuph/mcp-fetch"]}'

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": {
        "imageFetch": {
            "command": "npx",
            "args": [
                "-y",
                "@kazuph/mcp-fetch"
            ]
        }
    }
}

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": {
        "imageFetch": {
            "command": "npx",
            "args": [
                "-y",
                "@kazuph/mcp-fetch"
            ]
        }
    }
}

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