token-savior — Claude Code MCP server for code navigation
Search a codebase by symbol and carry project context across sessions. Useful when an agent needs to navigate code without repeatedly reading whole files.
claude mcp add --env WORKSPACE_ROOTS=<WORKSPACE_ROOTS> --env TOKEN_SAVIOR_CLIENT=<TOKEN_SAVIOR_CLIENT> --env TOKEN_SAVIOR_PROFILE=<TOKEN_SAVIOR_PROFILE> --transport stdio token-savior -- uvx token-savior-recallWhat token-savior does
token-savior gives coding agents structural code search and persistent memory across sessions. It can connect to Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, and Zed. Set WORKSPACE_ROOTS to the project paths the server should work with.
The optimized profile combines a smaller tool manifest, thinner input schemas, and memory settings designed for cross-project safety. Bash rewriting and output compaction are opt-in. In Claude Code, set alwaysLoad: true; otherwise, the server’s tools can sit behind ToolSearch while the agent falls back to Read and Grep.
What it helps with
- find symbol definitions and references across a project
- restore project context between agent sessions
- reduce the size of the tool manifest
- rewrite Bash commands and compact their output
Example prompts for the agent
- Find the definition and call sites for
UserServicein this project. - Restore the saved project context before changing the code.
- Compact Bash command output and rewrite commands before execution.
How to install token-savior
Platform CLI
claude mcp add --env WORKSPACE_ROOTS=<WORKSPACE_ROOTS> --env TOKEN_SAVIOR_CLIENT=<TOKEN_SAVIOR_CLIENT> --env TOKEN_SAVIOR_PROFILE=<TOKEN_SAVIOR_PROFILE> --transport stdio token-savior -- uvx token-savior-recallReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from token-savior-recall <command>
Platform CLI
codex mcp add token-savior --env WORKSPACE_ROOTS=<WORKSPACE_ROOTS> --env TOKEN_SAVIOR_CLIENT=<TOKEN_SAVIOR_CLIENT> --env TOKEN_SAVIOR_PROFILE=<TOKEN_SAVIOR_PROFILE> -- uvx token-savior-recallReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from token-savior-recall <command>
Config file
{
"mcpServers": {
"token-savior": {
"command": "uvx",
"args": [
"token-savior-recall"
],
"env": {
"WORKSPACE_ROOTS": "<WORKSPACE_ROOTS>",
"TOKEN_SAVIOR_CLIENT": "<TOKEN_SAVIOR_CLIENT>",
"TOKEN_SAVIOR_PROFILE": "<TOKEN_SAVIOR_PROFILE>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from token-savior-recall <command>
Config file
{
"servers": {
"token-savior": {
"type": "stdio",
"command": "uvx",
"args": [
"token-savior-recall"
],
"env": {
"WORKSPACE_ROOTS": "<WORKSPACE_ROOTS>",
"TOKEN_SAVIOR_CLIENT": "<TOKEN_SAVIOR_CLIENT>",
"TOKEN_SAVIOR_PROFILE": "<TOKEN_SAVIOR_PROFILE>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from token-savior-recall <command>
Platform CLI
gemini mcp add -e WORKSPACE_ROOTS=<WORKSPACE_ROOTS> -e TOKEN_SAVIOR_CLIENT=<TOKEN_SAVIOR_CLIENT> -e TOKEN_SAVIOR_PROFILE=<TOKEN_SAVIOR_PROFILE> token-savior uvx token-savior-recallReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from token-savior-recall <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about token-savior
How do I install token-savior in Claude Code?
Run claude mcp add token-savior -e WORKSPACE_ROOTS=<WORKSPACE_ROOTS> -- uvx token-savior-recall. Alternatively, use `claude mcp add --env WORKSPACE_ROOTS=<WORKSPACE_ROOTS> --env TOKEN_SAVIOR_CLIENT=<TOKEN_SAVIOR_CLIENT> --env TOKEN_SAVIOR_PROFILE=<TOKEN_SAVIOR_PROFILE> --transport stdio token-savior -- uvx token-savior-recall`.
What does token-savior do?
It provides structural code navigation by symbol and keeps project memory across sessions. Bash command rewriting and output compaction are available as opt-in features.
Why set alwaysLoad in Claude Code?
It makes the server’s tools available in the manifest without a ToolSearch lookup. Otherwise, the agent may use Read and Grep instead.