AgenticRAG MCP Server
An intelligent codebase processing server that provides agentic RAG (Retrieval-Augmented Generation) capabilities through the Model Context Protocol (MCP).
Features
- Intelligent Code Indexing: Automatically chunks and embeds codebases for semantic search
- Agentic Retrieval: Self-critiquing retrieval loop that ensures comprehensive context
- Multi-Model Architecture: Uses GPT-4o for retrieval and Claude 3 for planning
- Live Updates: File system watching for automatic re-indexing
- Cost Control: Built-in telemetry and budget management
Quick Installation
1. Clone and Install
The install script will:
- Check Python version (3.8+ required)
- Create a virtual environment
- Install all dependencies
- Prompt for your API keys
- Create necessary directories
- Generate Claude configuration
2. Add to Claude
After installation, add AgenticRAG to Claude:
Windows (Claude Desktop):
- Open
%APPDATA%\Claude\claude_desktop_config.json
- Add the configuration from
claude_config_snippet.json
macOS/Linux (Claude Desktop):
- Open
~/.config/claude/claude_desktop_config.json
- Add the configuration from
claude_config_snippet.json
3. Restart Claude
Restart Claude to load the new MCP server.
Manual Installation
If you prefer to install manually:
Usage
Once installed, you can use these tools in Claude:
Initialize a Repository
Search Your Code
Get Repository Statistics
Example Conversation
Configuration
Required Environment Variables
Optional Configuration
Architecture
How It Works
- Indexing: The system chunks your code respecting language boundaries and creates embeddings
- Retrieval: When you search, an AI agent generates optimized queries and retrieves relevant chunks
- Self-Evaluation: The agent evaluates if it has enough context and can perform additional searches
- Compression: Results are intelligently summarized to provide clear, actionable answers
Troubleshooting
"No module named 'chromadb'"
Activate the virtual environment:
"OpenAI API key not found"
Make sure your .env
file contains:
"MCP server not found in Claude"
- Ensure you've added the configuration to Claude's config file
- Restart Claude Desktop completely
- Check the logs in
./logs/agenticrag.log
Search returns no results
Ensure you've indexed the repository first using the init_repo tool.
Development
Running Tests
Local Testing
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
License
MIT License - see LICENSE file for details.
Acknowledgments
- Built for Claude Desktop using the Model Context Protocol
- Uses ChromaDB for vector storage
- Powered by OpenAI embeddings and LangGraph
If you prefer manual installation:
Usage
Once installed, you can use these tools in Claude:
Index a Repository
Search Code
Get Statistics
Example Conversation
Configuration
The server can be configured via environment variables in .env
:
Troubleshooting
Module Not Found
- Ensure virtual environment is activated:
source venv/bin/activate
- Check installation:
pip list | grep agenticrag
API Key Errors
- Verify keys in
.env
file - Ensure no extra spaces or quotes around keys
- Check key permissions for required models
Claude Can't Find Tools
- Verify configuration path is absolute, not relative
- Check Claude logs: Help → Show Logs
- Ensure MCP server section exists in config
Server Won't Start
- Check Python version:
python3 --version
(need 3.8+) - Verify Redis is running:
redis-cli ping
- Check port availability:
lsof -i:8000
Performance Issues
- Adjust
CHUNK_SIZE_TOKENS
for your codebase - Increase
EMBEDDING_BATCH_SIZE
for faster indexing - Monitor costs with
get_repo_stats
tool
Development
Running Tests
Code Formatting
Project Structure
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature-name
- Make your changes and test
- Submit a pull request
License
MIT License - see LICENSE file for details
Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Wiki
This server cannot be installed
An intelligent codebase processing server that provides agentic RAG capabilities for code repositories, enabling semantic search and contextual understanding through self-evaluating retrieval loops.
Related MCP Servers
- -securityFlicense-qualityServer that enhances the capabilities of the Cline coding agent. It provides intelligent code suggestions, reduces hallucinations, and documents the knowledge base by leveraging your project's documentation and detecting the technologies used in your codebase.Last updated -10JavaScript
- -securityAlicense-qualityA Model Context Protocol server that enables AI agents to retrieve and understand entire codebases at once, providing tools to analyze local workspaces or remote GitHub repositories.Last updated -9TypeScriptMIT License
- -securityFlicense-qualityA server component of the Model Context Protocol that provides intelligent analysis of codebases using vector search and machine learning to understand code patterns, architectural decisions, and documentation.Last updated -4Python
- -securityAlicense-qualityAn MCP server that analyzes codebases and generates contextual prompts, making it easier for AI assistants to understand and work with code repositories.Last updated -10PythonMIT License