About Coderag
Locus is a local BM25 code-search MCP server for coding agents. It offers repository search and related-code lookup, with configurable project roots and file filters.
Key features
- 01BM25 search across indexed code files
- 02Find code related to a file location
- 03Filter by extension and path
- 04Configure repository root
Use cases
- 01Search a repository for code matching a query
- 02Explore code related to a specific line
- 03Limit searches to selected file types or paths
MCP support
Locus exposes `codebase_search` and `find_related` tools to MCP clients. It uses stdio by default and can optionally use HTTP transport.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMELocus (@sylphx/locus)
Local BM25 search for coding agents. Two tools: codebase_search and find_related. The route id rust-tfidf is the historical name of that ranker.
npx -y @sylphx/locus --root=/absolute/path/to/project
Canonical package @sylphx/locus, bin locus, MCP name io.github.SylphxAI/locus. Docs: https://sylphxai.github.io/locus/.
Do not install @sylphx/coderag-mcp. That id is retired.
Root
Locus does not default to the current directory.
rooton the tool call- Launch
--root(--root=PATHor--root PATH) LOCUS_ROOT, thenCODERAG_ROOTwhenLOCUS_ROOTis unset
Launch arguments are only doctor and --root.
codebase_search
Required query (non-empty string). limit defaults to 10 and must be an integer from 1 to 100. include_content defaults to true.
Optional filters run before the limit:
file_extensions:tsand.tsmatch only.ts, not.tsx. Case-sensitive. Empty arrays are rejected.path_filter: case-sensitive path substring. Backslashes become slashes.exclude_paths: same substring rule, applied as exclusions.
Ranking is BM25 (k1 = 1.2, b = 0.75) over ASCII tokens longer than one character. login does not find authenticate. The result route is the string rust-tfidf.
find_related
Pass the repo-relative path (forward slashes) and a positive line inside a chunk. limit defaults to 10 and is not capped at 100. The result route is the string rust-related. An empty match is an error: No related chunks found for that location.
Index
Indexed extensions: .ts, .tsx, .js, .jsx, .mjs, .cjs, .rs, .md, .py, .go.
Skipped path segments: node_modules, dist, target, .git. Not gitignore. Files larger than 1,048,576 bytes are skipped. New indexes are written to .locus/rust-index.json and .locus/file-hashes.json. .coderag/ is read only when .locus/rust-index.json is absent. Do not commit either directory.
Platforms
@sylphx/locus-darwin-arm64, @sylphx/locus-darwin-x64, @sylphx/locus-linux-x64-gnu, @sylphx/locus-linux-arm64-gnu. Windows is not published.
Default transport is stdio. HTTP listens on 127.0.0.1:8080 only when MCP_TRANSPORT=http (or CODERAG_MCP_TRANSPORT=http).
npx -y @sylphx/locus doctor
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.