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
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
fileEnsure 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 codebaseIncrease
EMBEDDING_BATCH_SIZE
for faster indexingMonitor 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
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
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-qualityA server exposing intelligent tools for enhancing RAG applications with entity extraction, query refinement, and relevance checking capabilities.Last updated -28
- -securityAlicense-qualityA server that integrates Retrieval-Augmented Generation (RAG) with the Model Control Protocol (MCP) to provide web search capabilities and document analysis for AI assistants.Last updated -3Apache 2.0
- -securityFlicense-qualityA local server that provides powerful code analysis and search capabilities for software projects, helping AI assistants and development tools understand codebases for tasks like code generation and refactoring.Last updated -4
- -securityAlicense-qualityAn intelligent server that provides semantic code search, domain-driven analysis, and advanced code understanding for large codebases using LLMs and vector embeddings.Last updated -5MIT License