WikiCleanHTML
Fetches Wikipedia articles and returns cleaned, sanitized HTML by stripping citations, infoboxes, navboxes, and other clutter. Supports fetching specific articles by title or random articles, with options to keep images, tables, and links.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@WikiCleanHTMLFetch the Wikipedia article on Artificial intelligence"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
WikiCleanHTML
An MCP server that fetches Wikipedia articles and returns cleaned, readable HTML — stripped of citations, infoboxes, navboxes, edit sections, and other clutter.
Also includes a standalone browser UI (index.html) that works without any server.
Features
Fetches any Wikipedia article by title, or a random one
Strips Wikipedia-specific clutter: citations
[1], edit sections, infoboxes, navboxes, TOC, metadataSanitizes output HTML with a strict tag/attribute allowlist
Normalizes relative links to absolute Wikipedia URLs
Saves cleaned HTML + plain text to local files
Options to keep/remove images, tables, and links
Related MCP server: wikipedia-mcp
Quick Start — MCP Server
1. Clone and install
git clone https://github.com/alavna/wikicleanhtml.git
cd wikicleanhtml
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt2. Register with Claude Code
claude mcp add --scope user wikicleanhtml -- /path/to/wikicleanhtml/.venv/bin/python /path/to/wikicleanhtml/mcp_server.pyOr manually add to your MCP config:
{
"mcpServers": {
"wikicleanhtml": {
"command": "/path/to/wikicleanhtml/.venv/bin/python",
"args": ["/path/to/wikicleanhtml/mcp_server.py"]
}
}
}3. Use it
In Claude Code, just say:
"Fetch the Wikipedia article on Insulin"
Claude calls wiki_fetch_article(title="Insulin") and gets back:
{
"title": "Insulin",
"source_url": "https://en.wikipedia.org/wiki/Insulin",
"html_file": "~/.wikicleanhtml/articles/Insulin.html",
"text_file": "~/.wikicleanhtml/articles/Insulin.txt",
"html_length": 45230,
"text_length": 28100,
"removed": { "references": 142, "infoboxes": 1, "navboxes": 4, "tables": 3 }
}The cleaned article is saved locally — Claude can read the file if needed, without loading raw Wikipedia HTML into context.
MCP Tools
Tool | Description |
| Fetch a specific article by title |
| Fetch a random Wikipedia article |
Options (all tools):
Parameter | Type | Default | Description |
| string | required | Wikipedia article title (fetch_article only) |
| bool |
| Preserve |
| bool |
| Preserve |
| bool |
| Preserve |
Output files are saved to ~/.wikicleanhtml/articles/.
Browser UI
Open index.html directly in any browser. No server needed — it fetches from Wikipedia's CORS-enabled API and cleans client-side with DOMPurify.
What gets removed
Clutter | Selector examples |
Citation markers |
|
Edit sections |
|
Hatnotes |
|
Infoboxes |
|
Navigation boxes |
|
Table of contents |
|
Reference lists |
|
Message boxes |
|
Category links |
|
Scripts, styles, metadata |
|
What gets preserved
Headings (h1-h4), paragraphs, lists (ul/ol/li), links, emphasis (strong/em), code/pre, blockquote, br/hr.
All output is sanitized through a strict allowlist — no inline styles, event handlers, scripts, iframes, or unknown tags survive.
Tests
cd wikicleanhtml
source .venv/bin/activate
pytest tests/ -v23 unit tests covering: reference removal, edit section removal, hatnote removal, infobox/navbox removal, TOC removal, image/table toggling, XSS sanitization, link normalization, structure preservation, and plain text extraction.
Wikimedia API Etiquette
This tool follows Wikimedia API guidelines:
User-Agent: All requests include a descriptive
User-AgentheaderRate: One Wikipedia request per tool call — no bulk fetching
Caching: Articles are saved to disk; re-read the file instead of re-fetching
Not intended for high-traffic or production use without Wikimedia approval
Project Structure
wikicleanhtml/
├── mcp_server.py # MCP server entry point (2 tools)
├── cleaner.py # HTML cleaning/sanitization logic
├── index.html # Standalone browser UI
├── requirements.txt # Python dependencies
├── tests/
│ └── test_cleaner.py
└── README.mdLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/alavna/wikicleanhtml'
If you have feedback or need assistance with the MCP directory API, please join our Discord server