MCP ExplorerExplorer

Jmh108 Mcp Server Readability Python

@MCP-Mirroron 9 months ago
1 MIT
FreeCommunity
AI Systems
Mirror of https://github.com/jmh108/MCP-server-readability-python

Overview

What is Jmh108 Mcp Server Readability Python

jmh108_MCP-server-readability-python is a Python implementation of the Model Context Protocol (MCP) server that extracts and transforms webpage content into clean, LLM-optimized Markdown. It is based on the original server-moz-readability implementation.

Use cases

Use cases include extracting articles from news websites, processing blog content for readability, and preparing web content for machine learning models that require structured input.

How to use

To use jmh108_MCP-server-readability-python, clone the repository, create and activate a virtual environment, install dependencies, and start the server. You can then access the server to process web pages.

Key features

Key features include the removal of ads and non-essential content, conversion of clean HTML to well-formatted Markdown, graceful error handling, optimization for LLM processing, and being lightweight and fast.

Where to use

jmh108_MCP-server-readability-python can be used in web scraping, content extraction, and applications that require clean and structured data from web pages, especially in the context of natural language processing.

Content

MCP Server Readability Parser (Python / FastMCP)

Credits/Reference

This project is based on the original server-moz-readability implementation of emzimmer. (For the original README documentation, please refer to the original README.md.)

This Python implementation adapts the original concept to run as python based MCP using FastMCP

Mozilla Readability Parser MCP Server

A Python implementation of the Model Context Protocol (MCP) server that extracts and transforms webpage content into clean, LLM-optimized Markdown.

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

Installation

  1. Clone the repository:
git clone https://github.com/jmh108/MCP-server-readability-python.git
cd MCP-server-readability-python
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows use: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt

Quick Start

  1. Start the server:
fastmcp run server.py
  1. Example request:
curl -X POST http://localhost:8000/tools/extract_content \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/article"}'

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..."
}

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.

Dependencies

License

MIT License - See LICENSE for details.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers