Clean raw HTML into LLM-ready text before agents spend tokens.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Refinery MCP.
clean_urlFetches a URL through the Refinery Apify Actor and returns dataset rows with clean text and metadata.
clean_htmlCleans raw HTML your agent, crawler, or browser session already fetched.
estimate_savingsLocal helper that compares raw HTML vs cleaned text and estimates token savings. This does not call Apify.
Clean HTML before your agent burns tokens.
Refinery MCP wraps the Refinery Apify Actor as an MCP server so Claude, Cursor, and other agents can turn raw HTML or URLs into clean LLM-ready text plus word_count.

Agents are getting good at fetching web pages. The problem is what they fetch:
The model does not need most of that. It needs this:

Refinery MCP gives your agent a tool for that middle step:
Agents can fetch pages, but raw HTML is noisy and expensive:
Refinery is the middle step your agent can call before it stuffs web context into a prompt:
It is not a crawler. Use Firecrawl, Crawl4AI, Playwright, browser automation, or your own fetcher when you need rendering. Use Refinery when you already have a URL or raw HTML and want a cheap cleanup pass before the LLM.
Use Refinery MCP when:
word_count / token-ish savings before embeddingDo not use it as your browser renderer, anti-bot layer, or site crawler.
clean_urlFetches a URL through the Refinery Apify Actor and returns dataset rows with clean text and metadata.
Example input:
clean_htmlCleans raw HTML your agent, crawler, or browser session already fetched.
Example input:
Example result:
estimate_savingsLocal helper that compares raw HTML vs cleaned text and estimates token savings. This does not call Apify.
Example output:
Set your Apify token:
Use the published package:
Or run from source during development:
The smoke test starts the MCP server over stdio, lists tools, and calls estimate_savings without spending Apify credits.
Another useful prompt:
glama.json added β submit at https://glama.ai/mcp/servers)MIT
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/refinery-mcp)<a href="https://allmcps.com/mcp/refinery-mcp"><img src="https://allmcps.com/api/badge/refinery-mcp?style=directory" alt="Refinery MCP on AllMCPs" /></a>