token-savior MCP工具 是 AI Skill Hub 本期精选MCP工具之一。综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
MCP服务器工具,增强Claude编码能力,通过智能token管理优化API成本和响应速度。适合需要高效编码助手、降低API开支的开发者和团队使用。
token-savior MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
MCP服务器工具,增强Claude编码能力,通过智能token管理优化API成本和响应速度。适合需要高效编码助手、降低API开支的开发者和团队使用。
token-savior MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/Mibayy/token-savior
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"token-savior-mcp--": {
"command": "npx",
"args": ["-y", "token-savior"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 token-savior MCP工具 执行以下任务... Claude: [自动调用 token-savior MCP工具 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"token-savior_mcp__": {
"command": "npx",
"args": ["-y", "token-savior"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
Release notes live where they can't drift out of sync with the code:
pip will actually give you---
```bash pip install "token-savior-recall[mcp]"
pip install "token-savior-recall[mcp]"
Add to your MCP config (e.g. Claude Code):
{
"mcpServers": {
"token-savior-recall": {
"command": "/path/to/venv/bin/token-savior",
"alwaysLoad": true,
"env": {
"WORKSPACE_ROOTS": "/path/to/project1,/path/to/project2",
"TOKEN_SAVIOR_CLIENT": "claude-code",
"TOKEN_SAVIOR_PROFILE": "optimized"
}
}
}
}
"alwaysLoad": true matters on Claude Code (2.1.28x and later): without it, every tool of the server sits behind ToolSearch and the model reaches for Read and Grep, which are already loaded. Measured on this project's benchmark before the option existed: one session in 143 called a Token Savior tool. With it, the manifest costs a few thousand cached tokens per session.
That's it. TOKEN_SAVIOR_PROFILE=optimized ships the Pareto-optimum config that wins tsbench. It bundles:
tiny_plus (15 hot tools manifest)No other tuning needed.
---
pip install "token-savior-recall[mcp,memory-vector]" ```
uvx token-savior-recall
All optional. Values shown as =1 also accept nothing else — set exactly 1; values shown as bool accept 1/true/yes (and on where noted).
For agents without MCP (Cursor, Aider, Continue, scripts, CI), the ts command exposes a subset of the tools via shell:
ts use /path/to/project
ts get my_function # JSON output
ts search 'pattern'
ts daemon start # ~145ms per call vs 1.5s cold fork
ts init --agent cursor # wire up Bash hooks for non-Claude agents
On Claude Code, prefer the MCP server -- measured cheaper than CLI on Opus 4.7. The CLI is there for the portability case.
---
| Profile | Tools exposed | Manifest tokens | When to use |
|---|---|---|---|
**optimized** | **15** | **~1.5 KT** | **Recommended default -- Pareto win on tsbench** |
auto | adaptive | ~1-2 KT | Per-client telemetry-based (experimental) |
tiny | 6 | ~0.6 KT | Minimal hot loop |
lean | 51 | ~4 KT | Legacy -- broader surface |
**compact-only** | **1** | **~0.3 KT** | **Bash layer only (rewriter + capture) -- you already run symbol nav elsewhere** |
full | 68 | ~6 KT | Everything exposed |
You probably want optimized.
---
token-savior 是一个旨在优化 AI Agent 上下文效率的工具,通过智能管理 Token 使用,帮助开发者在与 Claude 等大模型交互时,更精准地检索和利用项目信息,从而降低成本并提升回答质量。
本项目引入了创新的上下文管理机制,支持通过 MCP 协议与 Claude Code 等工具无缝集成。其核心特性包括针对 Bash 命令的自动压缩与重写功能,以及可选的混合向量搜索(Hybrid Vector Search)模式,能够显著提升长上下文场景下的信息检索精度。
你可以通过 pip 安装支持 MCP 功能的版本:`pip install "token-savior-recall[mcp]"`。如果你希望使用混合向量搜索功能,请安装 `pip install "token-savior-recall[mcp,memory-vector]"`。此外,推荐使用 uvx 直接运行,无需创建虚拟环境或克隆仓库:`uvx token-savior-recall`。
安装完成后,只需将配置添加到你的 MCP 配置文件(例如 Claude Code)中即可快速上手。通过设置 `TOKEN_SAVIOR_PROFILE=optimized`,系统将自动启用优化模式,确保在与 AI 交互时实现最佳的 Token 利用率。
用户可以通过环境变量进行深度定制。例如,使用 `TS_BASH_COMPACT` 开启 Bash 输出压缩,或使用 `TS_BASH_REWRITE` 开启命令重写功能。此外,还可以通过 `TS_COMPACT_INLINE_THRESHOLD` 调整混合模式的阈值。对于 MCP 配置,需在 JSON 中指定正确的 `command` 路径及 `WORKSPACE_ROOTS` 等环境变量。
针对不支持 MCP 协议的 Agent(如 Cursor、Aider、Continue 或自定义脚本),我们提供了 `ts` CLI 工具。通过 Shell 命令,你可以实现 `ts use` 指定项目、`ts get` 获取特定函数信息以及 `ts search` 模式搜索。此外,运行 `ts daemon start` 可启动守护进程,将调用延迟从 1.5s 降低至约 145ms。
853星的MCP工具,聚焦Claude编码效率与成本优化。设计思路清晰,社区认可度高,是Claude工具链中有价值的补充。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,token-savior MCP工具 在MCP工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | token-savior |
| 原始描述 | 开源MCP工具:The MCP server that turns Claude into the only coding agent hitting 100% on a re。⭐853 · Python |
| Topics | MCP服务器Claude增强编码优化Token管理成本控制 |
| GitHub | https://github.com/Mibayy/token-savior |
| License | MIT |
| 语言 | Python |
收录时间:2026-05-16 · 更新时间:2026-05-19 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端