code-intel MCP Server
Supports GitHub Copilot agent hook for tool enforcement
Generates AI symbol summaries via local Ollama models
Generates AI symbol summaries via OpenAI API
Click on "Install 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., "@code-intel MCP ServerExplain the relationship between UserService and AuthService."
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.
Code Intelligence Platform
A static code analysis platform that builds a Knowledge Graph from your source code and makes it explorable through a Web UI, HTTP API, CLI, and MCP server.

✨ Features
Knowledge Graph — parses 14+ languages into nodes (functions, classes, files, etc.) and edges (calls, imports, extends, etc.)
Force-directed Graph Explorer — interactive Sigma.js visualization with color-coded node types, hover highlighting, and filters
Graph Query Language (GQL) — query your codebase with
FIND,TRAVERSE,PATH,COUNT GROUP BY; CLI, HTTP API, and MCP toolSource Code Preview — click any node to open syntax-highlighted source at the exact line; "Open in editor" (
vscode://) buttonQuery Console — web UI panel with GQL editor, sortable results table, query history, and example queries
AI-Generated Symbol Summaries — optional
--summarizeflag generates 1-2 sentence summaries per symbol via OpenAI, Anthropic, or Ollama; cached by code hashHybrid Search (BM25 + Vector RRF) — Reciprocal Rank Fusion of keyword + semantic search;
searchMode: 'bm25' | 'vector' | 'hybrid'in responseSemantic Vector Search — embeddings via
all-MiniLM-L6-v2; enriched with summaries when availableCode AI Chat — grounded assistant that cites source files in every answer
File Watcher & Auto-Reindex —
code-intel watchdetects file saves and patches the live graph within ~1 second; WebSocket push notifies connected clientsCode Health —
code-intel healthreports dead code, circular dependencies (Tarjan SCC), god nodes, orphan files, and a 0–100 health scoreHTTP API — REST endpoints for graph, search, inspect, blast radius, flows, query, source, health
MCP Server — Model Context Protocol integration for LLM tooling with 6 new reasoning tools (
explain_relationship,pr_impact,similar_symbols,health_report,suggest_tests,cluster_summary), pagination, and tool-chaining hintsSecurity & Quality Scanning —
code-intel secrets(hardcoded API keys, DB URLs, RSA keys),code-intel scan(SQL Injection CWE-89, XSS CWE-79, SSRF CWE-918, Path Traversal CWE-22, Command Injection CWE-78),--format sariffor CI integrationComplexity Metrics —
code-intel complexity --top Nranks functions by cyclomatic + cognitive complexity;complexity_hotspotsMCP toolTest Coverage Gaps —
code-intel coveragelists untested exported symbols sorted by blast radius;--threshold <pct>fails CI if below targetDeprecated API Detection —
code-intel deprecatedfinds usages of@deprecatedJSDoc,@Deprecated(Java),#[deprecated](Rust), and built-in Node.js deprecated APIsCLI — analyze, serve, watch, query, search, inspect, impact, health commands with animated
█░progress bars and braille spinnersMulti-language — TypeScript, JavaScript, Python, Java, Go, C, C++, C#, Rust, PHP, Ruby, Swift, Kotlin, Dart, HTML (15 languages via tree-sitter AST)
Incremental Analysis —
--incrementalflag re-parses only git-changed/mtime-changed files; 10k-file repo with 3 changes: 288msParallel Analysis —
--parallelflag runs parse + resolve phases on worker threads for large reposAI Context Files — auto-generates
AGENTS.md,CLAUDE.md,.github/copilot-instructions.md,.cursor/rules/code-intel.mdc,.kiro/steering/code-intel.md,.clinerules,.windsurfrules,.kilocode/rules/code-intel-rules.md, and.agents/rules/code-intel-rules.mdafter every analysis — supporting Amp, Claude Code, Codex, Copilot, Cursor, Aider, Gemini, Kiro, Trae, Hermes, Factory, OpenCode, Pi, Antigravity, OpenClaw, Cline, Windsurf, Kilo Code, and moreAgent Hook System (v1.0.2) —
code-intel setupinstalls PreToolUse hooks for all major AI agents; when an agent runsgrep MyClass src/, thecode-intel-hookbinary (~10KB, ~50ms startup) silently rewrites it tocode-intel search "MyClass"— saving ~3,000 tokens per lookup; supports Claude Code, Cursor, Gemini CLI, GitHub Copilot (VS Code + CLI), OpenCode, OpenClaw; rules files for Cline/Roo Code, Windsurf, Kilo Code, Antigravity, Codex CLIRepository Groups — multi-repo / monorepo service tracking with workspace auto-discovery (npm, pnpm, Nx, Turborepo), contract extraction (OpenAPI, GraphQL, Protobuf), type-aware similarity scoring, and cross-repo dependency detection
OpenAPI note: contract extraction currently parses JSON OpenAPI/Swagger specs. YAML filenames are discovered, but YAML parsing is not implemented in
v1.0.4.
Multi-Layer Exclusion System — exclude files and folders from analysis with
.codeintelignore(team, tracked),.codeintelignore.local(personal, gitignored), or CLI flags--skip-folders/--skip-files(per-run); supports basename matching (tests), path matching (src/legacy), and glob patterns (**/*.generated.ts)Structured Logging — winston-based logger with daily-rotating log files at
~/.code-intel/logs/, sensitive-data masking, and configurable log levelsPerformance — parallel batch file I/O, shared file cache (zero double-reads), O(log n) binary-search enclosing-function lookup
code-intel initWizard (v0.9) — interactive 5-step setup wizard; creates~/.code-intel/config.jsonwith editor MCP registration, LLM provider, embeddings, auth mode, and port settingsConfig Management CLI (v0.9) —
config get/set/list/validate/resetwith JSON Schema,$ENV_VARexpansion, and masked secret outputBetter Error Messages (v0.9) —
CI-XXXXerror codes, actionable hints,--debugstack traces, startup prerequisite checksShell Completion (v0.9) —
code-intel completion bash|zsh|fish; dynamic repo + group name completion;setup --completionauto-installsVS Code Extension (v0.9) — symbol hover tooltips, Symbol Explorer panel, status bar freshness indicator, "Open in Graph" command, command palette integration
Self-Update (v0.9) —
code-intel updatechecks npm registry; background version check on startup;--no-update-checkto suppress--dry-runflag (v0.9) —analyze,clean,group syncpreview what would happen without side effectscode-intel doctor(v0.9) — full diagnostics: Node.js, git, config, registry, DB integrity, network; exit 1 on any failureLazy Graph Loading (v1.0) —
servestarts in <2s for 10k-file repos; LRU node cache (5,000 nodes by default,GRAPH_CACHE_SIZEenv var); background warm of high-blast-radius nodesPre-Built BM25 Index (v1.0) — inverted index built at analysis time; loaded into memory on
servestartup; 2,000+ q/s throughput; incremental-only updates on re-index; LRU-capped hot-query cache for repeated searchesMemory-Efficient Graph (v1.0) —
Int32Array-packed adjacency + symbol interning = ≥30% memory reduction;--max-memory <MB>flag spills node content to DBPipeline Profiling (v1.0) —
analyze --profilewrites.code-intel/profile.json; per-phase heap memory captured; bottleneck warning if any phase >50% of total; verbose timing tableLoad & Soak Tests (v1.0) — nightly CI load tests (1k/10k fixture repos), weekly soak tests (memory stability, watcher throughput), regression gate: >20% regression fails CI;
tests/perf/baseline.jsoncommitted to repoGraceful Degradation (v1.0) —
X-Stale/X-Stale-Sinceheaders on DB outage; LLM-unavailable summarize skip; MCP tool timeout →{ truncated: true }; watcher crash recovery; worker crash retryWorker note for v1.0.4: parallel analysis retries worker crashes, but
v1.0.4does not introduce a new user-facing worker timeout control. Treat long/stalled analysis as runtime investigation, not documented timeout recovery behavior.
Token-Efficient MCP (v1.0.1) — compact JSON responses (null/undefined stripped); MCP tool defaults tuned for LLM sessions:
search/file_symbols/list_exportsdefault 10 results (was 50),blast_radius/pr_impactdefault 2 hops (was 5);suggested_next_toolsopt-in viaCODE_INTEL_SUGGEST_NEXT_TOOLS=true; ~63% fewer tokens per typical 5-tool sessionContext Builder (v1.0.1) —
src/context/builder.tsbuilds structured[SUMMARY]/[LOGIC]/[RELATION]/[FOCUS CODE]documents from seed symbols in ≤50% of v1.0.0 token cost; query-intent presets (code,callers,architecture,auto); adaptive snippets; cross-block dedup;code-intel context <symbols...> --show-contextEnforced Tool Policy in AI Context Files (v1.0.1) —
AGENTS.md/CLAUDE.md/copilot-instructions.md/.cursor/rules/.kiro/steeringnow include aTOOL POLICY: ENFORCEDblock forbidding rawgrep/find/catin favour ofcode-intel search→inspect→impact; saves ~3,000 tokens per cold-file lookup
Related MCP server: CodeAtlas MCP Server
🚀 Quick Start
Requirements
Node.js 22.17+
npm 10+
Option A — Install globally from npm (recommended)
npm install -g @vohongtho.infotech/code-intelDefault secret storage: the CLI stores secrets in the encrypted
.code-intel/.secretsfile backend. No OS keychain package is required for the default install.Upgrade note for v1.0.4: After upgrading, re-build the local index before comparing results or using
serve/statusagainst old data:code-intel analyze --forceThis refreshes
.code-intel/graph.dband.code-intel/meta.json. Comparing fresh CLI behavior against stale indexes can look like a regression when it is only old index state.Upgrade note for sticky embeddings: if a repo was previously indexed with semantic search, the next
code-intel analyzewill detect legacyvector.dbstate, normalize.code-intel/meta.json, and keep embeddings up to date automatically. Older CLI builds may ignore the remembered preference until upgraded, but they should continue to tolerate the extra metadata fields.
Verify the installation:
code-intel --versionOption B — Build from source
Use this if you want to develop, modify, or contribute to the platform.
1. Clone the repository
git clone https://github.com/vohongtho/code-intel-platform.git
cd code-intel-platform2. Install all workspace dependencies
npm install3. Build all packages (shared → core → web)
npm run buildThis runs tsup for the core package (outputs to code-intel/core/dist/) and vite for the web UI (outputs to code-intel/web/dist/). The core build also copies bundled tree-sitter WASM grammars, including tree-sitter-html.wasm, into code-intel/core/dist/wasm/ for packaged installs.
4. Install the built CLI globally
npm install -g ./code-intel/coreVerify:
code-intel --versionTip: After making code changes, re-run
npm run build— the CLI picks up the new build automatically since the global install points to the localdist/folder.
Option C — Build locally & install globally (CI / automation)
Use this approach in CI pipelines, Docker images, or any environment where you need a clean, self-contained global install from local source without a persistent node_modules link.
1. Clone & install dependencies
git clone https://github.com/vohongtho/code-intel-platform.git
cd code-intel-platform
npm install2. Build all packages
npm run build3. Pack the core package into a tarball
cd code-intel/core
npm pack
# produces: vohongtho.infotech-code-intel-0.1.4.tgz (version number may vary)
cd ../..4. Install the tarball globally
npm install -g code-intel/core/vohongtho.infotech-code-intel-*.tgz5. Verify
code-intel --versionOne-liner (copy-paste for CI scripts)
git clone https://github.com/vohongtho/code-intel-platform.git && \
cd code-intel-platform && \
npm install && \
npm run build && \
npm pack --workspace=code-intel/core && \
npm install -g vohongtho.infotech-code-intel-*.tgzDocker example
FROM node:22-bookworm-slim
RUN git clone https://github.com/vohongtho/code-intel-platform.git /opt/code-intel && \
cd /opt/code-intel && \
npm install && \
npm run build && \
npm pack --workspace=code-intel/core && \
npm install -g vohongtho.infotech-code-intel-*.tgz && \
rm -rf /opt/code-intel
WORKDIR /workspace
ENTRYPOINT ["code-intel"]Why pack instead of
npm install -g ./code-intel/core?npm packproduces a standalone tarball containing only the publishedfiles(thedist/folder +package.json). This mirrors exactly what is published to npm and avoids bringing in dev symlinks or workspace hoisting artefacts.
Analyze & Serve
# First, analyze the project to build the index
code-intel analyze
# Or assign a stable unique repo name
code-intel analyze ./my-project --name api-core
# Then start the server (requires an existing index)
code-intel serve
# Or with a specific path and port
code-intel analyze ./my-project
code-intel serve ./my-project --port 4747Stable repository names and IDs
Indexed repositories now have:
a stable internal
ida unique user-facing
namea mutable filesystem
path
Use names for lookup. IDs stay stable across rename and relink operations.
code-intel repo list
code-intel repo show api-core
code-intel repo rename api-core api-platform
code-intel repo relink api-platform ../new-locationcode-intel analyze naming rules:
new path + new
--namecreates a named repo entryexisting path + same
--namerefreshes that repoexisting path + different
--namefails; usecode-intel repo renamenew path + existing
--namefails; usecode-intel repo relink
Legacy registries without repo IDs migrate automatically on load. If old entries share the same basename-derived name, the migration repairs duplicates deterministically and prints a warning so you can rename them later.
Then open http://localhost:4747 in your browser — the Web UI auto-connects and loads the graph.
If no admin account exists yet, the first-run setup screen appears. The login and bootstrap forms include eye-icon password visibility toggles, and the username input placeholder reads User Name.
Authenticated users can open Settings from the profile menu in the Web UI to inspect global server configuration. Admin users can edit routed settings sections for LLM, embeddings, analysis, server, authentication, updates, and telemetry. These settings are server-global and complement the CLI flows (code-intel init and code-intel config *) rather than replacing editor/MCP setup.
After analysis
code-intel analyze automatically generates or updates:
AGENTS.md+CLAUDE.md— AI context files with a concisecode-intelguidance block. These files are managed with surgical precision:File does not exist → created from a template with a managed block and a clearly marked section for your own notes
File exists with markers → only the
<!-- code-intel:start -->…<!-- code-intel:end -->block is updated; all your custom content is preserved untouchedFile exists without markers → the block is appended at the end; existing content is never overwritten
Exclude files and folders from analysis
Code-intel provides a multi-layer exclusion system for fine-grained control over what gets analyzed:
1. .codeintelignore (team-level, tracked)
Create a .codeintelignore file in your project root for team-wide exclusions:
# Exclude specific folders
vendor
generated
fixtures
# Exclude specific files
config.generated.ts
schema.proto.ts
# Exclude by pattern (glob)
*.min.js
**/*.test.ts
src/legacy/**Pattern types:
Basename match:
tests→ matches any file or folder named "tests" anywherePath match:
src/legacy→ matches only that specific path from workspace rootGlob match:
**/*.generated.ts→ matches all generated TypeScript files at any depth
2. .codeintelignore.local (personal preferences, gitignored)
Create a .codeintelignore.local file for personal exclusions that won't be committed:
# My personal preferences (not tracked in git)
examples
docs
tutorialsThis file is automatically added to .gitignore when you run code-intel analyze.
3. CLI flags (one-off exclusions)
For temporary or experimental exclusions, use CLI flags:
# Exclude specific folders for this run only
code-intel analyze --skip-folders tests,examples
# Exclude files by pattern
code-intel analyze --skip-files "*.generated.ts,*.proto.ts"
# Combine multiple exclusions
code-intel analyze --skip-folders src/legacy --skip-files config.gen.ts
# Repeatable flags (alternative syntax)
code-intel analyze --skip-folders tests --skip-folders examplesAll layers combine additively — an entry excluded by any layer is excluded from analysis.
🤖 MCP Setup (one-time)
Run the one-time setup command to configure the MCP server and install agent hooks:
code-intel setupThis does two things:
1. MCP server — writes ~/.config/claude/claude_desktop_config.json so your editor can start the MCP server automatically:
{
"mcpServers": {
"code-intel": {
"command": "npx",
"args": ["@vohongtho.infotech/code-intel", "mcp", "."]
}
}
}2. Agent hooks — installs PreToolUse hooks for every supported AI agent (idempotent, always safe to re-run):
Agent | Hook type | What it does |
Claude Code |
| Auto-rewrites grep/cat → code-intel search/inspect |
Cursor |
| Auto-rewrites grep/cat → code-intel search/inspect |
Gemini CLI |
| Auto-rewrites grep/cat → code-intel search/inspect |
GitHub Copilot |
| VS Code Chat: transparent rewrite; CLI: deny + suggestion |
OpenCode |
| Plugin: intercepts before tool execution |
OpenClaw |
| Plugin: |
Cline / Roo Code |
| Prompt-level policy (also written by |
Windsurf |
| Prompt-level policy (also written by |
Kilo Code |
| Prompt-level policy (also written by |
Antigravity |
| Prompt-level policy (also written by |
Codex CLI |
| Prompt-level policy (also written by |
How hooks work: The
code-intel-hookbinary (~10KB, ~50ms startup) intercepts every Bash tool call. When the agent tries to rungrep MyClass src/, the hook silently rewrites it tocode-intel search "MyClass"— saving ~3,000 tokens per lookup and returning structured graph results instead of raw text.
After setup, the MCP server starts automatically when your AI editor launches, giving it direct access to all code-intel tools.
🖥️ Web UI
Panel | Description |
Explorer | Graph composition stats, search results, overview counters |
Filters | Toggle node/edge types, set focus depth |
Files | Recursive file tree with search filter and file icons |
Group | Multi-repo group view with contracts and cross-repo links (visible when in group mode) |
Graph Canvas | Force-directed graph, click nodes to inspect, hover to highlight neighbors |
Code AI | Chat with grounded answers citing source file locations |
Settings | Routed global server configuration screen under the profile menu; admin-editable sections for LLM, embeddings, analysis, server, authentication, updates, and telemetry |
Settings
Open Settings from the profile menu in the top-right header, above Sign out.
Settings routes use
/settings/:sectionwith browser back/forward support instead of#fragmentanchors.Settings are server-global for the connected code-intel instance, not per-user preferences.
Authenticated viewers can inspect masked config values; admins can save edits.
code-intel initandcode-intel config *remain the CLI source for first-run setup and editor/MCP registration. The Web UI settings screen complements those commands; it does not replace editor/MCP setup in v1.
Search Modes
Keyword (default) — BM25-like text search across node names and content
⚡ vec — Semantic vector search using embeddings (auto-built in background after server starts)
Toggle between modes using the vec button in the header search bar.
📦 Architecture
code-intel-platform/
├── code-intel/
│ ├── shared/ # Shared types published alongside core
│ │ └── src/
│ │ ├── graph-types.ts # CodeNode, CodeEdge, NodeKind, EdgeKind
│ │ ├── languages.ts # Language enum (14 languages)
│ │ ├── pipeline-types.ts # PipelineContext, PhaseResult
│ │ └── detection.ts # Language detection helpers
│ │
│ ├── core/ # Backend: pipeline, parsers, HTTP API, MCP, CLI, storage
│ │ └── src/
│ │ ├── pipeline/ # 6-phase DAG orchestrator + DAG validator
│ │ │ └── phases/ # scan · structure · parse · resolve · cluster · flow
│ │ │
│ │ ├── parsing/ # Tree-sitter AST parsing layer
│ │ │ ├── parser-manager.ts # Loads + caches tree-sitter parsers
│ │ │ ├── ast-cache.ts # AST memoization
│ │ │ ├── query-runner.ts # Executes tree-sitter queries
│ │ │ └── queries/ # Per-language query files (14 languages)
│ │ │
│ │ ├── languages/ # Language registry + per-language extraction modules
│ │ │ ├── registry.ts # Maps file extension → language module
│ │ │ └── modules/ # ts · js · py · java · go · rs · c · cpp · cs
│ │ │ # php · kt · rb · swift · dart
│ │ │
│ │ ├── resolver/ # Import resolution (edges between files/symbols)
│ │ │ ├── import-resolver.ts
│ │ │ ├── binding-tracker.ts
│ │ │ └── strategies/ # relative-path · package-lookup · namespace-alias · wildcard-expand
│ │ │
│ │ ├── call-graph/ # Call edge builder + call classifier
│ │ ├── inheritance/ # Heritage builder, MRO walker, override detector
│ │ ├── scope-analysis/ # Scope builder (variable / binding scope trees)
│ │ ├── clustering/ # Directory-based community detection
│ │ ├── flow-detection/ # Entry-point finder + execution flow tracer
│ │ │
│ │ ├── graph/ # In-memory knowledge graph (O(1) node/edge lookup)
│ │ ├── search/ # BM25 text search · vector embedder · vector index (LadybugDB)
│ │ ├── storage/ # LadybugDB graph persistence · repo registry · metadata
│ │ │
│ │ ├── multi-repo/ # Repository groups, contract extraction, cross-repo linking
│ │ │ ├── group-registry.ts # Load/save group configs + sync results
│ │ │ ├── group-sync.ts # Extract contracts + match via RRF
│ │ │ ├── group-query.ts # Cross-repo BM25 search with RRF merge
│ │ │ └── types.ts # RepoGroup, Contract, ContractLink, GroupSyncResult
│ │ │
│ │ ├── http/ # Express REST API + static web UI serving
│ │ ├── mcp-server/ # MCP stdio transport + all tool/resource handlers
│ │ ├── shared/ # Logger (winston, sensitive-data masking, ~/.code-intel/logs/)
│ │ └── cli/ # Commander CLI (progress bars, spinners)
│ │ ├── main.ts # All CLI commands
│ │ └── context-writer.ts # Upserts AGENTS.md + CLAUDE.md blocks
│ │
│ └── web/ # React + Sigma.js frontend
│ └── src/
│ ├── pages/ # ConnectPage · LoadingPage · ExplorerPage
│ ├── components/
│ │ ├── graph/ # GraphView (Sigma.js force-directed canvas)
│ │ ├── panels/ # NodeDetail · SearchBar · SidebarChat · SidebarFiles · SidebarFilters
│ │ └── shared/ # Header · StatusFooter · KeyboardShortcutsModal
│ ├── ai/ # Chat agent with intent parsing + tool calls
│ ├── api/ # ApiClient (search, vector-search, inspect, blast-radius, flows, clusters)
│ ├── graph/ # Node color palette + ForceAtlas2 layout utilities
│ └── state/ # React context + reducer (AppContext, AppState)
│
├── .code-intel/ # Generated per-repo: graph.db · vector.db · meta.json
└── .codeintelignore # Optional: directories to exclude (like .gitignore)Pipeline Phases
Phase | Description |
| Walk filesystem, collect source files (parallel batch I/O, 512 KB limit), ignore |
| Create file and directory nodes in the graph |
| Read files in parallel batches of 64, extract symbols (functions, classes, etc.), build per-file sorted function index |
| Resolve imports → edges, build call graph (O(log n) binary-search lookup), detect heritage (extends/implements) |
| Directory-based community detection, add cluster nodes |
| Detect entry points, trace execution flows |
| (opt-in) Generate 1–2 sentence AI summaries for |
Each phase streams live progress to the CLI via animated █░ progress bars:
[parse ] ████████████████░░░░░░░░░░░░░░ 53% (80/151)Post-pipeline steps (DB persist, context files) show a braille spinner:
⠹ Persisting graph to DB…📋 Logging
Logs are written to ~/.code-intel/logs/ using daily rotation (powered by winston):
Setting | Default | Override |
Log directory |
| — |
Log file pattern |
| — |
Max file size | 20 MB | — |
Retention | 14 days | — |
Log level |
|
|
Production mode | Console only |
|
Sensitive data (passwords, tokens, API keys, emails, credit cards, etc.) is automatically masked before writing — only the first and last character are visible.
🛠️ CLI Commands
Setup
code-intel setup # Register the MCP server in your editor config (one-time)Analyze
code-intel analyze [path] # Parse source code and auto-use incremental mode when prior metadata makes it safe
code-intel analyze --force # Discard existing index and perform a full re-analysis
code-intel analyze --embeddings # Build a vector index and remember embeddings for this repo
code-intel analyze --skip-embeddings # Skip embedding generation for this run only
code-intel analyze --skip-agents-md # Preserve any hand-edited content in AGENTS.md / CLAUDE.mdSticky embeddings behavior:
The first successful
code-intel analyze --embeddingsrun stores the repo preference in.code-intel/meta.json.Later
code-intel analyze,code-intel analyze --incremental, andcode-intel analyze --forceruns auto-enable embeddings for that repo unless you pass--skip-embeddings.Plain
code-intel analyzenow auto-attempts incremental graph reindexing when valid prior.code-intel/meta.jsonexists and incremental safety checks pass; otherwise it falls back to full analysis.If
vector.dbis missing, stale, corrupted, or incompatible with the current embedding fingerprint,code-intel analyzerebuilds the full vector index automatically.--skip-embeddingsdoes not forget the repo preference; it skips vectors for that run and marks remembered embeddings stale until the next normal analyze.Previously indexed repos with only a legacy
vector.dbupgrade in place on the next analyze; no manual migration command is required.
code-intel analyze --skip-git # Allow analysis of directories that are not Git repositories
code-intel analyze --verbose # Print every file skipped due to an unsupported parserServer
code-intel mcp [path] # Launch the MCP stdio server consumed by AI-enabled editors
code-intel serve [path] --port <n> # Start the HTTP API and serve the interactive web UI (default :4747)
code-intel watch [path] --port <n> # Start HTTP server + file watcher (auto-reindex on file saves)Query (GQL)
code-intel query "<gql>" # Run a GQL query (FIND / TRAVERSE / PATH / COUNT GROUP BY)
code-intel query "<gql>" --format table|json|csv # Output format (default: table)
code-intel query --file <path.gql> # Load query from file
code-intel query "<gql>" --limit <n> # Override LIMIT in the query
code-intel query --save <name> "<gql>" # Save a named query to .code-intel/queries/
code-intel query --run <name> # Run a saved query by name
code-intel query --list # List all saved queries
code-intel query --delete <name> # Delete a saved queryHealth
code-intel health [path] # Show health score + dead code / cycles / god nodes / orphans
code-intel health --dead-code # List all dead-code symbols
code-intel health --cycles # List all circular dependency cycles
code-intel health --orphans # List all orphan files
code-intel health --json # Machine-readable JSON outputRegistry
code-intel list # Display all repositories that have been indexed
code-intel status [path] # Report index freshness, symbol counts, and last-run duration
code-intel clean [path] # Remove the .code-intel/ index for the specified repository
code-intel clean --all --force # Permanently remove all indexed repositories (requires --force)Exploration
code-intel search <query> # Execute intent-aware symbol search
code-intel search <query> --limit <n> # Limit number of results (default: 20)
code-intel search <query> --json # Include machine-readable qualified selectors
code-intel inspect <symbol> # Inspect a unique symbol; lists candidates when ambiguous
code-intel inspect <selector> # Inspect an exact qualified result from search/inspect
code-intel inspect <symbol> --json # Structured result; ambiguity exits with status 2
code-intel impact <symbol-or-selector> # Compute the transitive blast radius of a selected symbol
code-intel impact <symbol> --depth <n> # Set maximum traversal depth / hops (default: 5)Qualified selectors use <kind>:<percent-encoded-name>@<path>[:line]; path separators remain readable. Copy selectors from command output; for example:
code-intel search "how to login portal"
code-intel inspect "login" # Ambiguous names print ranked selectors
code-intel inspect "method:login@code-intel/web/src/api/client.ts:84"
code-intel impact "method:login@code-intel/web/src/api/client.ts:84"
# Relevance/performance regression check (from code-intel/core)
npm run build && node tests/perf/search-relevance-bench.mjsThe benchmark uses 10,003 symbols. Budgets: cold search <250ms; warm cached search <25ms.
Groups (multi-repo / monorepo service tracking)
code-intel group create <name> # Create a named group to track multiple repositories together
code-intel group add <group> <groupPath> <registryName> # Enroll an indexed repo in a group under the given hierarchy path
code-intel group remove <group> <groupPath> # Remove a repository from a group by its hierarchy path
code-intel group list [name] # List all groups, or print the full membership of one group
code-intel group sync <name> # Extract cross-repo contracts and resolve provider/consumer links
code-intel group contracts <name> [--kind] [--repo] [--min-confidence] # Inspect extracted contracts and confidence-ranked cross-links
code-intel group query <name> <q> # Run a merged RRF search across every repository in a group
code-intel group status <name> # Audit index freshness and sync staleness for all group membersgroup add parameters:
<group>— name of the group<groupPath>— hierarchy path (e.g.hr/hiring/backend)<registryName>— the repo's name as shown bycode-intel list
group contracts options:
--kind <kind>— filter by contract kind:export|route|schema|event--repo <repo>— filter by registry name--min-confidence <pct>— minimum link confidence 0–100 (default: 0)
🌐 HTTP API
Method | Endpoint | Description |
|
| Server status, graph size, watcher state |
|
| List indexed repos |
|
| Full graph (nodes + edges) |
|
| Canonical scoped search ( |
|
| Deprecated compatibility alias for vector mode; returns resolved scope/mode metadata |
|
| Vector index ready/building status |
|
| Node detail (callers, callees, imports, etc.) |
|
| Impact analysis |
|
| Execute a GQL query string; returns nodes/edges/groups + executionTimeMs |
|
| Return query plan without executing |
|
| Fetch file content with ±20 lines context; path-traversal protected |
|
| Regex search in file content |
|
| List detected flows |
|
| List clusters |
🤖 MCP Server Tools
All tools are available to any MCP-capable editor (Claude Desktop, Claude Code, VS Code, Cursor, etc.) after running code-intel setup.
Core Tools
Tool | Input | Description |
| (none) | List all indexed repositories with path, indexedAt, and node/edge counts |
| (none) | Repository summary: total nodes/edges + full breakdown by kind. Use this first to understand the codebase shape. |
|
| Scoped search with MCP default behavior matching HTTP: hybrid/semantic when vector is ready, BM25 otherwise; explicit |
|
| 360° view of a symbol: definition, callers, callees, imports, heritage (extends/implements), members, cluster, and source preview |
|
| Token-budgeted deep context for one or more symbols: returns |
|
| Impact analysis: traverse the call/import graph to find all affected symbols. Returns a |
|
| List all symbols defined in a file, ordered by line number. Avoids having to read raw source. |
|
| Find the shortest call/import path between two symbols via BFS. |
|
| List all exported symbols — the public API surface of the codebase. Filter by kind: |
| (none) | List all HTTP route handler mappings detected in the codebase |
|
| List detected code clusters (directory-based communities) with member counts and top 10 symbols each |
|
| List detected execution flows with entry points, steps, and step counts |
|
| Execute a GQL query ( |
|
| Git-diff impact analysis: maps changed lines to graph symbols and computes combined blast radius. Ideal for PR review or pre-commit checks. |
|
| (deprecated — use |
Reasoning Tools
Tool | Input | Description |
|
| Explain how two symbols are connected: directed paths, shared imports, and heritage (extends/implements). Returns up to 10 paths with at most 5 hops each. |
|
| Given changed files or a unified diff, compute full blast radius with risk scores (HIGH/MEDIUM/LOW), test coverage gaps, and top files to review. |
|
| Find symbols with similar names or structure using Levenshtein distance and kind matching. Useful for finding related functions, classes, or interfaces. |
|
| Code health signals for a scope: dead code, cycles, god nodes, orphan files, complexity hotspots. |
|
| Suggest test cases for a symbol: call paths, suggested cases, existing tests, untested callers. |
|
| Rich summary of a module/cluster: purpose, key symbols, dependencies, dependents, and health score. |
Security & Quality Tools
Tool | Input | Description |
|
| Find usages of deprecated APIs ( |
|
| Ranked list of functions/methods by cyclomatic complexity. Useful for identifying refactoring candidates. |
|
| Find exported symbols with no test coverage, ranked by blast radius. Useful for prioritizing test writing. |
|
| Scan the knowledge graph for hardcoded secrets: API keys, passwords, tokens, private keys, high-entropy strings. |
|
| Scan the knowledge graph for OWASP vulnerabilities: SQL injection (CWE-89), XSS (CWE-79), SSRF (CWE-918), path traversal (CWE-22), command injection (CWE-78). |
Group / Multi-Repo Tools
Tool | Input | Description |
|
| List all configured repository groups, or show full membership of one group |
|
| Extract contracts (exports, routes, schemas, events) from all member repos and detect cross-repo provider→consumer links via name matching + RRF scoring |
|
| Inspect extracted contracts and confidence-ranked cross-repo links from the last sync |
|
| Group-scoped search across all repos in a group with automatic vector/BM25 selection, deterministic RRF merge, and per-repo breakdown. |
|
| Check index freshness and sync staleness for all repos in a group. Flags repos as |
Resources
MCP resources are readable via ReadResource — your editor can pull them as structured context.
URI | Description |
| Repository stats: total nodes, edges, and per-kind node counts |
| All cluster nodes with member counts |
| All detected execution flows with entry points and steps |
💾 Storage
All generated files are stored locally — nothing is sent to external servers.
Path | Contents |
| LadybugDB knowledge graph |
| LadybugDB vector index |
| Index metadata (timestamp, stats) |
| Global registry of all indexed repos |
| Repository group configuration |
| Last group sync results (contracts + cross-repo links) |
| Daily-rotating application logs (14-day retention) |
🧪 Testing
npm run test46 tests across unit + integration suites covering:
Knowledge graph operations
Language detection
Call classifier
MRO computation
Scope analysis
Text search
Pipeline integration (parse → resolve)
📊 Benchmark / Eval
Measure accuracy of the knowledge graph, MCP tools, and context file generation:
# Single-language fixture (TypeScript)
npm run eval
# Multi-language fixture (Python + TypeScript)
npm run eval:multi
# Run all fixtures
npm run eval:all
# Save results as JSON
npm run eval:jsonResults are written to eval/results/. Each run scores:
Phase | What is tested |
Analysis | Symbol count, edge count, exit code |
Search | BM25 keyword search accuracy |
Inspect | Symbol detail retrieval |
Impact | Blast radius correctness |
Context Files | AGENTS.md / CLAUDE.md upsert + idempotency |
Status | Index freshness reporting |
Clean | Index removal |
Current score: 25/25 (100%) TypeScript · 15/15 (100%) multi-lang
Agent Benchmark (Before vs After)
The bench command simulates an AI agent answering code questions with and without code-intel:
npm run benchLatest results on the TypeScript fixture (6 tasks):
Metric | Baseline (grep + read files) | Enhanced (code-intel tools) | Δ |
Accuracy | 58% | 100% | +42pp |
Tool calls/task | 2.0 | 1.0 | −50% |
Response size | 1023 chars | 189 chars | −82% token cost |
MCP Server Benchmark
Test all MCP tools directly over the JSON-RPC stdio transport:
npm run bench:mcpLatest results (19 cases, TypeScript fixture):
Metric | Result |
Score | 19/19 (100%) |
Avg tool latency | 9ms/call |
Tools tested: repos, search (default / bm25 / vector), context, inspect, blast_radius, routes, raw_query + ListTools, ListResources, ReadResource
🔧 Technical Implementation Details
web-tree-sitter v0.26 API
Parser.SyntaxNode→Node(named export)Parser.Language→Language(named export)language.query(src)→new Query(language, src)Parser.Language.load()→Language.load()
GraphView (Sigma.js)
Graph built once from data; Sigma
nodeReducer/edgeReducerused for filter/selection/hover changes (no remount)stateRef/dispatchRefpattern to avoid stale closures in event handlerssuppressNextStageguard ensuresclickNodeevent wins overclickStageCamera fly-to uses
renderer.getNodeDisplayData(id)for normalized coordinates (NOT raw graphology attributes)ForceAtlas2 layout applied synchronously after graph build
Multi-repo Groups
Contract kinds:
export,route,schema,eventCross-repo matching via Reciprocal Rank Fusion (RRF)
Confidence scoring for cross-repo links
Build System
Core:
tsupbundler →dist/cli/main.js+dist/index.jsWeb: Vite + Tailwind CSS v4
esbuildandvitemust be in rootdevDependenciesto be hoisted for monorepo npm workspaces
🚢 CI/CD
GitHub Actions Workflows
Workflow | Trigger | Steps |
test.yml | PRs |
|
quality.yml | PRs | Typecheck shared + core + web |
publish.yml |
| Typecheck → Test → npm audit → License gate → Build core → Build web → |
Publishing a New Version
# Bump version in code-intel/core/package.json, then:
git tag v0.1.5
git push origin v0.1.5The publish workflow automatically runs all checks, builds the packages, publishes to npm, and sends a Discord notification (📦 success or ❌ failure).
Required GitHub Secrets:
Secret | Purpose |
| npm access token with publish rights |
| Discord webhook URL for deploy notifications |
Local CI Simulation
docker compose -f docker-compose.build.yml buildUses node:22-bookworm-slim — the same base image as GitHub Actions.
📄 License
MIT © 2024
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-quality-maintenanceEnables LLMs to interact with GitHub repositories, issues, pull requests, and workflows through the Model Context Protocol. It provides a comprehensive set of tools for repository management, issue tracking, code search, and CI/CD automation.Last updated
- AlicenseAqualityBmaintenanceExposes codebase analysis data, including module structures, dependencies, and AI-generated insights, to AI assistants via the Model Context Protocol. It enables users to query project architecture and search for specific code entities across analyzed projects.Last updated10671MIT
- Alicense-qualityFmaintenanceBridges the Model Context Protocol with Language Server Protocol to provide AI agents with persistent access to code intelligence features including navigation, diagnostics, refactoring, and completion across 7+ programming languages.Last updated2,726MIT
- AlicenseAqualityBmaintenanceCombines semantic search with AST-based code exploration for AI agents, enabling natural language code search, file structure browsing, symbol inspection, and dependency analysis through the Model Context Protocol.Last updated304MIT
Related MCP Connectors
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
A Model Context Protocol server for Wix AI tools
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/vohongtho/code-intel-platform'
If you have feedback or need assistance with the MCP directory API, please join our Discord server