Structural code intelligence MCP server offering symbol-based navigation, dependency graphs, call chains, and token-efficient code analysis.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag โ we're steadily working through the catalog.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Token Savior.
One MCP server. One profile. 97.9% on tsbench at -80% tokens. Structural code navigation, persistent memory, and Bash command rewriting for AI coding agents.
mibayy.github.io/token-savior -- project site + benchmark landing Benchmark source + fixtures: not currently published (see Reproducing the score below)
| Plain Claude Code | With Token Savior | |
|---|---|---|
| Score | 141 / 180 (78.3%) | 188 / 192 (97.9%) |
| Active tokens / task | 17 221 | 3 395 (-80%) |
| Wall time / task | 110.6 s | 18.9 s (-83%) |
Reproduces with the optimized profile (single env var). The harness that
produced these numbers is described below; its repository is not public at the
moment, so take the figures as reported rather than as independently verifiable.
A re-measurement was published here on 2026-08-09 and has been withdrawn on
2026-08-10. It reported new-token savings from a small replacement harness.
Those numbers did not measure this server at all: across 143 benchmark
sessions, exactly one called a Token Savior tool. The client running the
harness had MCP deferred-tool loading enabled, so all 18 tools sat behind a
ToolSearch lookup instead of appearing in the model's manifest. The model
never saw them and fell back to Grep and Read โ 66 greps, 30 reads, one
MCP call. What varied between the "profiles" was the size of the cached
prefix, not what the agent did.
The lesson is worth more than the numbers were: a benchmark of an MCP server must assert that its tools were actually called. Ours did not, so it happily compared two identical agents. That assertion now exists in the harness.
The headline figures above therefore stand as reported and unverified, as stated in the previous paragraph. Re-measuring them properly is open work.
On June 30, 2026 GitHub restricted stargazer and watcher lists to repo admins and collaborators, which broke every "who starred my repo" tool at once. I rebuilt one that still works, precisely because it only reads repos you own or can push to: starscope ranks the people who starred or forked your repo by influence, and surfaces their social accounts when their GitHub profile declares them.
Numbers on this very repo, computed with it: 1,147 people, 27% with a public social account, and the most followed carries 18,922 followers. The named list is visible to the repo owner and to nobody else โ the public page shows aggregates only.
Release notes live where they can't drift out of sync with the code:
pip will actually give youAdd to your MCP config (e.g. Claude Code):
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.
Bash compaction and the PreToolUse rewriter are opt-in. Two env vars and one CLI call:
ts init is idempotent. It detects existing hook entries, dedups by
(matcher, command), prints a unified diff, and backs up settings.json
to .bak-YYYYMMDD-HHMMSS (UTC) before writing. Supported agents:
claude, cursor, gemini, codex, openclaw. Pass --dry-run to preview, or
--global to write the user-level config.
Optional audit log of every rewrite:
| Family | Compactors |
|---|---|
| git | status, diff, log, push/pull, commit, add, fetch, checkout, branch, worktree list, stash list |
| gh | run list, run view, pr diff, pr view, issue view, repo view |
| test/lint | pytest, jest, vitest, eslint, biome, cargo test, cargo build/clippy, tsc |
| cloud | kubectl get, kubectl logs, aws sts, aws ec2, aws lambda, aws logs, aws iam, aws dynamodb, aws s3 |
| docker | docker ps, docker logs |
| packaging | npm/yarn/pnpm list, pip list/show |
| shell catch-alls | grep, find, cat, curl |
Each compactor is a pure function (no I/O, no globals) returning a
token-efficient rendering. The dispatcher returns None when no matcher
fires, leaving the existing sandbox path untouched. Compound commands
(cd ... && cmd) fall through to the last meaningful segment.
These run in PostToolUse, so they do not shrink the current turn. The hook fires after the tool has returned; it can add context, not remove it. The compact rendering is appended below the raw output, which stays. What you gain is persistence: the full output goes to the capture sandbox and outlives a context compaction. For an actual reduction of what reaches the model, use the PreToolUse rewriter (
TS_BASH_REWRITE=1) โ it edits the command before it runs.
ts_discover -- find missed TS opportunitiesNew MCP tool that scans your Claude Code transcripts for patterns where TS tools would have been cheaper than what the agent actually did.
Findings: Read->Grep->Read chains, sequential find_symbol, edits
without get_edit_context, memory_search without memory_index,
native shell on code files. Args are pruned to load-bearing keys
(PII-safe). Streams JSONL with mtime fast-skip.
ts init CLIDetects the target agent's settings location, deep-merges the Token
Savior hook config (PostToolUse + PreToolUse), preserves existing
hooks, dedups, prints a unified diff. Backs up to
settings.json.bak-YYYYMMDD-HHMMSS (UTC). Re-running is a no-op.
Claude Code reads whole files to answer questions about three lines, and forgets everything the moment a session ends. Token Savior fixes both, plus a third axis: it bounds the noisy Bash output that bloats turn budgets between code reads โ by rewriting the command before it runs.
It indexes your codebase by symbol -- functions, classes, imports, call
graph -- so the model navigates by pointer instead of by cat. Measured
reduction: 97% fewer chars injected across 170+ real sessions.
On top of that sits a persistent memory engine. Every decision, bugfix, convention, guardrail and session rollup is stored in SQLite WAL + FTS5
And on top of that, since v4.1, sit the Bash compactors and the PreToolUse rewriter. Bench numbers above.
Which of those two actually shrinks a turn, and which does not. Measured 2026-08-09, and worth stating plainly because the distinction is not obvious:
If your goal is a smaller turn, TS_BASH_REWRITE=1 is the switch that does
it. If your goal is to stop losing command output across compactions, that is
TS_BASH_COMPACT=1.
Factual signals from GitHub, npm, and our automated checks โ not a rating.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mibayy-token-savior)<a href="https://allmcps.com/mcp/mibayy-token-savior"><img src="https://allmcps.com/api/badge/mibayy-token-savior?style=directory" alt="Token Savior on AllMCPs" /></a>