TokenSave

Developer tools

Code intelligence for 15+ languages: semantic graph queries instead of file reads. 37 MCP tools.

Your AI app calls the TokenSave MCP server, which does the developer tools work and sends the result back to the chat.

About TokenSave

TokenSave is a community MCP server from aovestdipaperino, filed in our directory under developer tools. Code intelligence for 15+ languages: semantic graph queries instead of file reads. 37 MCP tools.

TokenSave is listed in the official MCP registry as io.github.aovestdipaperino/tokensave, version 4.0.2.

At a glance

Publisher
aovestdipaperino (community)
Runs
See the README for setup
Install from
MCP bundle: https://github.com/aovestdipaperino/tokensave/releases/download/v4.0.2/tokensave-v4.0.2-aarch64-macos.mcp.tar.gz
Written in
Rust
License
MIT
GitHub stars
756
Official MCP registry
io.github.aovestdipaperino/tokensave

How to set up TokenSave

  1. Follow the install steps in the TokenSave README; it is written in Rust, so have that toolchain ready.
  2. Check the TokenSave README for keys or settings; the registry lists none that TokenSave requires.
  3. Add TokenSave to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the TokenSave tools to confirm the connection.
  5. Run one read-only task with TokenSave first, and keep your app asking before each tool call until the results look right.

TokenSave compared with similar servers

  • Feishu by cso1z has fewer GitHub stars than TokenSave (752 against 756); both are community servers, and both run locally.
  • Codanna by bartolli has more GitHub stars than TokenSave (765 against 756); both are community servers, and both run locally.
  • Openmcp Client by LSTM-Kirigaya has fewer GitHub stars than TokenSave (749 against 756); both are community servers, and both run locally.

Before you connect TokenSave

  • Give TokenSave its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each TokenSave tool call until you trust what it does with them.
  • Treat text that TokenSave fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for TokenSave on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for TokenSave

How marketing and sales teams put TokenSave to work, by company size. Pick the size closest to yours and start TokenSave on one use case.

Small business

  • A small business with a developer can use TokenSave to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Technical founders can ask TokenSave to explain and fix a marketing site issue without context switching between tools.
  • TokenSave runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineers can use TokenSave to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Marketing ops engineers can connect TokenSave to keep scripts and automations documented and versioned as they change.
  • Start TokenSave on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprise engineering teams can roll out TokenSave with repo scopes and audit logs, so agents work only where they are allowed.
  • Platform teams can standardize on TokenSave so web and marketing engineering share one reviewed way of working with AI.
  • TokenSave is a community server, so have security review the code and pin a version before TokenSave touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

TokenSave README

From aovestdipaperino/tokensave on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

Semantic Code Intelligence for AI Coding Agents

Fewer tokens • Fewer tool calls • 100% local

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

flowchart TB
    subgraph agent["AI Coding Agent (Claude Code, Codex, Gemini, Cursor, ...)"]
        task["Implement user authentication"]
        first["Sub-agent"]
        second["Sub-agent"]
        task --> first
        task --> second
        first --- second
    end

    subgraph server["tokensave MCP Server"]
        search["Search: auth"]
        callers["Callers: login()"]
        context["Context for task"]
        db[("libSQL Graph DB<br/>Instant lookups<br/>FTS5 search")]
        search --> db
        callers --> db
        context --> db
    end

    first --> search
    first --> callers
    second --> context

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

