PlugWiki
Token Savior logo

Token Savior MCP Server: Code Navigation and Memory for AI Coding Agents

CommunityLocal
GetPyPItoken-savior-recallmibayy/token-savior

Lets Claude Code, Cursor and other coding assistants find and edit code by function name, and remember notes between sessions.

This is a community server by Mibayy. It runs on your computer as a Python program. It indexes the project folders you give it, with no account or key. Instead of reading a whole file, the assistant asks for one function, one caller list or one edit.

The README recommends the "optimized" setting, which shows the assistant 15 tools. The code default is "full", which shows all 72. Hidden tools stay callable by name. A separate command, ts init, can also add hooks to your Claude Code settings, covered in the safety section.

Good for

  • Developers whose assistant burns tokens reading whole files
  • People who want an assistant to remember project rules between sessions
  • Teams that want to measure how many tokens a coding agent wastes

Works in

12 should work

Tap an app to see how to set it up and any known problems.

Install Token Savior MCP

Claude Code

  1. 1

    Copy this prompt.

    Add the Token Savior MCP server to Claude Code. Run this command:
    
    claude mcp add token-savior -e WORKSPACE_ROOTS=<WORKSPACE_ROOTS> -- uvx --from token-savior-recall token-savior
    
    Ask me for WORKSPACE_ROOTS and only put the values in that config, nowhere else.
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires uv (Python 3.11+).

Use the uvx form with the --from option. The package has no command named token-savior-recall, so the shorter uvx token-savior-recall in the README fails to find a program to run. Set WORKSPACE_ROOTS to your project folders. The README advises "alwaysLoad": true in the config for Claude Code 2.1.28x and later, so the tools are not hidden behind tool search.

Built from the package data we hold. Not yet tested by us.

Tools

  • Finds where a function or class is defined

    Returns the file, line, signature and a preview for a name, definitions only, where a text search returns every mention. Looks at functions and classes first, then module constants.

    Try: “Where is parse_config defined?”

    Read · find_symbol

  • Reads one function without opening the file

    Returns the source of a function or method by name, with no path needed. Can take a list of names and a detail level.

    Try: “Show me the source of handle_request”

    Read · get_function_source

  • Reads one class with its methods

    Returns the body of a class including its methods, by name. Can batch up to ten names.

    Try: “Show me the UserSession class”

    Read · get_class_source

  • Reads an exact range of lines

    Returns lines start to end of a file, up to a cap of 400, and names the function or class that holds the first line. Meant for line numbers from stack traces or lint errors.

    Try: “Read lines 105 to 150 of app/server.py”

    Read · read_lines

  • Searches code and names the function around each hit

    Regex search over the project (or semantic ranking with semantic=true) where each hit also names the function or class that contains it. The description says to use it instead of Grep or rg.

    Try: “Find every place we call send_email”

    Read · search_codebase

  • Regex search that returns the enclosing symbol

    Returns each match with its file and line plus the function or class around it.

    Try: “Search for TODO inside function bodies”

    Read · search_in_symbols

  • Bundles a symbol with its callers and callees

    Returns the location, source and, at depth 1, dependencies and dependents. At depth 2 it adds change impact.

    Try: “Give me full context on process_order”

    Read · get_full_context

  • Collects what you need before editing a symbol

    Returns the source, direct dependencies, callers, siblings in the same file and impacted tests in one call.

    Try: “What do I need to know before changing validate_token?”

    Read · get_edit_context

  • Lists what a symbol calls

    Shows outgoing dependencies of a function or class, to a chosen depth.

    Try: “What does build_report call?”

    Read · get_dependencies

  • Lists who calls a symbol

    Shows the direct references to a symbol across the project.

    Try: “Who calls charge_card?”

    Read · get_dependents

  • Shows what a change could break

    Returns direct and transitive dependents of a symbol.

    Try: “What could break if I change User.email?”

    Read · get_change_impact

  • Finds the path between two functions

    Returns the shortest dependency path between two symbols using a breadth-first search of the graph.

    Try: “How does the router reach save_order?”

    Read · get_call_chain

Read from the source code

Permissions

high risk · 8 things to watch

High risk

