
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 分