Allows indexing and semantic search of Git repositories, enabling AI-powered code discovery across version-controlled codebases
Provides local, private AI embeddings for semantic code search, supporting models like nomic-embed-text and all-minilm for enterprise code analysis without external API calls
Enables semantic code search using OpenAI's embedding models (text-embedding-3-small, text-embedding-3-large) for generating vector representations of code
Enterprise Code Search MCP Server
A powerful Model Context Protocol (MCP) server for semantic code search with shared vector database. Supports both OpenAI and Ollama for embeddings, and can index local projects or Git repositories.
🚀 Features
Semantic code search using AI embeddings
Dual provider support: OpenAI or Ollama (local, private)
Flexible indexing: Local projects or Git repositories
Shared vector database with ChromaDB
Multi-project management: Handle multiple projects simultaneously
Automatic project structure analysis
Similar code search based on code snippets
Enterprise-ready: Private, secure, self-hosted
📋 Requirements
Node.js 18+
Docker and Docker Compose
Git (for repository indexing)
🛠️ Quick Start
1. Clone the repository
2. Install dependencies
3. Configure environment
4. Start services
5. Build and run
⚙️ Configuration
Using Ollama (Recommended for Enterprise)
Using OpenAI
🔧 Claude Desktop Integration
To use this MCP server with Claude Desktop, add to your claude_desktop_config.json
:
🎯 Usage Examples
1. Index a local project
2. Search in code
3. Find similar code
4. Analyze project structure
🛠️ Available Tools
Tool | Description |
| Index a local directory |
| Semantic search in code |
| List all indexed projects |
| Get embedding provider information |
📊 Example Queries
Functional searches
"Where is the authentication logic?"
"Functions that handle database operations"
"Environment variable configuration"
"Unit tests for the API"
Code analysis
"What design patterns are used?"
"Most complex functions in the project"
"Error handling in the code"
Technology-specific search
"Code using React hooks"
"PostgreSQL queries"
"Docker configuration"
🔧 Advanced Configuration
Recommended Ollama Models
File Patterns
The server supports extensive file type recognition including:
Programming Languages: Python, JavaScript/TypeScript, Java, C/C++, Go, Rust, PHP, Ruby, Swift, Kotlin, Scala, and more
Web Technologies: HTML, CSS, SCSS, Vue, Svelte
Configuration: JSON, YAML, TOML, Docker, Terraform
Documentation: Markdown, reStructuredText, AsciiDoc
Database: SQL files
Performance Tuning
🏢 Enterprise Deployment
Option 1: Dedicated Server
Option 2: Network Deployment
🔒 Security Considerations
Key Benefits
Private Data: Ollama keeps everything local
No External APIs: When using Ollama, no data leaves your network
Self-hosted: Full control over your code and embeddings
Isolated Environment: Docker containers provide isolation
Security Best Practices
📈 Monitoring & Troubleshooting
Useful Logs
Common Issues
Ollama not responding:
ChromaDB slow:
Poor embedding quality:
Try different model:
all-minilm
vsnomic-embed-text
Adjust chunk size
Verify source file quality
🤝 Collaborative Workflow
Typical Enterprise Workflow
DevOps indexes main projects
Developers search code using Claude
Automatic updates via CI/CD
Code analysis for code reviews
Best Practices
Index after important merges
Use descriptive project names
Maintain project-specific search filters
Document naming conventions
🛠️ Development
Project Structure
Available Scripts
📚 API Reference
The MCP server implements the standard Model Context Protocol with these specific tools:
index_local_project: Index local directories with configurable file patterns
search_codebase: Semantic search with project filtering and similarity scoring
list_indexed_projects: Enumerate all indexed projects with metadata
get_embedding_provider_info: Get current provider status and configuration
Each tool includes detailed JSON schema with examples and validation.
🤖 Recommended AI Models
For embeddings (Ollama)
nomic-embed-text
: Optimized for codeall-minilm
: Balanced, fastmxbai-embed-large
: High precision
For embeddings (OpenAI)
text-embedding-3-small
: Cost-effectivetext-embedding-3-large
: Higher precision
🐳 Docker Support
The project includes a complete Docker setup:
ChromaDB: Vector database for embeddings
Ollama: Local embedding generation
PostgreSQL: Optional metadata storage
All services are orchestrated with Docker Compose for easy deployment.
☕ Support
If this project helps you with your development workflow, consider supporting it:
📄 License
MIT License - see LICENSE file for details.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the project
Create your feature branch (
git checkout -b feature/AmazingFeature
)Commit your changes (
git commit -m 'Add some AmazingFeature'
)Push to the branch (
git push origin feature/AmazingFeature
)Open a Pull Request
📞 Support & Issues
📧 Issues: GitHub Issues
💬 Discussions: GitHub Discussions
☕ Support: Buy Me a Coffee
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables semantic code search across local projects and Git repositories using AI embeddings with ChromaDB. Supports both OpenAI and local Ollama models for private, enterprise-ready code analysis and similar code discovery.
- 🚀 Features
- 📋 Requirements
- 🛠️ Quick Start
- ⚙️ Configuration
- 🔧 Claude Desktop Integration
- 🎯 Usage Examples
- 🛠️ Available Tools
- 📊 Example Queries
- 🔧 Advanced Configuration
- 🏢 Enterprise Deployment
- 🔒 Security Considerations
- 📈 Monitoring & Troubleshooting
- 🤝 Collaborative Workflow
- 🛠️ Development
- 📚 API Reference
- 🤖 Recommended AI Models
- 🐳 Docker Support
- ☕ Support
- 📄 License
- 🤝 Contributing
- 📞 Support & Issues