The assistant can edit your source files, run project commands and delete saved snapshots and notes. Work in a git checkout, approve edit and run calls, and leave the ts init hook installer for later.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • It runs project commands on your machine

    run_project_action runs a discovered action such as an npm script, and get_diagnostics and run_impacted_tests run tsc, mypy, pyright or pytest. A project script runs with your permissions, so check the project first. github.com

  • ts_execute runs scripts with limited, not hard, isolation

    The script runs in a Node vm context with a short list of globals (no require or process) and can call 41 listed tools, among them replace_symbol_source, move_symbol, checkpoint (restore and delete), reindex and switch_project. run_project_action, get_diagnostics and run_impacted_tests are not on that list. The worker is a normal Node process with no OS sandbox, and Node says vm is not a security mechanism. github.com

  • It rewrites your source files

    replace_symbol_source, edit_lines_in_symbol, insert_near_symbol, move_symbol and add_field_to_model change files in place. Use git, and approve edits before they run. github.com

  • It can overwrite or delete saved data

    checkpoint with restore copies saved files back over your current ones, and with delete or prune removes snapshots. memory_delete archives notes and capture_purge deletes stored outputs. github.com

  • The optional installer adds always-on hooks to Claude Code settings

    `ts init --agent claude` merges four hook bundles into ~/.claude/settings.json, after printing a diff and saving a backup. Memory hooks (session start, every prompt, pre/post tool use, compaction, stop) and the tool-capture hook are active as soon as they are installed. The Bash rewriter is off until TS_BASH_REWRITE=1; once on, it answers permissionDecision allow for the commands it rewrites, so those skip the permission prompt. The discipline guard stays inert unless TS_DISCIPLINE_GUARD=1. github.com

  • Hidden tools can still be called

    The optimized profile only changes what is advertised. The code states that a filtered-out tool still runs if called by name. github.com

  • Tool descriptions push the assistant to use them

    search_codebase says to use it instead of Grep or rg on code. This steers the assistant away from its built-in tools, which is the product's purpose but worth knowing. The README adds that `alwaysLoad` is needed so the model does not reach for Read and Grep. Server-level instructions that push the same way exist but are off unless TS_DISCIPLINE=1. github.com

  • It writes files next to your code

    The index is cached in a .token-savior-cache.json file inside each project, so add it to your ignore file. github.com

Security advisories

No published security advisories as of Nov 1, 2026.

Technical details
Turning on read-onlyNo read-only mode is documented. The profile setting only changes which tools are advertised, and the code says handlers stay callable by name.
Sign-in and keysNo credentials. Memory notes and captures are stored in a local SQLite database under ~/.local/share/token-savior, or the folder named by TOKEN_SAVIOR_DATA_DIR or XDG_DATA_HOME.

Questions

Is Token Savior official?

No. It is a community project by Mibayy. It is not made by Anthropic, Cursor or any editor vendor.

How do I add Token Savior to Claude Code?

Use the install box above. Set WORKSPACE_ROOTS to your project folders. The README advises "alwaysLoad": true for Claude Code 2.1.28x and later.

How many tools does it have?

72 in the published 4.24.0 package, which is the default. The README says 68, which is out of date. With TOKEN_SAVIOR_PROFILE=optimized the assistant sees 15 of them.

Does it need an API key?

No. The README and package metadata name no key or account. The optional vector memory search installs an embedding library with the memory-vector extra.

Does the uvx command in the README work?

The package has no program named token-savior-recall, so uvx token-savior-recall does not match one. The install box uses uvx --from token-savior-recall token-savior.

Can I run it read-only?

No. There is no read-only mode. Even the 15-tool setting includes replace_symbol_source and add_field_to_model, and other tools stay callable by name.

Does it change my Claude Code settings?

Only if you run ts init. Installing the server alone does not. ts init --agent claude merges four hook bundles into ~/.claude/settings.json after printing a diff and saving a backup. The memory and tool-capture hooks are active once installed; the Bash rewriter and the discipline guard stay off until you set their environment variables.

Where is my memory stored?

In a local SQLite file named memory.db under ~/.local/share/token-savior by default. Set TOKEN_SAVIOR_DATA_DIR to move it.

What license is it under?

MIT. The published wheel includes the license file.

Information

updated Nov 2, 2026

Publisher
Community
Package
token-savior-recall
Registry
PyPI
Transport
stdio
Auth
None
Version
4.13.0
License
MIT
Last commit
Oct 15, 2026
Open issues
7
Listed in
Official MCP registry

WebsiteGitHubPyPIOfficial MCP RegistryChangelogIssues

Sources

Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.

Show all 4
  1. Token Savior README · github.com
  2. token-savior-recall on PyPI · pypi.org
  3. tool_schemas.py · github.com
  4. server.py · github.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.