$ buildwith diff sourcegraph repomix
Sourcegraph vs Repomix
Both are in Context & Indexing, where we rank Sourcegraph #3 and Repomix #4. Everything below comes from each tool's own pricing and docs pages, with the date we last checked them. How we rank.
pick Sourcegraph if your team already has Sourcegraph, or will, and you want coding agents to search across repositories and get file ranges back instead of reading the tree themselves.
pick Repomix if you want one file of a repository, or a compressed signature view of it, to hand to a chat model or an agent, and you do not want to run an index.
Sourcegraph
#3 · Paid
Sourcegraph MCP gives coding agents a retrieval layer over the code indexed in a Sourcegraph instance: keyword and semantic search, file reads, navigation, history, and Deep Search. Code Finder is the tool built for this job. You give it a task, it runs its own search loop, and it returns a short summary plus the matching file paths and line ranges, so the agent reads that instead of opening files until it finds the right ones. The page says go-to-definition and find-references use precise code indexing (SCIP), an open standard.
for An engineering team that wants one place for humans and agents to search a large, multi-repository codebase. The pricing page describes a single Enterprise plan for that, with search and navigation, Deep Search, and MCP access, deployed as single-tenant cloud or self-hosted.
use this if your team already has Sourcegraph, or will, and you want coding agents to search across repositories and get file ranges back instead of reading the tree themselves.
pricing
- Enterprise From $16,000/year
The pricing page shows one plan, starting at $16,000 as the minimum annual contract. It includes credits for AI features that scale with team size. The summary does not say how many credits that is. Credits are per user, pooled across the org, and do not expire monthly. Purchased credit buckets roll over on renewal. Volume credit buckets are an add-on. The plan lists search and navigation, Deep Search, Batch Changes, Insights, Monitoring, the full MCP server, API, and CLI, single-tenant cloud and self-hosted, and 24×5 support.
features
- ›The docs open with 'Supported on Enterprise plans.' The default endpoint, /.api/mcp, includes code_finder, keyword_search, read_file, list_files, list_repos, commit_search, diff_search, deepsearch_read, and evaluator. nls_search is a fallback on that endpoint when code_finder is unavailable or disabled
- ›Go-to-definition, find-references, creating a Deep Search conversation, compare_revisions, and list_refs are on /.api/mcp/all, not the default endpoint. /.api/mcp/deepsearch is Deep Search only
- ›read_file can take a line range and a revision. Files over 128KB return the first 200 lines and a truncation notice. list_files stops at 1,000 entries. find_references defaults to 10 results. The docs say every tool limits results so a call does not fill the context window
- ›Code Finder takes a task and an optional revision. It searches one repository you name, runs synchronously, and returns paths and line ranges with a short explanation. Usage is metered against the instance entitlement. When the quota is used up, the tool returns an error
- ›OAuth or a Sourcegraph access token. Users need the MCP#ACCESS permission, which the built-in User role has unless an admin removes it. Repository permissions still apply. Admins can set mcp.enabled to false or disable individual tools, including code_finder
- ›The docs name Claude Code, Codex, Cursor, Copilot, OpenCode, and Amp as clients. A client that fails OAuth with invalid_scope should request only the mcp scope
strengths
- ›On 2026-11-11 the GitHub API reported 10,285 stars and 1,376 forks on sourcegraph/sourcegraph-public-snapshot. The repository was created 2015-08-24. Primary language is Go. It is archived. The last push was 2024-09-02
- ›The README says development moved to a private monorepo and this repository is a public copy of sourcegraph/sourcegraph from just before that move. It points at one commit as the last change made under Apache-2.0. Stars on this repo are for that snapshot
- ›The self-hosted releases index lists 8.1.4873, published 2026-11-11, as the latest patch of 8.1. That page describes an executor host-kernel fix for CVE-2026-99999. It is not a commit in the archived snapshot: https://sourcegraph.com/changelog/releases/8.1.4873
- ›A July 23, 2026 Sourcegraph post says that, on a file-finding suite they assembled, Code Finder finished more than twice as fast as an agent using local search and cost up to 40% less than an agent calling Sourcegraph's own MCP tools, at comparable quality. The post says the chart is relative to Code Finder and does not list the tasks or absolute token counts: https://sourcegraph.com/blog/code-finder-fast-code-search-for-agents
limits
- ›LICENSE.enterprise says the software may be used in production only with a valid Sourcegraph Enterprise subscription for the correct number of seats, under the Enterprise terms or another agreement. You may copy and modify it for development and testing without a subscription
- ›Beyond that, the same license forbids copying, merging, publishing, distributing, sublicensing, or selling the software. Sourcegraph keeps title to modifications and patches, and those may only be used with a valid subscription for the correct number of seats
why #3
Ranked #3 in Context & Indexing. Sourcegraph is the long-running code search product in this list: an agent asks an indexed copy of the company's repositories and gets paths and line ranges back, including through Code Finder. The MCP docs say that server is supported on Enterprise plans. It ranks below CocoIndex and Serena because those two run locally without that plan. It ranks above Repomix because a pack still drops a repository into the prompt, while this server is built to return a slice. The scores are unmeasured placeholders and are not shown.
sources
- overview · 2026-11-11 · sourcegraph.com/mcp
- audience · 2026-11-11 · sourcegraph.com/pricing
- features · 2026-11-11 · sourcegraph.com/docs/api/mcp
- pricing · 2026-11-18 · sourcegraph.com/pricing
- strengths · 2026-11-11 · github.com/sourcegraph/sourcegraph-public-snapshot
- limits · 2026-11-11 · github.com/sourcegraph/sourcegraph-public-snapshot/blob/main/LICENSE.enterprise
- why ranked · 2026-11-11 · sourcegraph.com/docs/api/mcp
Repomix
#4 · Free / OSS
Repomix packs a repository into a single file for an LLM. The default output is XML (repomix-output.xml). Markdown, JSON, and plain text are the other styles. It respects .gitignore, runs Secretlint so files that match known credential formats are left out, and prints token counts for each file and for the whole pack. Run it with npx repomix@latest, or install it with npm install -g repomix, yarn, bun, or brew install repomix. --include and --ignore take globs. --remote packs a public GitHub repository. The site also documents Docker and a GitHub Action.
for Someone who wants to paste a codebase into ChatGPT, Claude, Gemini, Grok, or another chat, or who wants an agent to pack a repo itself. The site says this uses the subscription you already have, and that the CLI can read private repositories because it uses git installed on your machine. It is a pack step, not a hosted index.
use this if you want one file of a repository, or a compressed signature view of it, to hand to a chat model or an agent, and you do not want to run an index.
pricing
- Open source Free
The site documents npx, a global npm install, Homebrew, bun, yarn, and a Docker image, and it does not list an account, a subscription, or a paid tier.
features
- ›repomix --mcp starts an MCP server. The guide lists pack_codebase, pack_remote_repository, read_repomix_output (by output id, with a line range), and grep_repomix_output. Claude Code: claude mcp add repomix -- npx -y repomix --mcp. Cursor, VS Code, Cline, and Claude Desktop use the same npx command
- ›--sandbox confines MCP file tools to one workspace. Absolute paths, ~, and .. are refused. In that mode the server also registers file_system_read_file and file_system_read_directory, and it does not register remote packing. The guide says this is application-level confinement, not an OS sandbox
- ›pack_codebase can set compress, include and ignore globs, per-file output patterns, and the output style. Without --sandbox, pack_codebase loads the repomix.config in the directory it packs. The guide says to use --sandbox when the assistant might pack an untrusted checkout
- ›pack_codebase's compress flag is described as Tree-sitter compression that removes implementation details. The guide says this reduces token usage by about 70% and does not show the count behind that figure. The same description says compression is generally not needed, because grep_repomix_output can read the pack in pieces
- ›topFilesLength defaults to 10, the number of largest files by size shown in the metrics summary
strengths
- ›MIT license. On 2026-11-11 the GitHub API reported 29,222 stars and 1,633 forks. The repository was created 2024-07-13. Primary language is TypeScript
- ›Latest release on that date was v1.19.0, published 2026-11-08. The notes say the MCP server moved to the TypeScript SDK v2, long packs report progress and cancel with the client, and a path inside a remote URL is ignored unless you add an --include glob. They also name a generate_skill tool. The MCP guide page does not list that tool
- ›The v1.19.0 notes say an MCP pack_codebase always runs the secret scan, even if a config file in the packed directory turns security.enableSecurityCheck off. A normal CLI run still follows the config
- ›There is no index to build and no embedding model. A pack is a file you can read, grep, or hand to a model that has no MCP client
limits
- ›The guide calls --compress experimental. It keeps function and method signatures, interface and type definitions, and class structures and properties. It removes implementations, loop and conditional details, and internal variable declarations. The compressed file does not contain function bodies
- ›The guide says compression is for reducing token count and does not publish a measured reduction, a corpus, or a before-and-after count
why #4
Ranked #4 in Context & Indexing. Repomix is the shortest path from a repository to a file a model can read: one command, no index, no account on the site. It ranks below CocoIndex, Serena, and Sourcegraph because the pack is still a snapshot in the prompt. A default pack can be more text than a chunk search, a symbol lookup, or a search against an indexed copy of the repo, and the compressed form drops function bodies. Use it when you want the whole repo, or a signature-only view, in one shot. The scores are unmeasured placeholders and are not shown.
sources
- overview · 2026-11-11 · repomix.com/
- audience · 2026-11-11 · repomix.com/
- features · 2026-11-11 · repomix.com/guide/mcp-server
- pricing · 2026-11-18 · repomix.com/
- strengths · 2026-11-11 · github.com/yamadashy/repomix
- limits · 2026-11-11 · repomix.com/guide/code-compress
- why ranked · 2026-11-11 · repomix.com/