Smart Context Building Semantic Search Impact Analysis
One tool call returns everything the agent needs -- entry points, related symbols, and code snippets. Find code by meaning, not just text. Search for "authentication" and find login, validateToken, AuthService. Know exactly what breaks before you change it. Trace callers, callees, and the full impact radius of any symbol.
80+ MCP Tools 50+ Languages 12+ Agent Integrations
From call graph traversal to dead code detection, atomic edit primitives, code-health metrics, test mapping, and complexity analysis. Rust, Go, Java, Python, TypeScript, C, C++, Swift, Vue, Svelte, Astro, and 43 more including WGSL/HLSL/Metal shaders, CUDA/HIP, and Markdown. Three tiers (lite/medium/full) control binary size. Claude Code, Codex CLI, Gemini CLI, Qwen Code, Kiro, Cursor, OpenCode, Copilot, Cline, Roo Code, Zed, Antigravity, Kilo CLI, Kimi CLI, Mistral Vibe, Grok Build, Factory Droid, OMP, Pi, Plank.
Multi-Branch Indexing 100% Local Always Fresh
Per-branch databases, tracked automatically as you check out branches. Cross-branch diff and search without switching your checkout. No data leaves your machine. No API keys. No external services. Everything runs on a local libSQL database. On-demand staleness check on every MCP call (30 s cooldown) plus catch-up sync when the server connects. Multi-agent work is expected to use git worktrees, each agent gets its own checkout and the index diverges are merged by git, not by a file watcher.
Subprocess-Isolated Extraction Code-Health Analytics Atomic Edit Primitives
A native crash in any tree-sitter grammar (abort, segfault, anything) kills only the worker; the pool respawns it and sync continues. Sync never dies on a malformed file. Composite health score (0-10000), Gini inequality, file-DAG depth, design-structure matrix, risk-weighted test gaps, and session deltas. Edit files without regex or shell-quoting hazards: unique-anchor str_replace, atomic multi-replace, AST-rewrite, anchored insert. Auto re-indexes after writes.

Quick Start

1. Install

Choose one installation method:

Platform Command
Any platform (Cargo) cargo install tokensave
or, with cargo-binstall, cargo binstall tokensave
macOS (Homebrew) brew install aovestdipaperino/tap/tokensave
Windows (Scoop) scoop bucket add tokensave https://github.com/aovestdipaperino/scoop-bucket
scoop install tokensave

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:

cargo install tokensave --no-default-features --features medium
cargo install tokensave --no-default-features    # lite (smallest binary)

Prebuilt release archives:

Platform Archive
macOS (Apple Silicon) tokensave-vX.Y.Z-aarch64-macos.tar.gz
Linux (x86_64) tokensave-vX.Y.Z-x86_64-linux.tar.gz
Linux (ARM64) tokensave-vX.Y.Z-aarch64-linux.tar.gz
Windows (x86_64) tokensave-vX.Y.Z-x86_64-windows.zip

2. Configure your agent

Run the setup command to auto-detect your installed agents:

tokensave install

To choose an agent, use --agent (for example, codex, claude, or cursor):

tokensave install --agent codex

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

cd /path/to/your/project
tokensave init

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.

Topic What it covers
Installation and Upgrades Language tiers, self-upgrade and channels, versioning, building from source
Agent Integrations Supported agents, project-local setup, what install writes
Indexing and Freshness Project discovery, index freshness, crash-resilient sync, custom extensions
MCP Tools The 80+ tools by category, cross-project queries, MCP resources
Multi-Branch Indexing Per-branch graphs, automatic tracking, branch quality regressions
Token Tracking and Cost Savings ledger, cost reports, live monitor, memory diagnostics
Performance Profiling Opt-in latency attribution for database operations, MCP tool phases and indexing
CLI Reference Every command at a glance
Open Knowledge Format Validate, export and import OKF bundles, and search imported knowledge
Supported Languages Language tiers, extractor development, and known limitations
Network Calls and Privacy What leaves your machine and how to opt out
Troubleshooting tokensave doctor and common problems
Benchmarks Retrieval-savings and performance benchmarks
Comparisons tokensave compared with CodeGraph and alternatives

The long-form User Guide walks through everyday use in more depth. To contribute, see CONTRIBUTING.md.

80+ MCP Tools

