# code-intel [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/pranitmodi/code-intel  
**GitHub Stars:** 0  
**npm Downloads (last month):** 991  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/pranitmodi-code-intel

## Description
Local code index for AI coding agents: MCP server that gives Cursor, VS Code Copilot, and other agents ranked, token-budgeted context instead of whole-repo scans.

## Tools
Capabilities this server exposes over MCP:

- **get_task_context** — First call for any new or broad task, with the whole request: code for every part of it within a token budget. The reply says which parts are covered, whether it is `complete`, and lists at most three exact `Next` calls if not (`mode`: `minimal`, `normal`, `deep`)
- **search_symbol** — A known function, class, or type name
- **search_codebase** — Conceptual search with an optional `max_tokens` cap
- **find_references** — Where an identifier appears (textual, not compiler-resolved)
- **get_file_context** — Exact current source read from disk; batch several `ranges` such as `"src/a.ts:120-168"` in one call

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "code-intel": {
    "command": "npx",
    "args": ["-y","@pranitmodi/code-intel"]
  }
}
```

## Documentation

## 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.

_Full upstream README: https://allmcps.com/mcp/pranitmodi-code-intel/readme_

