CodeSight
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
CodeSight is a local-first GraphRAG code comprehension and diagnostic engine for AI-assisted coding.
As AI agents edit across dozens of files, two failure modes appear repeatedly: losing track of architecture and silent regressions (removing validation guards, swallowing exceptions with empty catch {}, or hiding type errors with as any). CodeSight builds a deterministic AST call graph and dependency map locally in milliseconds, intercepts silent regressions with zero LLM tokens, and renders clean interactive visual cards directly inside your AI agent or as a native macOS Floating HUD.
Live Preview
Related MCP server: localscope-mcp
Who Is CodeSight For?
CodeSight bridges the gap between visual product thinking and precise code-level debugging:
Product Managers, Designers & Non-Technical Builders (Vibe Coders)
Grasp the overall repository structure in seconds without reading raw source code.
See which frontend components control what appears on screen — click any UI file to preview its inferred wireframe prototype (page, modal, HUD, card) and relationships.
Spot which backend and shared modules are Core hubs (high downstream usage) so you know what is safe to tweak vs. what needs extra care before prompting an AI agent.
Engineers & Full-Stack Developers
Jump straight from a compiler/runtime error or
git diffto the exact code block, line range, and cross-file AST callers involved.Inspect blast radius (direct & indirect downstream impact) and safe zone count before modifying shared types, schemas, or APIs.
Catch silent regressions (
as any, emptycatch {}, removed auth/validation guards) deterministically with 0 LLM tokens, and choose between a minimal backward-compatible fix or a coordinated multi-file update.
What CodeSight Does on Top of GraphRAG
Instead of feeding raw chunks of text into an LLM, CodeSight runs a deterministic 5-stage local GraphRAG pipeline over your repository:
Incremental AST & Multi-Language Parsing (
astParser.ts,repoIndexer.ts) Parses TypeScript / JavaScript / TSX / JSX with the real TypeScript Compiler API (eliminating regex false positives) alongside a Python relative/dotted import & call parser, with SHA-256 hash caching in.codesight/index.jsonfor millisecond incremental updates.Dual-Layer Graph Construction (
codeGraph.ts,graphProvider.ts,mcpGraphProvider.ts) Builds both a File Dependency Graph (in-degree, out-degree, transitive downstream reach, Core-hub detection) and a Cross-File Symbol Call Graph (exact function, class, and React JSX component callers with line numbers), with pluggable external stdio Graph-RAG MCP support.Hybrid Retrieval with Reciprocal Rank Fusion (
embeddingIndex.ts) Combines Okapi BM25 + bilingual semantic vectors + 1-hop graph propagation (with barrelindex.tsdamping) to surface the exact minimal code slice — typically reducing whole-repo LLM context by ~97%.Semantic Architecture & Prototype Abstraction (
architecturePlanner.ts,visualMap.ts) Transforms raw graph nodes into human-readable Frontend / Backend / Shared vertical layers, plain-language roles, and auto-inferred UI wireframe / API flow prototypes — powered by 0-token heuristics, host-agentarchitectureOverridecaching, or optional BYOK LLM planning.Deterministic Error Projection & Silent Regression Guard (
staticAnalyzer.ts,comprehensionEngine.ts) Strips stack-trace noise, projects errors andgit diffhunks onto exact AST symbols and blast radius, flagsREMOVED_GUARD/SWALLOWED_ERROR/TYPE_ESCAPE_HATCHat 0 tokens, and generates scoped architectural fix options for your AI agent.
Why CodeSight
Capability | Raw AI Agent | With CodeSight |
Understanding an unfamiliar repo | Burns 25k–60k tokens skimming files | Incremental AST + dependency map in ~25ms (0 LLM tokens) |
Checking who calls a shared type/fn | Text grep, often misses re-exports or JSX callers | Deterministic cross-file AST symbol call graph ( |
Debugging multi-file errors | Blind trial-and-error loops | Projects stack trace onto dependency graph (~97% token reduction) |
Catching silent regressions | Frequently passes build via | Instant 0-token diff guard flags |
Human visibility in chat | Walls of markdown text | Collapsible, bilingual interactive cards with UI wireframes & directional dashed flows |
Product Tour
1. Layered Architecture & Directional Flow Lines
Automatically detects Frontend, Backend, and Shared / Core separation across TypeScript, JavaScript, and Python repositories. Hover any file to trace its exact 1-hop dependencies (blue dashed) and impacted consumers (amber/red dashed).
2. Inspect Prototypes & Direct Callers Without Opening 40 Tabs
Click any module to open a frosted detail sheet with an auto-inferred UI wireframe or flow prototype, direct caller count, clickable Uses ↗ / Used by ↗ navigation chips, and one-click scoped AI edit/explain prompts.
3. Error Blast Radius & Guided Fix Directions
When a build or runtime error occurs, CodeSight highlights the fault origin in red, draws impacted downstream links, catches silent regressions, and presents a clean 2-option decision fork (e.g., keep exports compatible vs cascade update all callers) before the AI touches shared code.
4. Collapsible Cards & Unified Settings Across Agents and macOS HUD
Built for long debugging threads: click the top bar or chevron to collapse any card into a 44px single-line bar (with an inline fault badge), or open ⚙ Settings to customize language (EN / 中文), dashed lines, default-collapsed mode, regression guard, and optional BYOK models — persisted to ~/.codesight/config.json and shared with the native macOS HUD.
Ecosystem Compatibility
Client / Environment | Transport | Interactive Board | Setup Command |
Antigravity | Native Plugin + MCP Apps ( | Inline Chat Cards |
|
Cursor | MCP ( | Browser Board + Text |
|
Claude Code | MCP ( | Browser Board + Text |
|
Claude Desktop | MCP Apps ( | Inline Chat Cards |
|
VS Code / Copilot | MCP ( | Browser Board + macOS HUD |
|
OpenAI Codex CLI | MCP ( | Browser Board + Text |
|
ChatGPT Apps / Remote | Streamable HTTP ( | Inline MCP Apps |
|
macOS Floating HUD | Local Sidecar ( | Native SwiftUI Window |
|
Quick Start
1. Clone & Build
git clone https://github.com/Rex16200513/codesight.git
cd codesight
npm install && npm run build2. Install Into Your AI Agent
# Install for a specific agent (add --global for user-wide config, --dry-run to preview)
node packages/cli/dist/cli.js install --target cursor
node packages/cli/dist/cli.js install --target claude-code
node packages/cli/dist/cli.js install --target antigravity
# Or configure all supported agents at once
node packages/cli/dist/cli.js install --target all --dry-run3. Open the Interactive Visual Board in Your Browser
# Generate and open a standalone interactive board for any local repo
node packages/cli/dist/cli.js map --open
# Or run the local Sidecar for live updates + persistent in-card settings (http://127.0.0.1:4317)
npm run dev:sidecar4. Optional: Launch the Native macOS Floating HUD (For VS Code / IDE Users)
npm run hud:openMCP Tools & CLI Reference
MCP Tool | CLI Equivalent | What It Does |
|
| Incremental AST + dependency map & interactive architecture board |
|
| Hybrid BM25 + bilingual vector + 1-hop dependency graph RRF search |
|
| Cross-file AST caller & callee trace for any function, class, or component |
|
| Blast radius, safe zone count, silent regression guard, and fix directions |
|
| Read/write unified preferences in |
Unified Configuration (~/.codesight/config.json)
npm run cs -- config set language en
npm run cs -- config set dashedLines hover
npm run cs -- config set collapsedByDefault true
npm run cs -- config set silentRegressionGuard trueArchitecture
flowchart LR
Repo["Local Repository (TS / JS / Python)"] --> Core["@codesight/core\nAST + Python Parser · Call Graph · RRF · Guard"]
Config["~/.codesight/config.json"] --> Core
Core --> MCP["@codesight/mcp-server\nStdio & Streamable HTTP /mcp + MCP App Cards"]
Core --> Sidecar["@codesight/sidecar\nHTTP / SSE Bridge & Browser Board :4317"]
Core --> CLI["@codesight/cli\nInstaller & CLI"]
MCP --> Agents["AI Agents\nAntigravity · Cursor · Claude · Codex · ChatGPT"]
Sidecar --> HUD["Native macOS HUD\nSwiftUI Always-on-Top Floating Panel"]assets/ Brand identity (logo.svg, codesight-logo.png, promo video, screenshots)
packages/
core/ TS Compiler AST & Python parser, dependency/call graph, hybrid RRF, config store
mcp-server/ Stdio + Streamable HTTP (/mcp) server & Apple-minimalist MCP App cards
cli/ CLI (map, ask, trace, diagnose, config, install)
sidecar/ Local HTTP/SSE engine bridge & browser visual board (port 4317)
ui/ Shared React HUD components
apps/
macos-hud/ Native Swift 6 + SwiftUI/AppKit floating HUD (arm64 macOS)
plugins/
codesight/ Antigravity & Claude Code native plugin bundle (SKILL.md + AGENTS.md)Privacy & Local-First Design
Zero cloud lock-in: Indexing, AST parsing, dependency graphs, hybrid search, and silent regression detection run 100% locally with zero API keys required.
Optional BYOK: Only if you explicitly enable BYOK in Settings (OpenAI, DeepSeek, Gemini via OpenRouter, or local Ollama) are pruned code slices sent to your configured endpoint.
Pluggable External Graph-RAG: Supports attaching external stdio MCP graph servers via
--mcp-cmd/CODESIGHT_MCP_GRAPH_CMD.
License
MIT © 2026 CodeSight Contributors
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Codebase intelligence for AI agents — dead code, blast radius, ownership.
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Deterministic context layer for your codebase: change impact, blast radius, answers with receipts.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides a dependency graph of any local repository with tools for change impact, transitive dependents, health audits, and more, enabling AI coding agents to see structure and refactor safely.4MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to analyze a local codebase and answer impact questions like 'what breaks if I change Y?' through local indexing, search, and reverse dependency analysis, with no code leaving the machine.45 npm1MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI coding agents to interrogate a local repository deterministically for symbols, dependencies, call paths, routes, tests, and Git impact, returning verified structured evidence with exact line citations instead of requiring the whole codebase to be read.79 PyPI4-
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents and developers to search code by meaning and exact text, map symbols, dependencies, blast radius and context, inspect git-change impacts, and trace live Python or JavaScript execution from a local air-gapped SQLite index.Apache 2.0