Try the demo

Code search for Claude Code and Codex

Out of the box, coding agents find code the way you would in a terminal: grep for a word, then open the files. That works until nobody knows the word. Here's what they do today, and three ways to give them more.

What they do today: grep and read

Claude Code and Codex don't index your code. They search it with grep, list files and read them, and decide what to look at next. There's nothing to set up, and the results are always current.

Where it stops: grep finds words, not ideas. Ask where logins are rate-limited when the code says throttle, and the agent guesses names until one hits. Each guess is another turn, and each file it opens to check is read into its context.

1. Symbol tools from a language server

Serena is a free MCP server that gives agents IDE-style tools through language servers, for over 40 languages: find a symbol, list a file's outline, find what references a function. It doesn't use embeddings. Install it with uv tool install -p 3.13 serena-agent, run serena init, then add it to your agent.

Good for: moving through code by name: definitions, references, and refactors that need them.

Where it stops: it works from names, so it doesn't help when you don't know what the code is called. Some languages need their language server installed first.

2. A semantic index over MCP

claude-context, from Zilliz, indexes your code for search by meaning and by words together, and re-indexes only the files that change. It needs an embedding provider (an OpenAI key by default; Ollama runs locally) and a vector database (Zilliz Cloud, or Milvus you run yourself).

Good for: asking in plain words and getting the matching code, in any MCP client.

Where it stops: setup. With the defaults, your code is sent to OpenAI to be embedded and the index lives in Zilliz Cloud. Keeping it all local means running Ollama and Milvus yourself.

3. A local index with DMN

DMN indexes your code on your machine, with an embedding model it bundles, so there's no API key and no database to run. It reads the code three ways: what each piece does, the exact words in it, and which function calls which. One question goes to whichever fit, and the answer is the code itself: whole functions or blocks, with the code that calls them.

dmn context <symbol> gives a definition with its callers and what a change could affect, and dmn grep finds exact text and returns each hit inside its function. The index updates as files change; in Claude Code, a hook re-indexes each file the agent edits straight away.

Agents use it through a skill (the dmn command line) or DMN's MCP server:

dmn skill-init --apply
dmn mcp-init --apply

Either one is enough; the skill costs the agent fewer tokens per turn. Leave out --apply to see what a command would change. More in the search docs.

DMN for Windows is coming soon. The commands work once it's installed.

Where it stops: it needs DMN, which runs on Windows for now, and a large repository takes a while to index the first time. It helps most where the model can't place the code from memory. We measured it, including where it didn't help: the benchmarks.

Which one to use

grep and readSerenaclaude-contextDMN
Finds code byExact wordsSymbol namesMeaning and wordsMeaning, words and calls
What it needsNothinguv, and language serversAn embedding provider and a vector databaseDMN
Index stays on your machineNo indexNo indexOnly with Ollama and your own MilvusYes

If your agents rarely get lost in your code, grep is enough. The others answer different questions, so they combine: symbol tools for "who calls this", an index for "where do we do that".

See a search answered with code