The server exposes more than 80 tools (one fewer when the optional ast-grep binary is not on PATH). Since 7.14.0 only the 11 core tools plus tokensave_more are listed by default; the rest are listed on demand through tokensave_more, stay callable by name, and are all listed with "tools": "full". The tables below group the most commonly used ones by category. Most are read-only, safe to call in parallel, and annotated with readOnlyHint. The edit primitives are scoped to single files and re-index in place; session baseline and memory-recording tools also mutate local .tokensave state and are annotated as non-read-only. The three core tools (tokensave_context, tokensave_search, tokensave_status) are marked anthropic/alwaysLoad so they bypass the client's tool-search round-trip.

Query another initialized project

Semantic read tools can query an explicitly selected local graph without restarting the MCP server:

{
  "query": "screenGate",
  "graph_root": "/absolute/path/to/typewhisper"
}

Selected results include canonical root/branch provenance. Node IDs are namespaced to that graph, and the matching selectors must be repeated on follow-up calls. For example, a follow-up to a branch-selected query includes both values:

{
  "node_id": "graph:<fingerprint>:function:<raw-id>",
  "graph_root": "/absolute/path/to/typewhisper",
  "graph_branch": "feature/auth"
}

graph_root must be the exact absolute root of an already initialized project. graph_branch is optional and, when supplied, must name a tracked branch. Selected opens are read-only: they never initialize, sync, migrate, auto-track, or write graph/source data. They also do not contribute to savings accounting. Calls without selectors behave exactly as before.

tokensave_search and tokensave_files also accept an array of roots to federate one request across several graphs. A multi-root array may include the project already served by the MCP server; that project participates as a read-only member of the federation. Unusable roots are reported as skipped when at least one root succeeds, and worktrees of the same repository are collapsed with the omitted paths reported. A scalar root or one-element array that names the served project remains invalid; omit graph_root for that single-project call.

