mcp-ragex
MCP server for intelligent code search: semantic (RAG), symbolic (tree-sitter), and regex (ripgrep) search modes. Built for Claude Code and AI coding assistants.
claude mcp add --transport stdio jbenshetler-mcp-ragex docker run -i jbenshetler/mcp-ragex
How to use
RAGex is an AI-powered code search tool that lets Claude Code understand and reuse patterns from your codebase. It supports semantic search to find relevant code by meaning (not just keywords) and a fast regex mode for pattern-based queries. After installing, you index your project with ragex start and connect Claude Code with ragex register claude. Once configured, you can perform semantic searches like 'auth functions' to locate authentication patterns across your repository, or use regex queries such as 'async def' to identify code that matches specific patterns. The tool runs locally (via Docker) to keep your code private, and it provides a JSON-RPC interface for programmatic control. Use the CLI to index, register, and search, and rely on Claude Code to reuse existing patterns rather than generating duplicate code.
How to install
Prerequisites:
- Docker must be installed and running on your machine.
- curl or a web browser to fetch the installer (optional for Docker-based setup).
One-line installation (Docker-based workflow):
- Install via the provided script (as described in the README): curl -fsSL https://raw.githubusercontent.com/jbenshetler/mcp-ragex/refs/heads/main/install.sh | bash
Alternative manual setup (Docker):
- Ensure Docker is running on your system.
- Pull and run the Ragex Docker image: docker run -i jbenshetler/mcp-ragex
- Follow any on-screen prompts to configure Ragex, connect to Claude Code, and index your project as shown in the quick-start steps of the README.
Manual workflow steps (from README):
- Index your codebase: ragex start
- Connect Claude Code: ragex register claude | sh
- Test searches: ragex search "auth functions" or ragex search "async def" --regex
Additional notes
Tips and caveats:
- Ragex can operate with multiple options for embedding models and security modes; defaults are designed for secure, offline usage. If you need network access or larger models, see the installation details in the README.
- The Docker-based deployment keeps all processing local to your machine, minimizing data exposure.
- The CLI tool (ragex) handles indexing, registration, and searching; ensure your project is accessible to the CLI when running commands.
- If you encounter performance issues, consider the provided installation options (CPU vs CUDA) and embbeding model choices to balance speed and accuracy.
Related MCP Servers
grepai
Semantic Search & Call Graphs for AI Agents (100% Local)
mcp-local-rag
Local-first RAG server for developers using MCP. Semantic + keyword search for code and technical docs. Fully private, zero setup.
sourcerer
MCP for semantic code search & navigation that reduces token waste
mie
Persistent memory graph for AI agents. Facts, decisions, entities, and relationships that survive across sessions, tools, and providers. MCP server — works with Claude, Cursor, ChatGPT, and any MCP client.
code-memory
MCP server with local vector search for your codebase. Smart indexing, semantic search, Git history — all offline.
srclight
Deep code indexing MCP server for AI agents. 25 tools: hybrid FTS5 + embedding search, call graphs, git blame/hotspots, build system analysis. Multi-repo workspaces, GPU-accelerated semantic search, 10 languages via tree-sitter. Fully local, zero cloud dependencies.