# code-context [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/infino-ai/code-context  
**GitHub Stars:** 32  
**npm Downloads (last month):** 299  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/code-context

## Description
Local code search for AI agents: hybrid ranked search and SQL aggregation over an in-repo index.

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

```json
"mcpServers": {
  "code-context": {
    "command": "npx",
    "args": ["-y","@infino-ai/code-context"]
  }
}
```

## Documentation

## What code-context MCP server does

The code-context MCP server indexes a directory and exposes four tools for AI coding agents: `find`, `search`, `sql`, and `ask`. It is intended for repositories and other file collections, including logs, test output, stack traces, CI output, configuration, and documentation. The indexed material can be queried for exact matches, meaning-based matches, aggregations, or questions that span multiple files.

`find` returns every line containing an exact string, along with repository-wide and per-file counts. `search` combines keyword matching with semantic similarity and returns ranked code hits with `path:line` citations. `sql` provides read-only SQL over the index, including ranked searches as table-valued operations that can be counted or grouped. `ask` sends repository questions to small models in the Infino service; the response contains investigated rows and source citations rather than a prose answer.

## How it works

The tools use an Infino index held in two locations. Exact lookup and plain SQL run locally over the keyword index, which keeps those operations on the machine. Ranked retrieval, SQL statements containing ranked search, and `ask` run in the Infino cloud, where embeddings and heavier computation are handled. The agent remains responsible for reasoning and composing the final response.

Files are indexed as the agent uses the server, with the first question indexing the opened directory. Several `ask` investigations can run concurrently. JSONL and NDJSON files are chunked at record boundaries, helping keep log messages and related stack-trace content together. The same tools can search multiple repositories or other corpora when each local operation receives a repository path.

## Setup and configuration

Install Claude Code and Node.js 22 or newer on macOS or Linux. Add the marketplace and install the plugin with:

```bash
claude plugin marketplace add infino-ai/supergrep
claude plugin install code-context@infino-ai
```

After installation, open Claude Code in a directory containing a repository, logs, notes, or other files and ask a question. The code-context MCP server is presented through the Claude Code plugin rather than a list of separately configured clients.

## Tools and capabilities

- `find`: exact, complete line matching with total and per-file counts.
- `search`: ranked retrieval combining lexical and semantic matching.
- `sql`: read-only queries, grouping, counting, and ranked-search aggregation.
- `ask`: parallel repository investigations using Infino-hosted small models, with cited rows.
- Multi-file corpus search across source code, logs, test output, configuration, and documentation.

## Limitations and notes

Plain local operations and cloud-backed operations do not use the same execution location: semantic retrieval, ranked SQL, and `ask` send work to Infino cloud services, while exact `find` and plain SQL use the local index. Results include citations for retrieved code, but the agent still has to interpret them and write the answer. Performance and answer quality vary by model and question type; the README reports stronger results for repository-wide counts, rankings, and broad investigations than for locating a single named item that a large model can read directly.

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

