Skip to content
plugmcp
DirectorySkillsCategoriesBlog
EN/中文
Sign inSign up
\n \n \n \n
Home · Pricing · Login · Docs · Blog · Careers
\n
Subscribe to our newsletter
\n
\n

How ACME cut support ticket routing time by 63%

\n

ACME routes 40,000 monthly support tickets through an AI triage system.

\n

The team reduced retrieval noise by cleaning HTML before chunking.

\n
\n
Legal · Privacy · Cookie settings · LinkedIn · X
\n \n\n```\n\nThe model does not need most of that. It needs this:\n\n```text\nHow ACME cut support ticket routing time by 63%\n\nACME routes 40,000 monthly support tickets through an AI triage system.\nThe team reduced retrieval noise by cleaning HTML before chunking.\n```\n\n![Before and after: bloated HTML vs clean LLM-ready text and token savings](https://i.imgur.com/RxmHFBz.png)\n\nRefinery MCP gives your agent a tool for that middle step:\n\n```text\nfetch page -> refine HTML -> send clean text to RAG / embeddings / LLM\n```\n\n## Why\n\nA"}},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Directory","item":"https://plugmcp.ai/mcp"},{"@type":"ListItem","position":2,"name":"Refinery MCP","item":"https://plugmcp.ai/mcp/io.github.larelabs-refinery-mcp"}]},{"@type":"FAQPage","mainEntity":[{"@type":"Question","name":"How do I install Refinery MCP?","acceptedAnswer":{"@type":"Answer","text":"Copy the stdio config for Cursor, Claude Desktop, Claude Code, or VS Code on this page. It uses the publisher's install, not a PlugMCP proxy."}},{"@type":"Question","name":"Does Refinery MCP need an API key?","acceptedAnswer":{"@type":"Answer","text":"The publisher lists these environment variables: APIFY_TOKEN."}},{"@type":"Question","name":"What transport does Refinery MCP use?","acceptedAnswer":{"@type":"Answer","text":"Refinery MCP runs locally over stdio."}},{"@type":"Question","name":"When was Refinery MCP last checked?","acceptedAnswer":{"@type":"Answer","text":"Last checked 2026-10-16. Clean raw HTML into LLM-ready text before agents spend tokens."}}]}]}
Home/Servers/Refinery MCP

Refinery MCP

I
by io.github.LareLabs

Clean raw HTML into LLM-ready text before agents spend tokens.

Power your agent

Add this server

The publisher's own command. Not a PlugMCP endpoint.

Local command
npx -y @larelabs/[email protected]
Credentials from the publisher
  • APIFY_TOKEN — Apify API token for the Refinery HTML cleaner actor
Provider
Claude Code
APIFY_TOKEN=<secret> claude mcp add io.github.larelabs-refinery-mcp -- npx -y @larelabs/[email protected]

Run in a terminal.

Claude Desktop
{
  "mcpServers": {
    "io.github.larelabs-refinery-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@larelabs/[email protected]"
      ],
      "env": {
        "APIFY_TOKEN": "<secret>"
      }
    }
  }
}

claude_desktop_config.json

Step-by-step: add this in Claude

Remote URL or a command on your machine? How the two installs differ

Run on PlugMCP

Host a copy with our keys and logs.

A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.

Launch

Related MCP

View more
  • Firecrawl🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
  • N
    NotionToken-auth Notion MCP: pages, databases, blocks, comments, files. Runs headless in CI and agents.
  • Context7Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors

Related skills

View all
  • reaReverse engineer anything with agents, from app behavior down to native binaries.
  • rea-changelog-updatePrepare or rewrite REA release changelogs and GitHub release notes from pinned Git history, with verified contributor thanks and Release Please synchronization.
  • rea-tool-designDesign or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.

Questions

How do I install Refinery MCP?
Copy the stdio config for Cursor, Claude Desktop, Claude Code, or VS Code on this page. It uses the publisher's install, not a PlugMCP proxy.
Does Refinery MCP need an API key?
The publisher lists these environment variables: APIFY_TOKEN.
What transport does Refinery MCP use?
Refinery MCP runs locally over stdio.
When was Refinery MCP last checked?
Last checked 2026-10-16. Clean raw HTML into LLM-ready text before agents spend tokens.

Clean raw HTML into LLM-ready text before agents spend tokens.

Refinery MCP

Clean HTML before your agent burns tokens.

Landing page · Apify Actor

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.

Agent pipeline: fetch, Refinery MCP, clean text, RAG

flowchart LR
  A[Agent needs web context] --> B[Fetch URL or raw HTML]
  B --> C[Refinery MCP]
  C --> D[Refinery Apify Actor]
  D --> E[Clean text + word_count]
  E --> F[RAG / embeddings / LLM context]

The Problem

Agents are getting good at fetching web pages. The problem is what they fetch:

<html>
  <head>
    <script>gtag("event", "page_view")</script>
    <style>.nav,.cookie,.footer{display:block}</style>
  </head>
  <body>
    <nav>Home · Pricing · Login · Docs · Blog · Careers</nav>
    <aside>Subscribe to our newsletter</aside>
    <article>
      <h1>How ACME cut support ticket routing time by 63%</h1>
      <p>ACME routes 40,000 monthly support tickets through an AI triage system.</p>
      <p>The team reduced retrieval noise by cleaning HTML before chunking.</p>
    </article>
    <footer>Legal · Privacy · Cookie settings · LinkedIn · X</footer>
  </body>
</html>

The model does not need most of that. It needs this:

How ACME cut support ticket routing time by 63%

ACME routes 40,000 monthly support tickets through an AI triage system.
The team reduced retrieval noise by cleaning HTML before chunking.

Before and after: bloated HTML vs clean LLM-ready text and token savings

Refinery MCP gives your agent a tool for that middle step:

fetch page -> refine HTML -> send clean text to RAG / embeddings / LLM

Why

Agents can fetch pages, but raw HTML is noisy and expensive:

  • scripts, styles, tracking tags
  • nav, footers, cookie banners
  • repeated links and layout markup
  • huge token burn before the model sees the real content

Refinery is the middle step your agent can call before it stuffs web context into a prompt:

fetch/render -> clean/refine -> chunk/embed/answer

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.

When To Use It

Use Refinery MCP when:

  • your agent already fetched a page but got bloated HTML
  • you want a deterministic cleanup step before RAG ingestion
  • you need word_count / token-ish savings before embedding
  • you want to separate crawling from content cleanup

Do not use it as your browser renderer, anti-bot layer, or site crawler.

Tools

clean_url

Fetches a URL through the Refinery Apify Actor and returns dataset rows with clean text and metadata.

Example input:

{
  "url": "https://docs.stripe.com/payments",
  "removeScripts": true,
  "removeStyles": true
}

clean_html

Cleans raw HTML your agent, crawler, or browser session already fetched.

Example input:

{
  "html": "<html><body><nav>Home Pricing Login</nav><article><h1>Vendor security update</h1><p>We now support SOC 2 exports for enterprise accounts.</p></article><footer>Legal Privacy Careers</footer></body></html>",
  "extractMentions": false,
  "extractHashtags": false
}

Example result:

{
  "text": "Vendor security update\n\nWe now support SOC 2 exports for enterprise accounts.",
  "word_count": 10,
  "content_type": "web",
  "language": "en",
  "processing_time_ms": 44.96,
  "success": true
}

estimate_savings

Local helper that compares raw HTML vs cleaned text and estimates token savings. This does not call Apify.

Example output:

{
  "raw_chars": 168,
  "clean_chars": 41,
  "estimated_raw_tokens": 42,
  "estimated_clean_tokens": 11,
  "estimated_token_savings": 31,
  "reduction_pct": 76
}

Install

npx -y @larelabs/refinery-mcp

Set your Apify token:

export APIFY_TOKEN=apify_api_xxx
export REFINERY_ACTOR_ID=larelabs/refinery-html-to-llm-cleaner

Cursor / Claude Desktop config

Use the published package:

{
  "mcpServers": {
    "refinery": {
      "command": "npx",
      "args": ["-y", "@larelabs/refinery-mcp"],
      "env": {
        "APIFY_TOKEN": "apify_api_xxx",
        "REFINERY_ACTOR_ID": "larelabs/refinery-html-to-llm-cleaner"
      }
    }
  }
}

Or run from source during development:

git clone https://github.com/LareLabs/refinery-mcp
cd refinery-mcp
npm install
npm run build
{
  "mcpServers": {
    "refinery": {
      "command": "npm",
      "args": ["run", "dev", "--prefix", "/absolute/path/to/refinery-mcp"],
      "env": {
        "APIFY_TOKEN": "apify_api_xxx"
      }
    }
  }
}

Smoke Test

npm run build
APIFY_TOKEN=apify_api_xxx npm run smoke

The smoke test starts the MCP server over stdio, lists tools, and calls estimate_savings without spending Apify credits.

Example Agent Prompt

Use Refinery MCP to clean this docs page before summarizing it:
https://docs.stripe.com/payments

Return the clean text, word_count, and a short summary. Do not summarize raw HTML.

Another useful prompt:

I fetched this page HTML with Playwright. Use Refinery MCP clean_html before adding it to my RAG ingestion queue. Return the cleaned text and estimated token savings.

Roadmap

  • Glama listing (glama.json added — submit at https://glama.ai/mcp/servers)
  • mcp.so directory PR (pending)
  • Hosted HTTP/SSE MCP transport
  • Batch URL cleanup tool
  • Glama / PulseMCP / FindMCP / mcp.so listings
  • Optional direct REST wrapper for RapidAPI
  • Token savings benchmark page

License

MIT

How do I install Refinery MCP?
Copy the stdio config for Cursor, Claude Desktop, Claude Code, or VS Code on this page. It uses the publisher's install, not a PlugMCP proxy.
Does Refinery MCP need an API key?
The publisher lists these environment variables: APIFY_TOKEN.
What transport does Refinery MCP use?
Refinery MCP runs locally over stdio.
When was Refinery MCP last checked?
Last checked 2026-10-16. Clean raw HTML into LLM-ready text before agents spend tokens.

No tool list yet. Remote servers get one after the first health check.

plugmcp

Plug any tool into any agent. MCP servers for people who do not write servers. Gateway for volume, n8n for apps.

  • github.com/TODO
  • x.com/TODO
  • linkedin.com/company/TODO

PlugMCP, 2026

Product
  • Browse
  • Install
  • Host your own
  • Pricing
  • Voice mode
  • Browser
Directory
  • All MCP servers
  • MCP Apps
  • Tools
  • Agent skills
  • Categories
  • New
  • Voice
  • Submit a server
Developers
  • Docs
  • Blog
  • Club
  • Work with us
  • What is MCP
  • What is WebMCP
  • Status
Company
  • About
  • Contact
  • Terms
  • Privacy
  • DPA