home / mcp / fetch as markdown mcp server
Fetch a web page and convert main content to clean Markdown with optional link and image inclusion.
Configuration
View docs{
"mcpServers": {
"bhubbb-mcp-fetch-as-markdown": {
"url": "https://mcp.fetch-as-markdown.example/mcp"
}
}
}You can fetch any publicly accessible web page and convert its main content into clean, readable Markdown using this MCP server. It focuses on extracting the article content, stripping clutter, and producing a structured, token-efficient output you can use for analysis, summarization, or AI reasoning.
Connect your MCP client to the server and request a page fetch. Youโll provide a URL and optional preferences such as whether to preserve links or include images. The server will fetch the page with respectful rate limiting, extract the main content, convert it to Markdown, and return structured results including both metadata and the content.
Prerequisites: Python 3.12 or higher and the MCP runtime environment you use (for example, uvx or uv). Prepare your environment and then choose your preferred installation path.
uvx git+https://github.com/bhubbb/mcp-fetch-as-markdownOr install locally and run from source. Follow these steps exactly to ensure the server starts correctly.
# Step 1: Clone or download the project
# (If you downloaded a zip, unzip it first)
# Step 2: Install dependencies
uv sync
# Step 3: Run the server
uv run python main.pyThe server exposes a single fetch tool that converts a given URL to Markdown with optional link and image handling. You can adjust timeouts and ensure the server follows polite scraping practices.
Two common ways to connect are via a remote MCP endpoint or a local, stdio-driven process.
If you encounter import errors or timeouts, verify dependencies are installed and the environment matches the prerequisites. The server enforces a minimal pause between requests to avoid overloading target sites. If a site blocks automated access, respect the restriction and adjust your usage.
For interactive testing, you can run the example workflow to fetch content and observe the metadata and Markdown output.
The output includes a metadata block with the original and final URLs, page title, content length, status, and content type, followed by the cleaned Markdown content. This structure helps both humans and programs consume the results efficiently.
Fetch a web page by URL and convert it to clean Markdown. Options include including links, including images, and a configurable timeout. Returns metadata such as original URL, final URL, title, content length, status code, and content type along with the cleaned Markdown content.