Give your coding agent a map of your repo, so it opens the right files first.
A local-first context engine for Claude Code, Codex, Cursor, and any MCP client.
V.I.S.O.R. indexes your repository with Tree-sitter into a local symbol index and dependency graph. Ask it a question in plain language and it returns the files and symbols that matter, with a reason for each pick. Your agent gets a focused starting point instead of grepping its way in. Everything runs on your machine, and the default mode works offline.
V.I.S.O.R.'s map of its own repository, from the real get_architecture_map output. Green rings mark the files build_context picked for one query. Regenerate it with demo/render_repo_map.py.
You need uv. Then, in your repository:
uvx --from visor-mcp visor install # wire up Claude Code, Codex, Cursor, Gemini CLI
uvx --from visor-mcp visor index # build the local map
uvx --from visor-mcp visor context "how is auth handled?" # ask it somethingThat is the whole setup. Your agent can now call build_context and the other V.I.S.O.R. tools. Add --dry-run to visor install to preview the changes first.
- Check your setup.
uvx --from visor-mcp visor doctorreports what works on this machine. - Index once.
visor indexparses the repository and stores the graph under~/.visor/. A file watcher keeps it current while the MCP server runs. - Ask a question.
visor context "<question>"prints the ranked files and symbols with reasons. Add--jsonfor machine-readable output, or--skill bug-fixerto rank for a bug hunt. - Connect your agent.
visor installdetects Claude Code, Codex CLI, Cursor, and Gemini CLI, registers thevisorMCP server in each client's user config, and copies thevisor-contextAgent Skill so the agent knows when to ask V.I.S.O.R. first. It prints every file it changes, keeps a.visor-backupcopy of each edited config, leaves other servers and settings alone, and skips an existingvisorentry or edited Skill unless you pass--force. Use--client <name>for one client,--hookfor an opt-in Claude Code SessionStart check, andvisor uninstallto remove what it added. Prefer to do it by hand?claude mcp add visor -- uvx visor-mcporcodex mcp add visor -- uvx visor-mcp, orvisor initto print an MCP entry for review. - See the whole map.
visor map --openwrites a self-containedvisor-map.htmlyou can share, plusVISOR_REPORT.mdwith hub files, entry points, and import cycles.
Recorded from demo/terminal_demo.tape. Also available as terminal-demo.mp4.
Say you ask an agent to change how V.I.S.O.R. finds the project root.
Without V.I.S.O.R., the agent has to discover the code first: search for likely words, list directories, open candidate files, and read until it finds the right functions.
With V.I.S.O.R., one call returns a ranked starting point. This is real output on this repository (trimmed to the first entries, paths shortened):
$ visor context "resolve local workspace project root"
Query: resolve local workspace project root
Selected 20 nodes (truncated=False):
[2.0000] src/visor/workspace.py:resolve_local_workspace
→ Matched query token in symbol name
→ Co-located in same file as top lexical hit
→ Reachable via dependency chain
[2.0000] src/visor/workspace.py:find_git_root
[2.0000] src/visor/workspace.py:is_project_dir
[2.0000] src/visor/workspace.py:resolve_mcp_roots
[1.0000] src/visor/server.py:WorkspaceManager
→ Matched query token in symbol name
[1.0000] src/visor/cli.py:_init_workspace
...
The agent still reads and verifies the code. V.I.S.O.R. tells it where to start and why, so the reasons are leads, not proof.
In our published pilots, agents with V.I.S.O.R. finished navigation tasks a few seconds faster, with no measurable change in patch correctness, and the pilots are small. Full numbers, methods, and limits are in BENCHMARKS.md.
- Parse. Tree-sitter extracts classes, functions, imports, and calls for nine languages.
- Store. Symbols and edges go into a per-workspace SQLite database under
~/.visor/, with a NetworkX dependency graph on top. - Rank.
build_contextclassifies the question's intent, scores symbols by name match, same-file proximity, dependency hops, recency, and (optionally) embeddings, and attaches the reason behind each score. - Learn from you, if you want.
visor feedbackrecords that a file was useful, irrelevant, or missing for a query, and nudges similar future queries in the same workspace. You can list or delete it at any time.
More detail: docs/ARCHITECTURE.md.
| Client | How it connects |
|---|---|
| Codex CLI | visor install, or codex mcp add visor -- uvx visor-mcp |
| Claude Code | visor install, or claude mcp add visor -- uvx visor-mcp |
| Cursor | visor install, or ~/.cursor/mcp.json |
| Gemini CLI | visor install, or ~/.gemini/settings.json |
| Claude Desktop | claude_desktop_config.json |
| VS Code | .vscode/mcp.json, plus the optional HUD |
| Antigravity | The VS Code MCP file above, plus the optional HUD |
| Terminal | visor doctor, visor index, visor context |
Any other MCP client can launch the same stdio command: uvx visor-mcp.
Manual Cursor, VS Code, and Claude Desktop configuration
Cursor (~/.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"]
}
}
}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.md - Install notes for Codex, Claude Code, and other clients:
docs/AGENT_SKILL.md
- 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.
Tree-sitter parsing covers nine languages. TSX uses the TypeScript grammar's TSX variant. It is not a tenth language.
| Language | Extensions |
|---|---|
| Python | .py |
| TypeScript | .ts, .tsx |
| JavaScript | .js, .jsx |
| Go | .go |
| Rust | .rs |
| Java | .java |
| C | .c, .h |
| C++ | .cpp, .cc, .cxx, .hpp |
| C# | .cs |
Adding a language is a small parser change. See CONTRIBUTING.md.
visor doctor
visor index
visor status
visor init
visor install --dry-run
visor uninstall
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 map --open
visor feedback useful src/app.py --query "how is auth handled"
visor feedback list --jsonvisor map writes a self-contained, shareable HTML dependency map (visor-map.html) and VISOR_REPORT.md with hub files, entry points, most-depended-on symbols, and import cycles. See docs/TERMINAL.md.
visor 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.
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 | build_context |
| Search | search_codebase, get_symbol_context, get_file_context |
| Graph | get_dependency_chain, impact_analysis, trace_route, dead_code_detection |
| Drift | get_drift_report |
| Memory and skills | store_memory, list_custom_skills, add_custom_skill, delete_custom_skill |
| Feedback | record_context_feedback, list_context_feedback, delete_context_feedback, clear_context_feedback |
| HUD | get_architecture_map, get_telemetry, set_hud_focus |
| Server | health_check |
Reference: docs/MCP_TOOLS.md.
Prefer to explore the graph visually? The V.I.S.O.R. HUD is a VS Code / Open VSX extension that draws the indexed graph and shows local telemetry. The CLI and MCP server do not need it. Extension notes: src/visor/extension/README.md.
Captured from this repository's real tool outputs with node demo/capture_hud.mjs. The token panel is V.I.S.O.R.'s local byte-based estimate, not measured agent usage.
| Document | Contents |
|---|---|
docs/TERMINAL.md |
Offline lexical workflow and semantic opt-in |
docs/AGENT_SKILL.md |
Skill installation notes |
docs/MCP_TOOLS.md |
Tool reference |
BENCHMARKS.md |
Published pilot results, methods, and limits |
docs/ARCHITECTURE.md |
Local index, graph, and retrieval design |
docs/FAQ.md |
Common questions |
docs/TROUBLESHOOTING.md |
Setup failures |
CONTRIBUTING.md |
Development setup and new languages |
SECURITY.md |
Supported versions and private vulnerability reports |
CHANGELOG.md |
Release notes |
If V.I.S.O.R. saves you time, a star helps other coding-agent users find it.
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/ -vMIT © Arunav Mandal
