
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 分