Codescope
The brain your AI coding assistant is missing.
A graph-first code intelligence engine. Your agents stop reading files and start traversing a knowledge graph — 98-99% fewer tokens, deterministic, single-digit-millisecond traversal.
Rust-native · Fully local · MCP + LSP + Web · 57 languages · 9 agents
Install · Quick Start · Why Graph-First? · Benchmarks · Docs · Releases
Why This Exists
Most AI coding assistants still embed every file as a vector, nearest-neighbor a chunk, and pray it's relevant. When you ask "if I change User::email, what breaks?" they read 40 files and burn 150,000 tokens guessing.
That's not a code intelligence problem. It's an architecture problem. Vectors can't do graph traversal. Fuzzy search can't tell you who calls whom.
Codescope solves it the right way: parse the code into a knowledge graph — functions, calls, imports, type hierarchies, decisions, all of it — and let agents walk the graph instead of flipping through files.
Question: "Who calls parse_config transitively within 3 hops?"
Traditional RAG: Codescope:
───────────────── ─────────────────
~150K tokens ~1-2K tokens
~12 seconds ~3 ms (end-to-end)
Fuzzy text match Deterministic edge walk
Guess confidence Actual answer
Install
| Platform | Command |
|---|
| Linux / macOS | curl -fsSL https://raw.githubusercontent.com/onur-gokyildiz-bhi/codescope/main/install.sh | bash |
| Windows | irm https://raw.githubusercontent.com/onur-gokyildiz-bhi/codescope/main/install.ps1 | iex |
| Homebrew | brew install onur-gokyildiz-bhi/codescope/codescope |
| Claude Code plugin | /plugin marketplace add onur-gokyildiz-bhi/codescope then /plugin install codescope@codescope |
| Build from source | cargo install --git https://github.com/onur-gokyildiz-bhi/codescope |
Already installed? codescope --version to check. Update in-place with codescope upgrade.
Pre-built binaries: x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, aarch64-apple-darwin, x86_64-pc-windows-msvc.
Quick Start
# 1. Bring the bundled SurrealDB server up (idempotent)
codescope start
# 2. In your project — writes .mcp.json and indexes your code
cd your-project
codescope init
# That's it. Claude Code, Cursor, Codex — any MCP-compatible
# agent in this project now has codescope wired in.
Target a different agent:
codescope init --agent cursor # .cursor/mcp.json
codescope init --agent gemini-cli # ~/.gemini/settings.json
codescope init --agent vscode-copilot # .vscode/mcp.json
codescope init --agent codex # ~/.codex/config.toml
codescope init --agent windsurf # ~/.codeium/windsurf/mcp_config.json
codescope init --agent kiro # .kiro/settings/mcp.json
codescope init --agent cline # .vscode/cline_mcp_settings.json
codescope init --agent antigravity # global + GEMINI.md nudge
Daemon mode (MCP + Web UI in one process):
codescope init --daemon # port 9877 — per-repo routing at /mcp/<repo>
# Web UI: http://localhost:9877/
LSP mode (editor-agnostic — VS Code, Zed, Neovim, Helix, IntelliJ):
codescope lsp
# Go-to-def, Find References, Hover, Workspace Symbols — all graph-backed.
Daily operation:
codescope status # surreal server state
codescope gain # cumulative token savings
codescope insight # per-repo + hourly activity
codescope session # last 5 MCP sessions with tails
codescope upgrade # in-place self-update
codescope repair --repo <n> # drop + re-index a corrupted repo
codescope hook install # PreToolUse bash-suggest for Claude Code
codescope doctor # diagnose setup (+ --fix)
What Your Agent Gets
A structured MCP surface your agent programs against, instead of scrolling output.
Code navigation & impact
search(mode) — fuzzy / exact / file / cross_type / neighborhood / backlinks
find_callers / find_callees — 1-hop call graph
impact_analysis — transitive BFS blast radius
type_hierarchy — inheritance chains
context_bundle — file overview with delta-mode caching (97% savings on repeat visits)
Knowledge — memory that survives sessions
knowledge(action) — save / search / link / lint; scopes project / global / both
memory(action) — save / search / pin
capture_insight — record decisions in real time
manage_adr — Architecture Decision Records