MCP ExplorerExplorer

Mcp Server Fetch Python

@tatnon 9 months ago
6 MIT
FreeCommunity
AI Systems
The mcp-server-fetch-python is an MCP server designed for fetching and transforming web content into various formats. It features tools for extracting raw text, rendered HTML, Markdown, and AI-based media analysis, making it ideal for structured data access and modern web applications.

Overview

What is Mcp Server Fetch Python

mcp-server-fetch-python is an MCP server designed for fetching and transforming web content into various formats. It offers tools for extracting content from web pages, including support for JavaScript-rendered content and media files.

Use cases

Use cases for mcp-server-fetch-python include web scraping for structured data, extracting content from modern web applications, converting web pages to Markdown for documentation, and analyzing media files for content extraction.

How to use

To use mcp-server-fetch-python, configure it in Claude Desktop by adding the server configuration to the appropriate JSON file. You can also run it locally by cloning the repository and following the installation instructions provided in the README.

Key features

Key features include four specialized tools: get-raw-text for direct text extraction, get-rendered-html for fetching fully rendered HTML, get-markdown for converting content to Markdown format, and get-markdown-from-media for AI-powered content extraction from media files.

Where to use

undefined

Content

mcp-server-fetch-python

An MCP server for fetching and transforming web content into various formats. This server provides comprehensive tools for extracting content from web pages, including support for JavaScript-rendered content and media files.

Server Fetch Python MCP server

Features

Tools

The server provides four specialized tools:

  • get-raw-text: Extracts raw text content directly from URLs without browser rendering

    • Arguments:
      • url: URL of the target web page (text, JSON, XML, csv, tsv, etc.) (required)
    • Best used for structured data formats or when fast, direct access is needed
  • get-rendered-html: Fetches fully rendered HTML content using a headless browser

    • Arguments:
      • url: URL of the target web page (required)
    • Essential for modern web applications and SPAs that require JavaScript rendering
  • get-markdown: Converts web page content to well-formatted Markdown

    • Arguments:
      • url: URL of the target web page (required)
    • Preserves structural elements while providing clean, readable text output
  • get-markdown-from-media: Performs AI-powered content extraction from media files

    • Arguments:
      • url: URL of the target media file (images, videos) (required)
    • Utilizes computer vision and OCR for visual content analysis
    • Requires a valid OPENAI_API_KEY to be set in environment variables
    • Will return an error message if the API key is not set or if there are issues processing the media file

Usage

Claude Desktop

To use with Claude Desktop, add the server configuration:

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

Environment Variables

The following environment variables can be configured:

  • OPENAI_API_KEY: Required for using the get-markdown-from-media tool. This key is needed for AI-powered image analysis and content extraction.
  • PYTHONIOENCODING: Set to “utf-8” if you encounter character encoding issues in the output.
  • MODEL_NAME: Specifies the model name to use. Defaults to “gpt-4o”.

Local Installation

Alternatively, you can install and run the server locally:

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:

Development

Debugging

You can start the MCP Inspector using npxwith the following commands:

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

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers