Code Finder

AI model by Sourcegraph

Fast, efficient code search for coding agents.

Code Finder is an agentic search tool for AI agents that locates relevant code across repositories in a single call. It helps developers and engineering teams improve agent accuracy and reduce costs by providing precise context without manual file hunting.

Model specs

The full spec card (context, pricing per token, modalities and more) on AntSpace. Sign up free to see the full spec card.

Category: Developer Tools

Integration Protocol
Model Context Protocol (MCP)
Relative Search Time
1.00x (Baseline)
Relative Search Cost
1.00x (Baseline)
Output Data
File paths, line ranges, and context notes
  • Locates the right code in a single call with file paths and line ranges
  • Runs its own agentic search loop across repositories for faster discovery
  • Costs less than a coding agent performing the search itself
  • Compatible with any MCP-aware agent including Claude Code and Cursor

Overview

Code Finder is an agentic search tool from Sourcegraph designed to help AI coding agents locate relevant code quickly and efficiently. Built into the Sourcegraph MCP Server, it allows agents to find the right code in a single call by running its own specialized search loop across repositories. Instead of requiring a general-purpose coding agent to hunt through files manually, Code Finder returns exact file paths and line ranges along with a short note on why each one matters. It is compatible with any MCP-aware agent, including Claude Code, Cursor, and Amp, and also powers file discovery inside Sourcegraph's Deep Search.

Search and Discovery

  • Agentic search loop: The tool runs its own search loop across repositories to find matching file paths and line ranges.
  • Single-call discovery: One call returns the files, the line ranges, and a short note on why each one matters to the task.
  • Context window optimization: It returns a focused answer to the agent instead of requiring it to hunt through files manually.
  • Deep Search integration: The tool powers file discovery inside Sourcegraph's Deep Search AI agent.

Integration and Ecosystem

  • MCP Server integration: Code Finder is built into the Sourcegraph MCP Server for use with any MCP-aware agent.
  • Ecosystem compatibility: It works with MCP-compatible environments including Claude Code, Cursor, and Amp.
  • Standardized retrieval: The tool provides precise, cross-repository code intelligence through a standardized retrieval layer.

Performance and Efficiency

  • Cost efficiency Ratio: The tool costs less than a coding agent performing the search itself on the same tasks.
  • Scalable performance: It handles file-finding tasks across repositories ranging from small to very large monorepos.

Benchmarks

  • Time: 1.00x vs 1.14x for coding agents with MCP tools; Cost: 1.00x vs 1.63x for coding agents with MCP tools

Use cases

  • AI agents use Code Finder to locate where specific features like API rate limiting are enforced across multiple files.
  • Engineering teams integrate Code Finder with MCP-aware IDEs like Cursor to provide agents with precise file ranges for refactoring tasks.
  • Deep Search utilizes Code Finder to power its file discovery when answering complex questions about codebase architecture.

Specifications

Access
Available via Sourcegraph MCP Server for MCP-aware agents and IDEs
Integration Protocol
Model Context Protocol (MCP)
Relative Search Time
1.00x (Baseline)
Relative Search Cost
1.00x (Baseline)
Output Data
File paths, line ranges, and context notes

How it works

  1. Agent Request: An AI coding agent receives a request and decides to call the Code Finder tool via the Sourcegraph MCP Server.
  2. Agentic Search Loop: Code Finder runs its own search loop across the indexed codebase to find matching files and line ranges.
  3. Context Delivery: The tool returns a focused answer with file paths, line ranges, and descriptive notes to the calling agent.

FAQ

What information does Code Finder return?

It returns matching file paths, exact line ranges, and a short note explaining what each section of code does in relation to the task.

Which AI agents work with Code Finder?

Code Finder is compatible with any MCP-aware agent or development environment, including Claude Code, Cursor, and Amp.

Does Code Finder work with Deep Search?

Yes, Code Finder powers the file discovery capabilities inside Sourcegraph's Deep Search AI agent.

Added by AntSpace from public sources (sourcegraph.com).

Related

More AI models by Sourcegraph