
Refinery MCP
io.github.LareLabs由 GitHub 帳號 LareLabs 發布v0.1.6更新於 Oct 27, 2026
Clean raw HTML into LLM-ready text before agents spend tokens.
概覽
本機 MCP 伺服器,透過 Apify actor 把原始 HTML 或網址轉成乾淨、適合大型語言模型的文字並附上字數。
- 可以做什麼
- 透過 Refinery Apify actor 擷取網址,回傳乾淨文字與中繼資料
- 清理代理、爬蟲或瀏覽器工作階段已取得的原始 HTML
- 在本機比對原始 HTML 與清理後文字,估算可節省的 token
- 適用情境
- 適合代理已擷取頁面或手上已有原始 HTML、希望在 RAG 匯入、向量化或提示前做一次確定性清理的情況。它不是爬蟲或渲染器,需搭配自己的擷取工具使用。
- 執行需求
- 以 stdio 在本機執行,通常用 npx 從 npm 套件啟動,需要 Node.js。需要 Apify API 權杖(環境變數 APIFY_TOKEN),可選用 REFINERY_ACTOR_ID 指定 actor。網址與 HTML 清理工具需要連線至 Apify 的網路存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Refinery MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Refinery MCP
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.
[Agent pipeline: fetch, Refinery MCP, clean text, RAG]
The Problem
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:
[Before and after: bloated HTML vs clean LLM-ready text and token savings]
Refinery MCP gives your agent a tool for that middle step:
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:
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:
clean_html
Cleans raw HTML your agent, crawler, or browser session already fetched.
Example input:
Example result:
estimate_savings
Local helper that compares raw HTML vs cleaned text and estimates token savings. This does not call Apify.
Example output:
Install
Set your Apify token:
Cursor / Claude Desktop config
Use the published package:
Or run from source during development:
Smoke Test
The smoke test starts the MCP server over stdio, lists tools, and calls estimate_savings without spending Apify credits.
Example Agent Prompt
Another useful prompt:
Roadmap
- Glama listing (
glama.jsonadded — 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
來源:README.md,提交 491e2c0
工具
0版本歷史
1- v0.1.6最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分