mcp-server-fetch-python logo

mcp-server-fetch-python

by tatn

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

View on GitHub

Last updated: N/A

What is mcp-server-fetch-python?

This is an MCP server designed to fetch and transform web content into various formats. It offers tools to extract raw text, rendered HTML, Markdown, and content from media files using AI.

How to use mcp-server-fetch-python?

The server can be used with Claude Desktop by adding a server configuration to the claude_desktop_config.json file. Alternatively, it can be installed and run locally using git clone, uv sync, and uv build. The server provides four tools that can be called with a URL argument. For media analysis, an OpenAI API key is required.

Key features of mcp-server-fetch-python

  • Extracts raw text from URLs

  • Fetches fully rendered HTML using a headless browser

  • Converts web page content to Markdown

  • Extracts content from media files using AI (OCR and computer vision)

Use cases of mcp-server-fetch-python

  • Extracting structured data from websites

  • Scraping content from JavaScript-heavy web applications

  • Converting web pages to readable Markdown format

  • Analyzing images and videos for text and content

  • Integrating web content extraction into Claude Desktop

FAQ from mcp-server-fetch-python

What is the purpose of this server?

This server is designed to fetch and transform web content into various formats, providing tools for extracting text, HTML, Markdown, and content from media files.

How do I use the get-markdown-from-media tool?

The get-markdown-from-media tool requires a valid OPENAI_API_KEY to be set in environment variables. This key is used for AI-powered image analysis and content extraction.

What environment variables can I configure?

You can configure OPENAI_API_KEY for media analysis, PYTHONIOENCODING to handle character encoding issues, and MODEL_NAME to specify the model name to use.

How do I install the server locally?

You can install the server locally by cloning the repository, navigating to the directory, and running uv sync and uv build.

How do I debug the server?

You can start the MCP Inspector using npx @modelcontextprotocol/inspector uvx mcp-server-fetch-python or npx @modelcontextprotocol/inspector uv --directory path\to\mcp-server-fetch-python run mcp-server-fetch-python.