tatn_mcp-server-fetch-python

tatn_mcp-server-fetch-python

3.2

An MCP server for fetching and transforming web content into various formats, including support for JavaScript-rendered content and media files.

The mcp-server-fetch-python is a versatile Model Context Protocol (MCP) server designed to fetch and transform web content into various formats. It provides comprehensive tools for extracting content from web pages, including support for JavaScript-rendered content and media files. This server is particularly useful for developers and data analysts who need to extract and process web content efficiently. It offers tools for extracting raw text, rendered HTML, and converting web pages to Markdown, as well as AI-powered content extraction from media files. The server is compatible with different platforms and can be configured with environment variables to enhance its functionality.

Features

  • {'name': 'get-raw-text', 'description': 'Extracts raw text content directly from URLs without browser rendering. Best used for structured data formats or when fast, direct access is needed.'}
  • {'name': 'get-rendered-html', 'description': 'Fetches fully rendered HTML content using a headless browser. Essential for modern web applications and SPAs that require JavaScript rendering.'}
  • {'name': 'get-markdown', 'description': 'Converts web page content to well-formatted Markdown. Preserves structural elements while providing clean, readable text output.'}
  • {'name': 'get-markdown-from-media', 'description': 'Performs AI-powered content extraction from media files. Utilizes computer vision and OCR for visual content analysis. Requires a valid OPENAI_API_KEY.'}

Usage with Different Platforms

Claude Desktop


"mcpServers": {
  "mcp-server-fetch-python": {
    "command": "uvx",
    "args": [
      "mcp-server-fetch-python"
    ]
  }
}

Local Installation

powershell
git clone https://github.com/tatn/mcp-server-fetch-python.git
cd mcp-server-fetch-python
uv sync
uv build


Then add the following configuration to Claude Desktop config file:


"mcpServers": {
  "mcp-server-fetch-python": {
    "command": "uv",
    "args": [
      "--directory",
      "path\\to\\mcp-server-fetch-python",  # Replace with actual path to the cloned repository
      "run",
      "mcp-server-fetch-python"
    ]
  }
}

Debugging

bash
npx @modelcontextprotocol/inspector uvx mcp-server-fetch-python


bash
npx @modelcontextprotocol/inspector uv --directory path\\to\\mcp-server-fetch-python run mcp-server-fetch-python