What code-intel does
The code-intel MCP server gives AI coding agents focused repository context over MCP. It builds a local index, selects relevant symbol-level code chunks, and keeps responses within a requested token budget. This is intended for repositories where broad file scans consume context without helping the agent answer the task.
Its main entry point is get_task_context. Use it first for a new or broad request. The tool can cover multiple parts of a task, reports which parts were covered, marks the result as complete or incomplete, and provides up to three exact follow-up calls when more context is needed.
How it works
On the indexing path, the server discovers files while respecting .gitignore and skipping secrets. Tree-sitter splits files into symbol-level chunks. Each chunk is hashed so only changed content needs to be embedded. The index is stored in a local LanceDB database outside the repository, and the server watches for edits, renames, moved folders, .gitignore changes, and embedding-provider outages.
For a request, code-intel combines vector, keyword, symbol, and filename matches. It can expand from matches to imported files, references, tests, and configuration, remove near-duplicates, and select results so multiple task parts receive coverage before one part receives additional detail. The response identifies covered parts and can direct the agent toward targeted file reads when coverage is incomplete or confidence is low.
By default, source, embeddings, and the LanceDB database remain on the local machine through Ollama. An OpenAI-compatible embeddings endpoint is also supported when a remote provider is preferred.
Setup and configuration
Node.js 20 or newer is required, along with Ollama or an OpenAI-compatible embeddings endpoint. Install the package globally with npm install -g @pranitmodi/code-intel, change to a project directory, and run code-intel onboard. The onboarding command can configure Cursor, VS Code, or both; it also indexes the repository and retrieves the embedding model if needed. A no-global-install option is npx -y @pranitmodi/code-intel onboard --repo /path/to/your-project.
For direct editor setup, use code-intel cursor-install or code-intel vscode-install. VS Code supports user-level and workspace-level configuration. The workspace form writes a committable .vscode/mcp.json for a single-folder workspace, while the user-level installer can use absolute paths and cover repositories under a common parent. Reload the editor afterward and verify the server through Cursor’s MCP settings or VS Code’s MCP: List Servers command.
Tools and capabilities
The code-intel MCP server exposes these tools:
get_task_context: Retrieves ranked, task-oriented context under a token budget and reports coverage plus possible next reads.
search_symbol: Finds a known function, class, or type name.
search_codebase: Performs conceptual repository search with an optional max_tokens limit.
find_references: Finds textual appearances of an identifier; results are not compiler-resolved.
get_file_context: Reads current source from disk and supports multiple ranges, such as src/a.ts:120-168, in one request.
The index is shared by configured MCP clients, so multiple agents can query the same local repository index rather than independently rebuilding context from the file tree.
Limitations and notes
Search references are textual rather than compiler-resolved, so matching names do not establish language-level linkage. Benchmark figures in the project documentation come from one TypeScript repository and one embedding model; they are regression measurements, not a guarantee for another codebase or model. The project provides code-intel benchmark and code-intel savings --benchmark for measuring local results.
VS Code’s GUI process may not inherit an nvm-managed shell PATH; the installer therefore writes absolute paths. A manually configured VS Code entry must include type: "stdio", and a bare code-intel command may not work in that environment. When retrieval is incomplete or the index is stale, agents should use targeted file searches rather than treat a thin result as authoritative.