
Ai Optimizer
io.github.shivam-app-developers由 GitHub 帳號 shivam-app-developers 發布v0.1.0更新於 Oct 24, 2026
MCP server that cuts AI coding agent token usage via framework-aware context optimization
概覽
本機 MCP 伺服器,以框架感知的讀取方式取代 AI 編碼代理的檔案、搜尋與診斷呼叫,降低 token 用量。
- 可以做什麼
- 依框架規則略過產生檔與相依目錄,讀取與列出專案檔案,支援忽略規則、.gitignore 與行範圍擷取
- 在忽略篩選下搜尋檔案內容,並透過 LSP 讀取單一符號而非整份檔案
- 執行語言伺服器診斷,只回傳錯誤與一小段相關程式碼
- 清除 shell 輸出中的 ANSI 控制碼、建置工具進度與 JVM 警告
- 回報偵測到的框架、已啟用的套件以及累計節省的 token
- 適用情境
- 當 AI 編碼代理把上下文浪費在產生檔、相依目錄與建置產物上,或希望在大型、框架眾多的程式庫中做更省、更精準的讀取時適用。適用於支援 MCP 的代理,例如 Claude Code、Cursor、Cline、Zed。
- 執行需求
- 以本機 stdio 程序執行,需透過 npm 安裝 @ai-optimizer/core(Node.js)。選用的 AI_OPTIMIZER_LICENSE 金鑰可解鎖 Pro/Team 套件,免費版不需金鑰。語言伺服器診斷需在本機安裝對應的 LSP。授權驗證是唯一的網路呼叫。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Ai Optimizer,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
AI Token Optimizer
An MCP server that cuts AI coding-agent token usage by 60–80% via framework-aware context optimization.
[CI] [CodeQL] [npm] [License: MIT]
AI coding agents read whole files when they need 15 lines. They load *.g.dart,
R.java, node_modules/, and dist/ into context — then do it again next turn.
AI Token Optimizer is a Model Context Protocol
server that intercepts those tool calls and strips framework noise before it
reaches the model.
Works with anything that speaks MCP: Claude Code, Cursor, Cline, Continue, Zed, JetBrains AI, GitHub Copilot agent mode, Antigravity, Windsurf, OpenAI Codex CLI.
Quickstart
Then point your agent at the ai-optimizer stdio server. For Claude Code, add to
~/.claude/settings.json:
Or scaffold the config and preview your savings automatically:
Full per-agent setup (Cursor, others), LSP install, and verification steps live in
packages/core/README.md.
What it does
It registers tools the agent uses instead of its built-in file/dir/error reads:
When a project type is detected (e.g. Python via pyproject.toml), the matching
pack's ignore rules activate automatically. .gitignore is respected on top.
Tiers
See PRICING.md. Behavior-changing or data-sharing features
(scheduler, work-stealing, telemetry) are off by default and require explicit
opt-in. Display-only features (dollar-value savings) default on.
Monorepo layout
Architecture details: ARCHITECTURE.md.
Development
Security
Local-only by design — license validation is the only network call. Report
vulnerabilities per SECURITY.md.
License
Core engine is MIT — see LICENSE. Pro/Team packs are proprietary.
來源:README.md,提交 ef0a56a
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。