- Home
- MCP servers
- Fetch As Markdown
Fetch As Markdown
- python
0
GitHub Stars
python
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
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.
How to use
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.
How to install
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-markdown
Or 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.py
Configuration and usage notes
The 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.
Troubleshooting and tips
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.
Additional notes
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.
Available tools
fetch
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.