graph_root is only useful if you know the other project exists, so the server tells you: initialized projects sitting directly beside the served root are named in the MCP instructions, in tokensave_status, and in empty tokensave_search / tokensave_context results, the point at which a session would otherwise conclude a symbol does not exist rather than look next door (#375). Only immediate siblings are offered, at most five, and nothing is opened or indexed on their behalf; querying one still requires an explicit graph_root.

Selectors are intentionally unavailable on tools that write, shell out, or depend on the current checkout: the edit primitives, VCS and branch tools, diagnostics and test execution, dependency and runtime introspection, workflow and session-memory tools, the persistent-cache tool (tokensave_redundancy), and server administration. Those tools reject a selector instead of silently ignoring it.

Discovery

Tool Purpose
tokensave_context Get relevant code context for a task -- entry points, related symbols, code snippets
tokensave_search Find symbols by name (functions, classes, types)
tokensave_node Get details + source code for a specific symbol
tokensave_files List indexed project files (source and tracked artifacts) with filtering
tokensave_module_api Public API surface of a file or directory
tokensave_similar Find symbols with similar names
tokensave_annotations Attribute/annotation/decorator introspection -- histogram of all annotations or per-site listings with target filters
tokensave_doc Companion Markdown documentation for a source file -- doc content, the files it covers, and a staleness signal
tokensave_dependencies Package-manifest introspection across 17 ecosystems -- workspace summary, per-package lookup, license surface, version drift
tokensave_status Index status, statistics, tokens saved
Custom source extensions

Map extensions to an enabled extractor in .tokensave/config.json:

"language_aliases": { ".t": "perl", ".ep": "perl" }

This parses legacy Perl tests without renaming them. Keys accept an optional leading dot and match case-insensitively; invalid, conflicting, unknown, or disabled mappings fail sync with a configuration error. Aliases override built-in extension associations and artifact tracking. Use existing project.json entries with language for file/glob overrides, which take priority over aliases. Run tokensave sync after editing mappings (sync -f also works). See the configuration guide.

Non-code artifacts

tokensave_files covers more than source. Files whose extension is listed in artifact_extensions (.feature, .json, .yaml, .yml, .sql, .toml, .proto, .graphql, .md, .bnd, .bndrun by default) are tracked by path so questions like "where are the .feature files for the login flow?" have a graph answer rather than a blocked find (#323). They are never parsed and contribute no symbols; kind: "artifact" and kind: "code" filter between the two, and analyses that mean "code" exclude them. An extension already handled by a language extractor is ignored in this list, so it cannot be used to stop a language being parsed.

The list also decides what literal search can look inside (#442). A literal (literal: true) search over tokensave_search reads bytes rather than symbols, so it needs no parser -- but it iterates the indexed files, so it can only reach a file the index holds a row for. A tracked .rst document or .tmpl template has neither an extractor nor a default artifact entry, so its matches are missing; add the extension here and run tokensave sync -f and its lines are searched like any other, reported with enclosing: null since there is no symbol context. A literal response that could not reach every tracked file says so in an unscanned block naming the count and the extensions, so a partial answer is never presented as a complete one.

Call Graph & Impact

Tool Purpose
tokensave_callers Find what calls a function
tokensave_callees Find what a function calls
tokensave_impact See what's affected by changing a symbol
tokensave_affected Find test files affected by source changes
tokensave_rename Graph-based rename: every site with a confidence class (exact, heuristic, ambiguous, text_only), a diff preview, and an all-or-nothing apply. Not binding-aware
tokensave_hotspots Most connected symbols (highest call count)

Code Quality

Tool Purpose
tokensave_complexity Rank functions by cyclomatic & cognitive complexity, nesting depth, Halstead metrics, maintainability index, CRAP, and safety metrics
tokensave_dead_code Find unreachable symbols (no incoming edges; symbols named as an ambiguity candidate are excluded)
tokensave_ambiguous_calls Call sites the resolver could not pin to one target, with every tied candidate
tokensave_god_class Find classes with too many members
tokensave_coupling Rank files by fan-in/fan-out
tokensave_inheritance_depth Find the deepest inheritance hierarchies
tokensave_circular Detect circular file dependencies
tokensave_imports Module-level import dependencies, cycles, and cut simulation
tokensave_recursion Detect recursive/mutually-recursive call cycles
tokensave_unused_imports Import statements never referenced
tokensave_doc_coverage Public symbols missing documentation
tokensave_simplify_scan Quality analysis of changed files (duplications, dead code, complexity)

Code-Health Analytics

Five tools surface structural quality signals from the existing graph. The composite score uses a geometric mean over independent dimensions so no single one can be gamed.

Tool Purpose
tokensave_health Composite quality signal (0-10000) from acyclicity, depth, equality, redundancy, and modularity
tokensave_gini Gini inequality coefficient for any metric (complexity, lines, fan-in/out, members) -- finds god files and uneven distribution
tokensave_dependency_depth Longest file-level dependency chains (Lakos levelization) with full chain reconstruction after Tarjan SCC cycle-breaking
tokensave_dsm Design Structure Matrix in stats, clusters, or matrix form -- reveals layering violations and hidden coupling
tokensave_test_risk Risk-weighted test-gap analysis combining complexity, fan-in, coverage, and 90-day git churn into a single score

Sessions

Snapshot health metrics at the start of an AI coding session, then diff at the end to see what improved or regressed.

Tool Purpose
tokensave_session_start Save current health metrics as a JSON baseline for later comparison
tokensave_session_end Recompute and diff against the baseline -- per-dimension deltas, pass/fail, automatic cleanup

Edit Primitives

Four writer tools that let agents modify files without regex or shell-quoting hazards. Each is single-file, anchored, and triggers an in-place re-index after writing so the graph never goes stale.

Tool Purpose
tokensave_str_replace Replace a unique old_str with new_str; fails if 0 or >1 matches (protects against multi-edit bugs)
tokensave_multi_str_replace Apply N (old, new) replacements atomically -- all-or-nothing transaction
tokensave_insert_at Insert content before or after a unique anchor string or line number
tokensave_ast_grep_rewrite Structural code rewrite via the ast-grep CLI in --rewrite mode

Git & Workflow

Tool Purpose
tokensave_diff_context Semantic context for changed files -- modified symbols, dependencies, affected tests
tokensave_commit_context Semantic summary of uncommitted changes for commit message drafting
tokensave_pr_context Semantic diff between git refs for pull request descriptions
tokensave_changelog Semantic diff between two git refs
tokensave_test_map Source-to-test mapping at the symbol level, with uncovered symbol detection
tokensave_test_coverage Per-file/symbol/test-fn coverage rollup with transitive call-edge expansion

Type System

Tool Purpose
tokensave_type_hierarchy Recursive type hierarchy tree for traits, interfaces, and classes
tokensave_rank Rank nodes by relationship count (most implemented interface, most extended class)
tokensave_distribution Node kind breakdown per file or directory
tokensave_largest Rank nodes by size -- largest classes, longest methods

Porting

Tool Purpose
tokensave_port_status Compare symbols between source/target directories to track porting progress
tokensave_port_order Topological sort of symbols for porting -- port leaves first, then dependents

Multi-Branch

Tool Purpose
tokensave_branch_search Search symbols in another branch's graph
tokensave_branch_diff Compare symbols between branches; quality: true compares structural quality
tokensave_branch_list List tracked branches with DB sizes and sync times
Branch quality regressions

Compare two existing branch indexes at their Git tips:

tokensave quality-diff --base master --target feature/example
tokensave quality-diff --base master --target HEAD --json --fail-on regression
tokensave quality-diff --base origin/master --target feature/example --cyclomatic 15 --min-increase 5

Each reference must resolve to a commit and name a tracked Tokensave branch. HEAD resolves to the current symbolic branch; detached HEAD requires an explicit branch. Full refs/heads/... and refs/remotes/... names are accepted. Create and sync each index explicitly using the existing tokensave branch add / sync workflow before comparing. Comparison never checks out a branch or rebuilds an index. Missing indexes and empty analysis data are errors, including comparisons of a branch against itself.

The baseline is tip to tip, not the merge base. On diverged branches, a reported difference can originate on either branch; this is not proof that a feature introduced the difference since branching.

Supported diagnostics reuse extracted/indexed data:

Code Metric / identity Default threshold
Q_COMPLEXITY_CYCLOMATIC Function branches + 1 >10
Q_COMPLEXITY_COGNITIVE Extracted cognitive complexity >15
Q_FUNCTION_LINES Inclusive function span >100
Q_FILE_FAN_OUT / Q_FILE_FAN_IN Distinct files reached by resolved calls/uses, or reaching this file >10
Q_CYCLIC_DEPENDENCY_EDGE Directed file edge inside a cyclic strongly connected component Present

Change thresholds with --cyclomatic, --cognitive, --function-lines, and --fan-out (the latter applies to both fan-in and fan-out). Existing above-threshold issues become worsened when their metric increases by at least --min-increase (default 3); smaller increases remain unchanged for gating. Crossing a threshold is new; falling below it or deletion is resolved; a decrease above it is improved. Pre-existing cyclic edges remain unchanged. An existing edge becoming cyclic is new, even if the edge itself predates the comparison. Cycles are reported as edges in cyclic components, not as an enumerated cycle path.

JSON includes deterministic diagnostic order, codes, categories, warning severity, identities, base/target values, locations (1-based for functions), confidence, classification counts and limitations. --fail-on regression exits 1 for new or worsened findings, 0 otherwise. Operational errors and explicitly accepted incomplete results exit 2, independently of --fail-on. Without the flag, complete comparisons exit 0. JSON mode writes a single JSON document to stdout, including on operational errors.

The existing MCP tool accepts the same comparison through:

{"base":"master","head":"feature/example","quality":true,"limit":20,"thresholds":{"cyclomatic":10,"min_increase":3}}

The MCP report shares the CLI schema. Counts cover all findings; details default to 20 (maximum 500), with truncated and total_findings outside the report. Use limit: 0 for counts only. thresholds accepts the option names in the table (cyclomatic, cognitive, function_lines, fan_out), plus min_increase and allow_stale; unknown options are rejected. File/kind filters are rejected in quality mode because cyclicity and coupling require global evidence. No additional MCP tool is exposed. Quality calls skip automatic per-call sync/version reindex; other independent activity in an already-running server retains its normal behavior.

Freshness validation hashes indexed files against Git blobs with the same source decoder as indexing, accepting LF/CRLF line-ending conversion from Git checkout or commit normalization. A mismatched/deleted file or an unindexed source candidate is reported as stale/incomplete. Candidate discovery respects configured exclusion, hidden-file and size rules; branch-specific ignore or manifest policies may explain a candidate, so it is described as uncertain. --allow-stale (MCP thresholds.allow_stale) permits inspection with complete: false and exit 2; it never silently accepts stale evidence as a clean CI result. complete means these index-content checks passed, not that every language or dependency was analyzed. Configured exclusions and unsupported languages remain outside scope; extractor metrics left at zero do not prove low complexity. Indexes must use comparable analysis versions/configuration. Validation does not certify resolver completeness or detect arbitrary manual edits to graph rows.

Locations do not participate in identity. Git-detected file renames normalize function and dependency identities, while qualified symbol names identify functions. Symbol renames, moves not detected by Git, and ambiguous overloads cannot be matched reliably: unmatched findings explicitly carry confidence: "unmatched", and ambiguous same-name/kind/signature metrics are excluded from both snapshots and make the result incomplete. Overloads use their signatures to distinguish otherwise identical qualified names. Review unmatched new/resolved pairs before using them as defects; they can still affect CI. Function-size findings use source span, not executable statement count. Architecture policy, dead-code, test reachability/coverage and module-size regressions are deferred.

Snapshots are read sequentially in database read transactions. Symbol bodies are loaded one indexed file at a time; only compact metric records survive into the comparison. File adjacency and the existing iterative SCC algorithm require O(files + resolved file dependencies) space/time for cycle analysis. No individual cycles are enumerated. Validation uses one Git batch process per snapshot and one decoded blob at a time (64 MiB maximum); it reads indexed content plus Git tree metadata, without scanning the working tree. Total cost also scales with indexed source bytes and symbols; this deliberately trades some I/O for verifiable freshness without commit provenance. No caches, worker pools or background jobs are created by the comparison. Large JSON reports can be substantial; use MCP counts or limited details when token budget matters.

MCP Resources

Four resources are exposed via resources/list and resources/read:

  • tokensave://status -- graph statistics as JSON
  • tokensave://files -- indexed file tree grouped by directory
  • tokensave://overview -- project summary with language distribution and symbol kinds
  • tokensave://branches -- tracked branches with DB sizes and parent info

Token Tracking

tokensave measures the tokens it saves on every MCP tool call. Each tool response includes a tokensave_metrics: before=N after=M line showing how many raw-file tokens were avoided by that specific call.

Turning the reporting off. The metrics line, together with a sentence in the MCP instructions, asks the agent to report savings to you, which means the model spends output tokens narrating a saving tokensave made on input tokens. Output tokens are the more expensive kind, so if your agent mentions tokensave on nearly every turn, that narration can offset the win (#356). Set report_savings to false in .tokensave/config.json, or the TOKENSAVE_REPORT_SAVINGS environment variable to override it per-run (any value enables it except 0, false, no, off, or empty). Both the metrics line and the instruction disappear; tokensave install likewise stops writing the reporting rule into agent prompt files. Measurement is untouched either way, every call still lands in the savings ledger, so tokensave gain, tokensave list, status and monitor keep reporting exactly as before. The default stays true.

Only the core tools are listed by default. An MCP client sends the schema of every listed tool on every turn, before any tool is called. The full tokensave surface is about 89 KB of schema, which on a small-context model can be more than half of the window (#576). So tools/list sends only the core tools: context, search, status, read, body, files, callers, callees, impact, str_replace and multi_str_replace (about 17 KB with tokensave_more). The initialize instructions name these tools and the areas tokensave_more can list, so a client that defers tool schemas still knows the rest exist. The setting selects what the server lists, not what it can run: a tool that is not listed still answers a call by name, so agent permission lists and hooks keep working. To list every tool, set "tools": "full" in .tokensave/config.json, or TOKENSAVE_TOOLS=full in the environment of the MCP server; the environment variable wins over the file. A "tools": "full" written by 7.13.0, which wrote it into every config it saved, is read as the old default; set it again after upgrading to keep the full list.

With the core toolset the server also lists tokensave_more. A call with an area (analysis, edit, git, memory, navigate or all) lists the tools of that area for the rest of the session, and the server sends notifications/tools/list_changed so the client fetches the list again. A session pays only for the areas it uses: the git area adds about 6 KB. A client that ignores list_changed keeps the core list. tokensave install grants tokensave_more along with every other tool, so it does not prompt; an install from before this release prompts once, until tokensave reinstall or the upgrade resync refreshes the permission list.

To keep a whole area out of every list, for example when another MCP server already supplies those tools, set disabled_tool_areas in ~/.tokensave/config.toml; see MCP tools.

Cost observability

tokensave cost                     # 7-day cost summary (default)
tokensave cost today               # today only
tokensave cost --by-model          # breakdown by Claude model
tokensave cost --by-task           # breakdown by task category (coding, debugging, exploration, ...)
tokensave cost --export json       # JSON export to stdout
tokensave cost --export csv        # CSV export to stdout

Parses Claude Code session transcripts (~/.claude/projects/**/*.jsonl), classifies each API turn into one of 13 task categories, computes dollar cost using model pricing, and stores results in ~/.tokensave/global.db for fast aggregate queries. Pricing is refreshed from LiteLLM every 24 hours and falls back to an embedded table when offline.

The tokensave status header includes a cost row showing today's spend, 7-day total, and efficiency ratio (tokens saved / total tokens). The tokensave monitor TUI shows a live cost panel alongside the savings feed. At the end of each Claude Code session, the hook_stop handler prints a one-line receipt to the terminal.

Task classification categories: Coding, Debugging, Feature Dev, Refactoring, Testing, Exploration, Planning, Delegation, Git Ops, Build/Deploy, Brainstorming, Conversation, General. Classification is deterministic (pattern matching on tool names and Bash commands), requires no LLM calls, and is adapted from AgentSeal/codeburn.

Live monitor

tokensave monitor

A global TUI that shows MCP tool calls from all projects in real time, via a shared memory-mapped ring buffer at ~/.tokensave/monitor.mmap. Each entry shows the project name, tool name, and token delta. A cost panel at the top shows today's spend, savings, efficiency, and top model (refreshed every 30 seconds).

Read the rest of the TokenSave README on GitHub

Questions about TokenSave

What is the TokenSave MCP server?

Code intelligence for 15+ languages: semantic graph queries instead of file reads. 37 MCP tools. TokenSave is maintained by aovestdipaperino on GitHub at aovestdipaperino/tokensave, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the TokenSave MCP server?

TokenSave doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (aovestdipaperino/tokensave). Like most servers, TokenSave ends with a command or URL you paste into your AI app's MCP config.

Does TokenSave need an API key?

The registry lists no required keys for TokenSave. Check the TokenSave README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is TokenSave an official MCP server?

No. TokenSave is a community server maintained by aovestdipaperino. Community servers can be excellent; read the code and the open issues before you give TokenSave access to company data.

What license is TokenSave under?

TokenSave is released under the MIT license, according to its GitHub repository. The license covers the code of TokenSave; the service it connects to has its own terms.