Skip to main content
MCP server CX Codex

code-context — AI agent MCP server for repo search

A local search layer for coding agents: exact matches, semantic search and SQL over one index kept in your repo. Useful when the codebase outgrows the agent.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env CX_ROOT=<CX_ROOT> --env CX_INDEX_DIR=<CX_INDEX_DIR> --env CX_AUTO_SYNC=<CX_AUTO_SYNC> --env CX_NO_EMBED=<CX_NO_EMBED> --env CX_NO_RECEIPT=<CX_NO_RECEIPT> --transport stdio code-context -- npx -y @infino-ai/code-context
Open on GitHub

What code-context does

The server hands the agent four tools. find lists every line with an exact string, like grep -n, adding repo-wide and per-file counts. search runs one ranked pass that fuses keyword hits with semantic similarity, so it still works when you don't know the wording; results carry the code and a path:line citation. sql reads the index, and ask sends a repo-spanning question to small models on the Infino service, which return the rows they found rather than prose.

find and plain sql run locally against the keyword index. Anything meaning-based — search, a sql statement with a ranked search inside, ask — runs in the Infino cloud, which keeps the heavy compute and embeddings off your laptop. There is one index, stored in your repository.

Setup goes through npx -y @infino-ai/code-context. In the Cursor and GitHub Copilot configs the repo root and index folder are set with CX_ROOT and CX_INDEX_DIR; leave them empty and the server has nothing to index and nowhere to put the index.

What it helps with

  • list every caller of a function before a refactor
  • explain how a feature works end to end without reading the tree
  • search code, logs and an issue export in one query
  • rank files by how much code covers a topic
  • make sense of a long CI stack trace

Example prompts for the agent

  • Find every call site of parseConfig and give me per-file counts
  • Walk me through the auth flow from request to token
  • Use sql to rank files by how much code mentions retries

How to install code-context

Platform CLI

claude mcp add --env CX_ROOT=<CX_ROOT> --env CX_INDEX_DIR=<CX_INDEX_DIR> --env CX_AUTO_SYNC=<CX_AUTO_SYNC> --env CX_NO_EMBED=<CX_NO_EMBED> --env CX_NO_RECEIPT=<CX_NO_RECEIPT> --transport stdio code-context -- npx -y @infino-ai/code-context

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about code-context

How do I install code-context in Claude Code?

Run claude mcp add code-context -- npx -y @infino-ai/code-context. For custom settings use `claude mcp add --env CX_ROOT=<CX_ROOT> --env CX_INDEX_DIR=<CX_INDEX_DIR> --env CX_AUTO_SYNC=<CX_AUTO_SYNC> --env CX_NO_EMBED=<CX_NO_EMBED> --env CX_NO_RECEIPT=<CX_NO_RECEIPT> --transport stdio code-context -- npx -y @infino-ai/code-context`.

What does code-context do?

It gives the agent four tools over one repo index: find for exact strings, search for ranked meaning-based results, sql for reading the index and ask for repository-wide questions.

Which settings does it need?

Point CX_ROOT at the repository root and CX_INDEX_DIR at the index folder. Other flags such as CX_AUTO_SYNC and CX_NO_EMBED are passed as env values too.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor