Coderag
@SylphxAI
Lightning-fast semantic code search with AST chunking (15+ languages) - Hybrid TF-IDF + Vector, MCP-ready for AI assistants
Overview
What is Coderag?
Coderag is an MCP server for intelligent codebase search that uses TF‑IDF ranking, designed to be RAG‑ready for AI assistants. It enables AI tools to search project source files and retrieve relevant code snippets.
How to use Coderag?
Install by adding the server configuration to your MCP client (Claude Desktop, VS Code, Cursor, Windsurf, Claude Code, or others) using npx -y @sylphx/coderag-mcp --root=/path/to/project. Optionally set --max-size (default 1 MB) or --no-auto-index. Invoke the codebase_search tool with a query string and optional parameters like limit, file_extensions, path_filter, and exclude_paths.
Key features of Coderag
- TF‑IDF ranked codebase search via MCP tool
codebase_search - LLM‑optimized output with minimal tokens and maximum content
- Configurable file size limit and auto‑indexing on startup
- Filter search by file extensions, path, and excluded directories
- Sub‑50 ms search latency after indexing
- Supports Node.js (via npx) or bun (via bunx) runtimes
Use cases of Coderag
- AI assistants answering questions about a project’s codebase
- Developers quickly finding relevant code snippets without leaving their editor
- Automated documentation or code review agents searching for specific patterns
- RAG pipelines for code generation tools that need context from existing source files
FAQ from Coderag
What does Coderag do?
Coderag indexes project source files and provides a TF‑IDF‑based search tool (codebase_search) that returns ranked code snippets optimized for consumption by large language models.
What are the runtime requirements?
Coderag requires Node.js (to run via npx) or bun (via bunx). No persistent database or external services are needed; the index is built in memory from the specified root directory.
Where does indexed data live?
All indexing is performed in memory at startup from the codebase root specified by --root. No data is stored to disk by the server itself.
Are there any known limits?
Files larger than 1 MB (configurable via --max-size) are skipped. Auto‑indexing can be disabled with --no-auto-index. Memory usage is ~1–2 MB per 1000 files.
Which transports and authentication are supported?
The server uses standard MCP stdio transport. No authentication mechanism is described; it is intended for local development use behind an MCP client.