- Home
- MCP servers
- CodeRAG
CodeRAG
- typescript
2
GitHub Stars
typescript
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"sylphxai-coderag": {
"command": "npx",
"args": [
"-y",
"@sylphx/coderag-mcp",
"--root=/path/to/project"
],
"env": {
"OPENAI_API_KEY": "sk-...",
"EMBEDDING_MODEL": "text-embedding-3-small",
"OPENAI_BASE_URL": "https://api.openai.com/v1",
"EMBEDDING_DIMENSIONS": "768"
}
}
}
}CodeRAG MCP Server enables instant hybrid code search for AI assistants. It runs locally with zero external dependencies, starts in under a second, and can be integrated with common MCP clients to power semantic code queries across your projects. You’ll index your codebase, optionally use vector embeddings for semantic search, and query results with fast, paired TF-IDF and embedding ranking.
How to use
Set up and run the CodeRAG MCP Server to power your AI assistant. You can connect through supported MCP clients and issue code queries that mix fast full-text search with optional semantic search. Use the MCP server to index your project once, keep it updated as you change files, and execute searches that surface relevant code snippets, functions, and modules.
Typical usage pattern: start the MCP server for your project, then configure your MCP client to talk to it. The server exposes a standard command you can run directly, or you can wire it into your client’s MCP configuration so your assistant can reason over your codebase with minimal latency.
How to install
Prerequisites: you need Node.js installed on your machine. If you don’t have Node.js, install it from the official source for your operating system.
Option A — Run the MCP server directly with npx (recommended for AI assistants):
npx @sylphx/coderag-mcp --root=/path/to/project
Option B — Wire the MCP server into your client configuration:
{
"mcpServers": {
"coderag": {
"command": "npx",
"args": ["-y", "@sylphx/coderag-mcp", "--root=/path/to/project"]
}
}
}
Configuration and usage notes
MCP server options include setting the root of your codebase, a maximum allowed file size to index, and an option to disable automatic indexing on startup. The provided defaults are designed to give instant startup with a cached index where possible.
Environment variables enable vector search when needed. The primary variable is OPENAI_API_KEY for embedding-based semantic search. Optionally, you can point to a custom embedding endpoint and model with OPENAI_BASE_URL, EMBEDDING_MODEL, and EMBEDDING_DIMENSIONS as needed.
MCP tool: codebase_search
The primary MCP tool exposes a search endpoint over your codebase using hybrid TF-IDF plus optional vector embeddings. You can tailor the search with parameters like query, limit, file extensions, and path filters to focus on the parts of your codebase that matter most.
Example query use in client context: you provide a query string and receive a list of results with file paths, snippets, and relevance scores. You can choose to include code content in the results for direct reference.
Available tools
codebase_search
MCP tool that performs hybrid TF-IDF plus optional vector search over your codebase, returning ordered results with file paths and code snippets.