Un post sur r/ClaudeAI a lancé PullMD : un serveur MCP pour l'extraction HTML vers markdown. Ce tutoriel présente deux approches — hébergé (Scavio MCP) et auto-hébergé (FastMCP encapsulant l'extraction Scavio).
Prérequis
- Python 3.10+ pour l'auto-hébergement
- Claude Code ou tout client MCP
Parcours
Étape 1: Voie A : Utiliser le MCP hébergé de Scavio
Zéro infrastructure.
claude mcp add scavio https://mcp.scavio.dev/mcp --header "x-api-key: $SCAVIO_API_KEY"Étape 2: Voie B : Auto-hébergement avec FastMCP
Installer fastmcp.
pip install fastmcp requestsÉtape 3: Encapsuler l'extraction Scavio
Serveur FastMCP exposant l'outil d'extraction.
import os, requests
from fastmcp import FastMCP
mcp = FastMCP('html-extractor')
@mcp.tool()
def extract(url: str) -> dict:
return requests.post('https://api.scavio.dev/api/v1/extract',
headers={'x-api-key': os.environ['SCAVIO_API_KEY']},
json={'url': url, 'format': 'markdown'}).json()
if __name__ == '__main__':
mcp.run()Étape 4: Exécuter localement
Écouter sur stdio ou SSE.
python server.pyÉtape 5: Attacher à Claude Code
Configuration MCP personnalisée.
claude mcp add html-extractor python /path/to/server.pyExemple Python
# Path A is hosted, simplest, $0.0043/extract.
# Path B is self-hosted, $0/extract apart from Scavio underneath.Exemple JavaScript
// Same in TS using @modelcontextprotocol/sdk.Sortie attendue
Claude Code agent has a clean extract tool that returns markdown for any URL. Token usage drops 10x versus passing raw HTML.