
Readability Parser
โ 4from jmh108
Extracts and transforms webpage content into clean, LLM-optimized Markdown using the Readability algorithm.
๐ฅ๐ฅ๐ฅโ VerifiedFreeAdvanced setup
MCP Server Readability Parser (Python / FastMCP)
Table of Contents
Features
- Removes ads, navigation, footers and other non-essential content
- Converts clean HTML into well-formatted Markdown
- Handles errors gracefully
- Optimized for LLM processing
- Lightweight and fast
Why Not Just Fetch?
Unlike simple fetch requests, this server:
- Extracts only relevant content using Readability algorithm
- Eliminates noise like ads, popups, and navigation menus
- Reduces token usage by removing unnecessary HTML/CSS
- Provides consistent Markdown formatting for better LLM processing
- Handles complex web pages with dynamic content
Tool Reference
extract_content
Fetches and transforms webpage content into clean Markdown.
Arguments:
{
"url": {
"type": "string",
"description": "The website URL to parse",
"required": true
}
}Returns:
{
"content": "Markdown content..."
}Dependencies
- readability-lxml - Content extraction
- html2text - HTML to Markdown conversion
- beautifulsoup4 - DOM parsing
- requests - HTTP requests
Copy & paste โ that's it
pip install -r requirements.txtInstallation
- Clone the repository:
git clone https://github.com/jmh108/MCP-server-readability-python.git
cd MCP-server-readability-python- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txtQuick Start
- Start the server:
fastmcp run server.py- Example request:
curl -X POST http://localhost:8000/tools/extract_content \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/article"}'MCP Server Configuration
To configure the MCP server, add the following to your MCP settings file:
{
"mcpServers": {
"readability": {
"command": "fastmcp",
"args": ["run", "server.py"],
"env": {}
}
}
}The server can then be started using the MCP protocol and accessed via the parse tool.
No common issues documented yet. If you hit a problem, the repository's GitHub Issues page is the best place to look.
Licensed under MITโ you can use, modify, and redistribute it under that license's terms.
License
MIT License - See LICENSE for details.