V.I.S.O.R.
This MCP server provides local-first codebase context retrieval, search, dependency-graph analysis, drift detection, memory, skills, feedback, HUD control, and health tools for coding agents.
Build ranked, token-budgeted context from natural-language queries, optionally with a skill.
Search the codebase lexically or semantically and retrieve AST summaries for files and symbols.
Analyze import/dependency relationships: architecture maps, dependency chains, impact analysis, route tracing, and dead-code detection.
Detect context drift using file hashes or timestamps.
Store agent conversation memory and manage custom architecture skills.
Record, list, delete, or clear retrieval feedback.
Read telemetry and health status, and set HUD focus for highlighted files.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@V.I.S.O.R. Find the code related to the login crash"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
V.I.S.O.R. is a local-first context engine for Codex, Claude Code, and other coding agents. It builds an AST-backed repository index and dependency graph, then returns focused code context with the files, symbols, and reasons behind each selection.
It works from the terminal, through the Agent Skill, or over MCP. Lexical retrieval is the default and runs offline. Semantic retrieval is optional. A VS Code / Open VSX HUD is optional and is not required for the CLI or MCP server.
Terminal demo
From a checkout of this repository:
uv run visor doctor
uv run visor index
uv run visor context "resolve local workspace project root"
Recorded from demo/terminal_demo.tape. The same take is also at docs/assets/terminal-demo.mp4.
If V.I.S.O.R. is useful in your workflow, consider starring the repository—it helps other coding-agent users discover it.
Related MCP server: cctx-mcp
Quick Start
Prerequisite: uv. uvx installs visor-mcp into a temporary environment.
# Check local/headless compatibility
uvx --from visor-mcp visor doctor
# Index the current repository
uvx --from visor-mcp visor index
# Retrieve focused context
uvx --from visor-mcp visor context \
"where is workspace detection handled?"visor init prints an MCP configuration entry for review. It does not edit IDE files.
Register the stdio server with Codex or Claude Code:
codex mcp add visor -- uvx visor-mcp
claude mcp add visor -- uvx visor-mcpCursor (~/.cursor/mcp.json):
{
"mcpServers": {
"visor": {
"command": "uvx",
"args": ["visor-mcp"]
}
}
}VS Code (.vscode/mcp.json). The same file is the setup documented here for Antigravity:
{
"servers": {
"visor": {
"command": "uvx",
"args": ["visor-mcp"]
}
}
}Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"visor": {
"command": "uvx",
"args": ["visor-mcp"]
}
}
}Agent Skill
The Skill tells an agent to request V.I.S.O.R. context, treat the files, symbols, and reasons as leads, and verify those leads in the repository. Installing it does not guarantee that every client will select it automatically.
Skill source:
skills/visor-context/SKILL.mdInstall notes for Codex, Claude Code, and other clients:
docs/AGENT_SKILL.md
Supported integrations
Client | How it connects |
Codex CLI |
|
Claude Code |
|
Cursor |
|
Claude Desktop |
|
VS Code |
|
Antigravity | The VS Code MCP file above, plus the optional HUD |
Terminal |
|
Any other MCP client can launch the same stdio command: uvx visor-mcp.
Measured pilot results
Three published pilots are in this repository. None is a universal token-reduction claim. All depend on the task, agent, model, cache behavior, and context. Provider token fields are not comparable across Codex and Claude Code. V.I.S.O.R. context was supplied as leads and had to be checked against the repository.
Adversarial retrieval misses, 2–3 November 2026
Four hidden-cause fixes, three repeats, Codex and Claude Code, native and V.I.S.O.R., produced 48 cells (24 native/V.I.S.O.R. pairs). Every V.I.S.O.R. initial context omitted the declared causal file and included an obvious API decoy, so initial gold-file recall was 0%. A patch counted as correct only when its behavioral check passed and it changed the causal file. Full figures: benchmarks/results/v1.4.2-adversarial-retrieval-summary.json.
Agent | Native passed | V.I.S.O.R. passed | Both passed | Native only | V.I.S.O.R. only | Both failed |
Codex | 9/12 | 8/12 | 6 | 3 | 2 | 1 |
Claude Code | 12/12 | 12/12 | 12 | 0 | 0 | 0 |
Claude Code recovered the omitted causal file in all 12 V.I.S.O.R. runs. Codex recovered it in 8/12 V.I.S.O.R. runs; four Codex V.I.S.O.R. runs made behaviorally plausible edits in the decoy file instead. Codex also made three wrong-location edits without V.I.S.O.R. The one-run correctness difference is not evidence of a real advantage or disadvantage: this is a small synthetic suite, and the five discordant Codex pairs split 3 native-only to 2 V.I.S.O.R.-only. The result shows the failure mode exists and must be measured; it does not establish that focused context generally helps or hurts correctness.
Patch correctness, 31 October 2026
Three seeded fixes, three repeats, Codex and Claude Code, native and V.I.S.O.R., 36 paired cells. Every cell had its own detached worktree. A check command scored the patch after the agent. Deltas are V.I.S.O.R. minus native. Full figures: benchmarks/results/v1.2.1-patch-pilot-summary.json.
Agent | Condition | Patches passed | Median input-token delta | Median output-token delta | Median runtime delta |
Codex | Native | 9/9 | baseline | baseline | baseline |
Codex | V.I.S.O.R. | 9/9 | −6,352 (95% CI −55,316 to 36,583) | +78 (95% CI −324 to 192) | −0.2 s (95% CI −10.2 s to 6.6 s) |
Claude Code | Native | 9/9 | baseline | baseline | baseline |
Claude Code | V.I.S.O.R. | 9/9 | −2 (95% CI −2 to 0) | +50 (95% CI −219 to 303) | +0.4 s (95% CI −2.0 s to 1.3 s) |
All 36 patches passed. The token and runtime intervals are wide and, except for Claude's two-token uncached input difference, include both directions. Claude's input_tokens value is the uncached remainder; cache-read tokens are a separate field and that paired interval also crosses zero. Codex does not report monetary cost. This does not show that V.I.S.O.R. saves a fixed share of tokens.
Diagnostic navigation, v1.2.0
The v1.2.0 diagnostic pilot compared native repository navigation with the same tasks plus V.I.S.O.R. context. Figures are from benchmarks/results/v1.2.0-diagnostic-pilot-summary.json. Paired intervals were recomputed from the preserved scored records.
Fact | Value |
Successful records | 144 |
Failed records | 0 |
Tasks | 12 diagnostic navigation tasks |
Repeats | 3 |
Native/V.I.S.O.R. pairs per agent | 36 |
Codex median paired duration delta | −4.17 s (95% CI −8.22 s to −2.21 s) |
Claude Code median paired duration delta | −3.63 s (95% CI −6.68 s to −0.91 s) |
Median evidence recall | 100% in both native and V.I.S.O.R. conditions |
Limitations:
The navigation pilot does not measure patch correctness, refactoring quality, or task success.
The patch and adversarial pilots use small synthetic fixtures, not representative production repositories.
Timing and token counts are machine-, model-, provider-, plan-, and cache-dependent.
Evidence recall is a heuristic, not human correctness review.
These results are not proof that V.I.S.O.R. makes coding agents universally faster, cheaper, or better.
Protocol: benchmarks/README.md. Published-result notes: benchmarks/results/README.md.
Why V.I.S.O.R.
V.I.S.O.R. complements normal repository inspection, including an agent's own search. It adds a persistent local index the agent can query.
Property | What the implementation provides |
Persistent local index | Project graph stored under |
AST symbol extraction | Tree-sitter classes, functions, and imports |
Dependency graph | Import edges used by trace, impact, and context scoring |
Terminal interface |
|
MCP integration | 17 stdio tools, including |
Agent Skill |
|
Drift detection | Hash comparison and recent file-changelog warnings |
Optional visual HUD | VS Code / Open VSX extension; CLI and MCP work without it |
Offline lexical retrieval | Default mode. No model download on the lexical path |
build_context classifies a query into an intent profile, can apply a built-in skill (bug-fixer, architecture-explainer, refactor-assistant, performance-optimizer), and returns a reason string for each selected node. Those reasons explain the score. They do not establish that the selection is sufficient for a code change.
Each context response also includes an internal size estimate: tokens for the full text of candidate files compared with tokens for the returned snippets. That estimate is not a measured change in agent token use.
Optional visual HUD
Prefer a visual graph? Install the optional V.I.S.O.R. HUD from Open VSX.
The HUD is a VS Code extension that draws the indexed graph and shows local telemetry. The MCP server and CLI do not need it.
Install V.I.S.O.R. HUD from the editor's extension view or Open VSX. Extension notes: src/visor/extension/README.md.
Local-first and privacy
The index and dependency graph are stored locally, under
~/.visor/.Lexical retrieval works offline and does not download a model.
Semantic mode is optional (
visor --retrieval-mode semanticorVISOR_RETRIEVAL_MODE=semantic) and usesall-MiniLM-L6-v2, which may be downloaded on first use.V.I.S.O.R. itself does not require uploading the whole repository to a hosted V.I.S.O.R. service. The MCP server speaks stdio.
Retrieved snippets are still passed to whichever coding agent the user has configured, subject to that provider's policies.
store_memory embeds the stored text with the semantic model. Lexical indexing does not.
Languages
Tree-sitter parsing covers nine languages. TSX uses the TypeScript grammar's TSX variant. It is not a tenth language.
Language | Extensions |
Python |
|
TypeScript |
|
JavaScript |
|
Go |
|
Rust |
|
Java |
|
C |
|
C++ |
|
C# |
|
Adding a language is a small parser change. See CONTRIBUTING.md.
CLI
visor doctor
visor index
visor status
visor init
visor context "how is auth handled"
visor fix "login crash on null user"
visor explain "database client"
visor trace src/visor/server.py src/visor/workspace.py
visor drift
visor feedback useful src/app.py --query "how is auth handled"
visor feedback list --jsonvisor feedback stores an explicit useful, irrelevant, or missing verdict for a file and query. V.I.S.O.R. can apply that feedback to similar future queries in the same workspace. It is not automatic learning, it does not change import or call edges, and visor feedback delete or visor feedback clear --yes removes it.
fix and explain call build_context with bug-fixer and architecture-explainer. Terminal details: docs/TERMINAL.md.
MCP tools
The server registers 21 tools in src/visor/tools/core.py and src/visor/server.py. get_visor_skill is an MCP prompt, not one of those tools. Clients do not have to call any of them automatically.
Category | Tools |
Intelligence |
|
Search |
|
Graph |
|
Drift |
|
Memory and skills |
|
Feedback |
|
HUD |
|
Server |
|
Reference: docs/MCP_TOOLS.md.
Documentation
Document | Contents |
Offline lexical workflow and semantic opt-in | |
Skill installation notes | |
Tool reference | |
Local index, graph, and retrieval design | |
Common questions | |
Setup failures | |
Development setup and new languages | |
Supported versions and private vulnerability reports | |
Release notes |
Community
Please follow the Code of Conduct when participating.
git clone https://github.com/dibun75/visor.git
cd visor && uv sync --dev
uv run pytest tests/ -vLicense
MIT © Arunav Mandal
Available Tools
21 toolsadd_custom_skillC
Add a custom skill after validating its optional strategy JSON.
Inputs: name (required), content (required), description (required), strategy. Returns: result
build_contextB
**Context Intelligence Engine** — the most powerful V.I.S.O.R. tool.
Builds a ranked, token-budget-enforced context payload from a natural
language query. Lexical retrieval is the default; semantic retrieval is
an explicit opt-in. Ranking combines five signals:
- Exact symbol name match
- Co-location in the same file as the top hit
- Retrieval similarity when semantic mode is enabled
- Dependency graph distance
- File recency
Returns a scored list of code nodes ready to be injected into an LLM
prompt, capped at 8,000 tokens to prevent context overflow.
Example:
``build_context("how is authentication handled")``
Inputs: query (required), skill. Returns: result
clear_context_feedbackA
Delete every explicit feedback record for the current workspace.
``confirm`` must be true. This does not delete the code index or agent memory.
Inputs: confirm. Returns: result
dead_code_detectionA
Find files no indexed file imports; this is not call-graph dead code.
Inputs: no named parameters. Returns: result
delete_context_feedbackC
Delete one explicit feedback record from the current workspace.
Inputs: feedback_id (required). Returns: result
delete_custom_skillC
Deletes a custom skill.
Inputs: skill_id (required). Returns: result
get_architecture_mapC
Returns the full or partial CodeNode graph topology as a JSON string.
Inputs: depth. Returns: result
get_dependency_chainA
Traverses the import edges graph from the file containing ``symbol``
and returns the full transitive dependency chain (max depth 5).
Useful for answering: *"What does `auth.py` ultimately depend on?"*
Args:
symbol: Name of a class or function. Its source file becomes the
root of the BFS traversal.
Inputs: symbol (required). Returns: result
get_drift_reportA
Detects context drift between the AI's loaded snapshot and the current codebase.
Two detection modes:
- **Hash-based** (preferred): Pass ``file_hashes`` as ``{file_path: sha256_hash}``.
V.I.S.O.R. compares the provided hashes against the indexed ``file_hash`` column.
If they differ, the file has changed since the agent last read it.
- **Timestamp-based** (fallback): Compares ``loaded_at`` against ``file_changelog``
entries when hashes are not supplied.
Args:
context_files: List of file paths the agent currently holds in context.
loaded_at: ISO-8601 timestamp of when the agent loaded its context.
file_hashes: Optional dict mapping file_path → sha256 hash the agent last saw.
Inputs: loaded_at (required), context_files (required), file_hashes. Returns: result
get_file_contextA
Returns a structured AST summary for a given file, including all indexed symbols (classes, functions, imports) and their line ranges.
Inputs: path (required). Returns: result
get_symbol_contextA
Returns all indexed AST nodes matching a symbol name, including file path,
node type (class/function/import), and precise line range.
Useful for answering: *"Where is `VectorDBClient` defined and what does it do?"*
Args:
symbol: The exact or partial name of the class, function, or import to look up.
Inputs: symbol (required). Returns: result
get_telemetryB
Returns the current state of telemetry data. graph_nodes, context_burn, drift_alert.
Inputs: no named parameters. Returns: result
health_checkA
Basic health-check endpoint confirming the server is alive.
Inputs: no named parameters. Returns: result
impact_analysisA
Find files that transitively import the changed file (max depth 5).
Inputs: file_path (required). Returns: result
list_context_feedbackA
List explicit retrieval feedback for the current workspace.
When ``query`` is set, only records at or above the lexical similarity
threshold for that query and intent are returned.
Inputs: query. Returns: result
list_custom_skillsA
List all available custom V.I.S.O.R architecture skills.
Inputs: no named parameters. Returns: result
record_context_feedbackA
Record explicit retrieval feedback for one workspace file and query.
Verdicts are ``useful``, ``irrelevant``, or ``missing``. This does not
store agent conversation memory and does not change import or call edges.
The same workspace, normalized query, and file updates one record.
Inputs: query (required), verdict (required), file_path (required), reason. Returns: result
search_codebaseB
Search CodeNodes using the configured lexical or semantic retrieval mode.
Inputs: query (required). Returns: result
set_hud_focusA
Directly controls the V.I.S.O.R Developer HUD to visually highlight specific files you are actively reasoning about.
Use this tool sequentially as you investigate the codebase to give the developer real-time 3D visual feedback of your attention and intent.
Pass an empty list for file_paths to clear the active focus.
Args:
file_paths: List of absolute or relative paths to files you want to highlight on the graph.
intent: A concise 2-4 word description of what you are doing (e.g. "Reviewing Auth Flow", "Checking Schema").
Inputs: intent (required), file_paths (required). Returns: result
store_memoryC
Persists an agent conversation turn with an embedding in the local DB.
Inputs: role (required), content (required). Returns: result
trace_routeC
Trace verified import relationships from a source file to a dependency.
Inputs: source (required), target (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Most tools target a clearly distinct action (context building, feedback CRUD, drift, HUD focus, memory), and the flagship build_context is well-separated from search_codebase and get_symbol_context. The main confusion is the import-graph trio: trace_route and get_dependency_chain both do forward traversal from a file, and impact_analysis does reverse traversal, leaving boundaries between the first two somewhat blurry.
Nearly everything is snake_case and most names are verb_noun (get_telemetry, add_custom_skill, record_context_feedback, clear_context_feedback, set_hud_focus, get_dependency_chain). A few deviate into bare noun phrases (health_check, impact_analysis, trace_route, dead_code_detection), but they remain readable and consistent in casing.
At 21 tools the surface is on the heavy side for what is essentially one domain, and a chunk of the count comes from the four-tool feedback CRUD and three adjacent graph-traversal tools. Each tool is defensible individually, but the set feels larger than the core workflow requires.
Context building, retrieval feedback, drift detection, and graph inspection form a fairly complete loop, but memory is write-only (store_memory with no get/list/delete/search counterpart) and custom skills support add/list/delete but no update. There is also no explicit index/reindex operation, which is a notable gap for a code-index-backed server.
Maintenance
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Official Duck Framework MCP server for AI-assisted development and project scaffolding.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI agents structured code understanding and precise code intelligence via local indexing of AST, call graphs, and semantic search.77 npm4Apache 2.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides structure-aware code analysis (symbol trees, dependencies, docs) to reduce AI agent token consumption by up to 99%, along with Git commit intelligence.MIT
- AlicenseAqualityDmaintenanceUniversal MCP server that analyzes any codebase and provides structured context to AI assistants. Dynamic, accurate, and token-efficient.1812 npmMIT
- AlicenseNot gradedqualityCmaintenanceMCP server that reduces AI agent token usage by up to 90% through intelligent context compression. Enables efficient code exploration, multi-file refactoring, and debugging by providing tools for smart reading, searching, and managing code context.4MIT