
AsterMind MCP
io.github.AsterMindAI由 GitHub 帳號 AsterMindAI 發布v0.1.0更新於 Oct 24, 2026
On-device reranking that cuts RAG context tokens ~67% while keeping a relevant passage.
概覽
一個在本機執行的 MCP 伺服器,對檢索到的段落重新排序與過濾,減少送往大型語言模型的上下文 token。
- 可以做什麼
- 針對查詢對檢索到的段落重新排序、過濾與壓縮,保留前 K 筆或符合 token 預算的內容,並估算過濾前後的 token 差值。精確計算 token 數量,比較或向量化文字以偵測近似重複。以詞法語意搜尋依查詢為語料排序。辨識文字語言,並依指定類別為文字分類,附帶信心訊號。
- 適用情境
- 適用於 RAG 流程把大量檢索片段塞進每次提示、希望只送出真正相關段落的場景。最適合查詢與答案用詞重疊的單跳問題;多跳問題應保留更多段落,避免過度過濾。
- 執行需求
- 以 npm 套件形式透過 npx 在本機執行,需要 Node 18 或更新版本;無需 GPU、建置步驟或設定。未宣告網路呼叫、API 金鑰或環境變數。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 AsterMind MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
AsterMind MCP
Cut the tokens you send to an LLM — on your own machine, before the call goes out.
AsterMind MCP is a Model Context Protocol server that ranks and filters your retrieved context locally, so you send the model the few passages that actually answer the question instead of everything your retriever returned. It runs on the AsterMind Community Edition ELM engine. No network calls, no API keys, no data leaves the machine.
What it actually does (measured, not promised)
On a 6-scenario RAG benchmark (support KB, API docs, HR policy, e-commerce FAQ, DevOps runbook, fintech help), filtering 10 retrieved candidates down to the top 3 by rerank score:
Tokens counted with gpt-tokenizer
(o200k/cl100k BPE, OpenAI-compatible). Reproduce it yourself: npm run benchmark.
Full methodology and per-scenario results are in BENCHMARK.md.
The honest tradeoff
Savings and recall move in opposite directions — keep fewer chunks, save more tokens, risk dropping a relevant one. You choose the point on the curve:
Rank-1 surfaced a relevant passage in 100% of scenarios at every K we tested. That is the strong, defensible result. For single-hop questions (FAQ, support, one-fact lookups) keep top 1–3 and cut ~67–88% of context. For multi-hop questions that need several passages, keep top 5–6 — don't over-filter, or you'll drop a needed passage.
Install
Or add it to your MCP client config (Claude Desktop, Cursor, VS Code, Cline):
Runs on Node 18+. No GPU, no build step, no configuration.
Tools (10)
Every tool returns a confidence signal. Where the engine is weak, the tool says so rather than guessing silently.
Known limitations (stated on purpose)
- The reranker is lexical (TF-IDF). It matches on shared terms, so pure synonym gaps can be missed — a query for "payment methods" won't strongly rank a passage that only says "Visa/Mastercard." It excels when the query and the answer share vocabulary, which is the common RAG case.
- Classification is weak out of the box and only fair after training — use it as a low-confidence hint, not a decision-maker. It flags low confidence.
- Embeddings are character-level, useful for near-duplicate detection, not deep semantic similarity.
The token savings above are real only because a relevant passage is preserved. Cutting tokens by dropping the answer is not a saving, and this benchmark measures both.
When this saves you money
The server does not shrink an LLM's vocabulary or compress prompts magically. It saves tokens one specific way: you retrieve broadly, then send the model only the passages that matter. If your RAG pipeline currently stuffs 8–12 retrieved chunks into every prompt, reranking locally and sending 3 is a direct, repeatable cut to your per-call input tokens — and it runs on your machine for free.
Develop & verify
License
MIT © AsterMind AI. Built on @astermind/astermind-community.
來源:README.md,提交 afda79b
工具
0版本歷史
1- v0.1.0最新Sep 25, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分