
TokenSave
io.github.aovestdipaperino由 GitHub 帳號 aovestdipaperino 發布v4.0.2更新於 Nov 3, 2026
Code intelligence for 15+ languages: semantic graph queries instead of file reads. 37 MCP tools.
概覽
TokenSave 為專案建立本機語意程式碼圖譜,讓 AI 編碼助理直接查詢符號、呼叫關係與脈絡,不必反覆 grep 和讀取檔案。
- 可以做什麼
- 依語意搜尋程式碼,一次呼叫回傳符號、關係與程式碼片段
- 為任務建立脈絡,包含進入點、相關符號與原始碼
- 追蹤符號的呼叫者、被呼叫者與影響範圍,找出無用程式碼與複雜度
- 透過錨點取代、多重取代與 AST 重寫等原語編輯檔案,並自動重建索引
- 依 git 分支分別建立索引,跨分支比較與搜尋
- 輸出程式碼健康度指標、測試對應以及 token 與成本節省報告
- 適用情境
- 適合助理在大型多語言程式碼庫中工作、因反覆 grep、glob 和讀取檔案而耗費大量 token 的情況,也適合需要影響分析與結構化編輯而非原始檔案掃描的場合。
- 執行需求
- 以本機程序在使用者電腦上執行,僅支援桌面端。可透過 Cargo、Homebrew、Scoop 或預先編譯的執行檔安裝,再執行安裝指令向助理註冊 MCP 伺服器並初始化專案以建立本機索引。未宣告任何 API 金鑰或環境變數。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 TokenSave,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Semantic Code Intelligence for AI Coding Agents
Fewer tokens • Fewer tool calls • 100% local
[GitHub stars] [crates.io] [License: MIT] [Rust] [Built with AI — part of Enzo Lombardi's AI portfolio]
[macOS] [Linux] [Windows] [Hypercommit] [Listed in the Lulu MCP marketplace]
Why tokensave?
AI coding agents waste tokens exploring codebases. Every grep, glob, and file read costs money. On complex tasks, agents spawn multiple Explore sub-agents that scan hundreds of files just to build context.
tokensave gives agents a pre-indexed semantic knowledge graph. Instead of scanning files, the agent queries the graph and gets instant, structured answers -- the right symbols, their relationships, and source code, in one call.
How It Works
Without tokensave: Agents use grep, glob, and Read to scan files -- many API calls, high token usage.
With tokensave: Agents query the graph via MCP tools -- instant results, local processing, fewer tokens.
Key Features
Quick Start
1. Install
Choose one installation method:
You can also download a prebuilt binary and add it to your PATH.
To build unreleased code from the upstream master branch, see
Installing from upstream master.
Installation alternatives and language tiers
The default Cargo build includes all supported languages. For a smaller build:
Prebuilt release archives:
2. Configure your agent
Run the setup command to auto-detect your installed agents:
To choose an agent, use --agent (for example, codex, claude, or cursor):
Setup registers the MCP server and the agent's integration for Claude Code, Codex CLI, Gemini CLI, Cursor, Copilot, Kiro, Pi, Zed, and more than a dozen other agents. It also offers global Git hooks to keep initialized projects up to date. You can safely run setup again after upgrading. See Agent Integrations for project-local installs, several agents at once, and what setup writes for each agent.
3. Index your project
This creates a .tokensave/ directory with the knowledge graph database. A
repository you create with git init is initialized automatically on its first
commit or agent session (auto_init, on by default). After that,
tokensave sync updates the index incrementally, and a connected agent keeps it fresh automatically. Commands work
from any subdirectory of the project. See
Indexing and Freshness for details.
Documentation
The full documentation lives in docs/guide/ and is
mirrored to the GitHub Wiki.
The long-form User Guide walks through everyday use in more depth. To contribute, see CONTRIBUTING.md.
Origin
This project is a Rust port of the original CodeGraph TypeScript implementation by @colbymchenry. The port maintains the same architecture and MCP tool interface while leveraging Rust for performance and native tree-sitter bindings.
Building
To build from source, see Building from source and CONTRIBUTING.md.
Star History
[Star history]Sponsors
License
MIT License -- see LICENSE for details.
來源:README.md,提交 068aa3c
工具
0版本歷史
1- v4.0.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分