# JSungMin/vs-token-safer [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/JSungMin/vs-token-safer  
**GitHub Stars:** 16  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/jsungmin-vs-token-safer

## Description
Routes an AI coding agent's code search through an official language-server index (clangd / Roslyn / tsserver / pyright) instead of grep, returning a token-capped file:line list with no source bodies — 20× fewer tokens. Also symbol-level edit-by-name, a Bash-grep→indexed-query rewrite hook, and git/p4 output compaction. Local-only, no IDE. Claude Code plugin + vts CLI.

## Tools
Capabilities this server exposes over MCP:

- **search_symbol** — Find a symbol declaration by name/substring (semantic, not text).
- **find_references** — Every call site of a symbol. Takes the **name directly** (`symbol="FooBar"`) — the one to reach for when you change a function/type and must touch every use. `detail=file`/`dir` → a **blast-radius summary** (dependents grouped + ranked) instead of the per-line list. `direction=callers`/`callees` sw…
- **read_symbol** — Return the **source of one named declaration** (its span) — not the whole file. The read-side twin of `replace_symbol_body`: skip Read-ing a 700-line file to see one function. `signatureOnly` trims to the head.
- **goto_definition** — Jump to the definition at a position. `kind=` also does `type_definition` / `implementation` (concrete impls of an interface/virtual) / `declaration`.
- **hover** — Type/signature at a position.
- **document_symbols** — Outline a file (classes/functions/types as `file:line`). `scope=directory` → a **signatures-only repo skeleton** of every code file under a dir (the shape of a module without Reading each file).
- **diagnostics** — Compiler/linter errors + warnings as a token-capped `file:line:col severity: message` list — the compact stand-in for reading raw build output. One file by default; `scope=directory` scans the project.
- **find_files** — Find files by name/glob — token-capped stand-in for `find -name`.
- **search_text** — Raw text/regex search — capped stand-in for `grep` (`path=`/`glob=`/`docs=true` to target).
- **concept_search** — Fuzzy** search for a concept you can't name (`"auth login flow"`) — mines a dictionary from the repo's own identifier+comment co-occurrence (no embeddings, nothing sent) and ranks declarations; `--flow` traces the top hit's call graph.
- **rename** — Semantic project-wide rename (every reference, not a text sed).
- **replace_symbol_body** — Replace a whole declaration (signature + body) by name — the index supplies the span.
- **insert_symbol** — Insert text next to a declaration — `position=after` (default, e.g. a sibling method) or `before` (e.g. an import/attribute).
- **safe_delete** — Delete a declaration — **refuses while it's still referenced** unless `force=true`.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/JSungMin/vs-token-safer), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
git clone https://github.com/JSungMin/vs-token-safer
```

2. Install:

```sh
npm install
```

## Documentation

## What JSungMin/vs-token-safer MCP server does

JSungMin/vs-token-safer turns repository navigation and several code-editing operations into MCP tools. It is designed to keep coding-agent context small: searches and diagnostics are capped to concise `file:line` or `file:line:col` records, while source retrieval is limited to a named declaration or another targeted span. The server works locally and uses headless indexing rather than an open editor.

For projects with a suitable language server, the semantic tier uses clangd for C and C++, Roslyn for C#, tsserver for JavaScript and TypeScript, and pyright for Python. JavaScript, TypeScript, and Python are described as requiring no manual setup; C++ and C# need their respective language servers. Tree-sitter provides declaration-aware fallback coverage when a language server is unavailable or still indexing.

## How it works

The server selects among several lookup methods. Exact symbol operations use the language-server index when available. Tree-sitter supplies syntactic declarations without requiring a project toolchain, while `concept_search` builds a local dictionary from identifiers and comments to find code by an idea such as an authentication flow. Markdown and configuration files can be addressed by section heading.

A cold or unavailable language-server lookup can fall back to tree-sitter and later use the semantic index when it is ready. The repository index may be built in the background, and responses identify the tier used. Results remain token-capped rather than returning complete files. Concept search does not use an AI model or upload repository content.

## Setup and configuration

Install the Claude Code plugin with:

```text
/plugin marketplace add JSungMin/vs-token-safer
/plugin install vs-token-safer@vs-token-safer
/reload-plugins
```

Run `/vs-token-safer:setup` to detect the backend, choose the project path, and write configuration. Restart Claude Code afterward because the MCP server starts in a fresh session. Node.js 18 or newer is required. Install clangd for C and C++ or Roslyn for C#; JavaScript, TypeScript, and Python can install their supporting components automatically.

The `vts` command-line interface includes indexing and related local workflows. The optional rewrite behavior can be disabled with `VTS_REWRITE=0`.

## Tools and capabilities

- `search_symbol` locates declarations by name or substring.
- `find_references` lists uses of a symbol and can summarize callers or callees by file or directory.
- `read_symbol` returns one declaration's source, with a signature-only option.
- `goto_definition` supports definitions, type definitions, implementations, and declarations; `hover` returns type or signature information.
- `document_symbols` outlines files or creates a directory-level signature skeleton.
- `diagnostics` returns compact compiler or linter findings for a file or directory.
- `find_files` and `search_text` provide capped filename, glob, text, and regular-expression searches.
- `concept_search` finds declarations from repository vocabulary and can trace a top result's call graph.
- `rename`, `replace_symbol_body`, `insert_symbol`, and `safe_delete` perform symbol-aware project edits. Safe deletion refuses referenced declarations unless forced.

The Claude Code companion hook can rewrite grep searches into indexed queries. The broader `vts` workflow also includes output compaction and local repository visualization through `vts serve`.

## Limitations and notes

Semantic accuracy depends on the relevant language server and its index. Without that setup, results use tree-sitter and may be syntactic rather than compiler-backed; stale indexes are labeled accordingly. The server is intended for local repositories and does not provide an IDE connection. Its compact responses are useful for navigation and review, but reading a complete file still requires a separate file-reading workflow.

_Full upstream README: https://allmcps.com/mcp/jsungmin-vs-token-safer/readme_

