Web Fetcher MCP server

Fetches and extracts web content using Playwright's headless browser capabilities, delivering clean, readable content from JavaScript-heavy websites in HTML or Markdown format for research and information gathering.
Back to servers
Setup instructions
Provider
jae-jae
Release date
Mar 20, 2025
Language
TypeScript
Package
Stats
18.4K downloads
793 stars

Fetcher MCP is a specialized server that uses Playwright headless browser to fetch web content, extract the main content from pages, and return it in either HTML or Markdown format. It's particularly useful for handling dynamic JavaScript-rendered websites and can intelligently filter out non-essential elements like ads and navigation.

Installation

Quick Start

You can run Fetcher MCP directly with npx:

npx -y fetcher-mcp

For first-time setup, install the required browser:

npx playwright install chromium

HTTP and SSE Transport

To start both Streamable HTTP and SSE endpoint services:

npx -y fetcher-mcp --log --transport=http --host=0.0.0.0 --port=3000

This provides two endpoints:

  • /mcp - Streamable HTTP endpoint (modern MCP protocol)
  • /sse - SSE endpoint (legacy MCP protocol)

Debug Mode

To show the browser window for debugging:

npx -y fetcher-mcp --debug

Docker Deployment

Run with Docker:

docker run -p 3000:3000 ghcr.io/jae-jae/fetcher-mcp:latest

Using Docker Compose:

Create a docker-compose.yml file:

version: "3.8"

services:
  fetcher-mcp:
    image: ghcr.io/jae-jae/fetcher-mcp:latest
    container_name: fetcher-mcp
    restart: unless-stopped
    ports:
      - "3000:3000"
    environment:
      - NODE_ENV=production
    volumes:
      - /tmp:/tmp
    healthcheck:
      test: ["CMD", "wget", "--spider", "-q", "http://localhost:3000"]
      interval: 30s
      timeout: 10s
      retries: 3

Then run:

docker-compose up -d

Configuration

Setting up in Claude Desktop

Configure Fetcher MCP in Claude Desktop by editing the configuration file:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "fetcher": {
      "command": "npx",
      "args": ["-y", "fetcher-mcp"]
    }
  }
}

Features and Usage

Fetching a Single URL

Use the fetch_url tool with these parameters:

  • url: The URL to fetch (required)
  • timeout: Page loading timeout in milliseconds (default: 30000)
  • waitUntil: When navigation is considered complete (options: 'load', 'domcontentloaded', 'networkidle', 'commit', default: 'load')
  • extractContent: Whether to extract main content (default: true)
  • maxLength: Maximum content length in characters (default: no limit)
  • returnHtml: Return HTML instead of Markdown (default: false)
  • waitForNavigation: Wait for additional navigation after initial load (default: false)
  • navigationTimeout: Time to wait for additional navigation (default: 10000)
  • disableMedia: Disable media resources (default: true)
  • debug: Enable debug mode (default: false)

Batch Processing Multiple URLs

Use the fetch_urls tool to retrieve content from multiple URLs in parallel:

  • urls: Array of URLs to fetch (required)
  • Supports all the same parameters as fetch_url

Advanced Tips

Handling Special Websites

For Anti-Crawler Sites

Include in your prompt:

Please wait for the page to fully load

For Slow-Loading Sites

Include in your prompt:

Please set the page loading timeout to 60 seconds

Content Retrieval Options

For preserving original HTML structure:

Please preserve the original HTML content

For fetching complete page content:

Please fetch the complete webpage content instead of just the main content

For HTML format instead of Markdown:

Please return the content in HTML format

Authentication and Debugging

To enable debug mode for manual login:

Please run in debug mode so I can manually log in to the website

When debug mode is enabled, you can:

  1. Manually log into the website using your credentials
  2. After login is complete, the content will be fetched with your authenticated session

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 "fetcher" '{"command":"npx","args":["-y","fetcher-mcp"]}'

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": {
        "fetcher": {
            "command": "npx",
            "args": [
                "-y",
                "fetcher-mcp"
            ]
        }
    }
}

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": {
        "fetcher": {
            "command": "npx",
            "args": [
                "-y",
                "fetcher-mcp"
            ]
        }
    }
}

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