Offers instructions for running Qdrant vector database via Docker containers to support the semantic search functionality
Provides a Node.js library interface for programmatic integration, with specific adapters and APIs for Node.js environments
Leverages Ollama for embedding models to power semantic code search, with specific support for models like nomic-embed-text
@autodev/codebase
A platform-agnostic code analysis library with semantic search capabilities and MCP (Model Context Protocol) server support. This library provides intelligent code indexing, vector-based semantic search, and can be integrated into various development tools and IDEs.
🚀 Features
- Semantic Code Search: Vector-based code search using embeddings
- MCP Server Support: HTTP-based MCP server for IDE integration
- Terminal UI: Interactive CLI with rich terminal interface
- Tree-sitter Parsing: Advanced code parsing and analysis
- Vector Storage: Qdrant vector database integration
- Flexible Embedding: Support for various embedding models via Ollama
📦 Installation
1. Install and Start Ollama
2. Install and Start Qdrant
Start Qdrant using Docker:
Or download and run Qdrant directly:
3. Verify Services Are Running
4. Install project locally
🛠️ Usage
Command Line Interface
The CLI provides two main modes:
1. Interactive TUI Mode (Default)
2. MCP Server Mode (Recommended for IDE Integration)
IDE Integration (Cursor/Claude)
Configure your IDE to connect to the MCP server:
Library Usage
Node.js Usage
🔧 CLI Options
Global Options
--path=<path>
- Workspace path (default: current directory)--demo
- Create demo files in workspace--ollama-url=<url>
- Ollama API URL (default: http://localhost:11434)--qdrant-url=<url>
- Qdrant vector DB URL (default: http://localhost:6333)--model=<model>
- Embedding model (default: nomic-embed-text)--config=<path>
- Config file path--storage=<path>
- Storage directory path--cache=<path>
- Cache directory path--log-level=<level>
- Log level: error|warn|info|debug (default: error)--help, -h
- Show help
MCP Server Options
--port=<port>
- HTTP server port (default: 3001)--host=<host>
- HTTP server host (default: localhost)
🌐 MCP Server Features
Web Interface
- Home Page:
http://localhost:3001
- Server status and configuration - Health Check:
http://localhost:3001/health
- JSON status endpoint - MCP Endpoint:
http://localhost:3001/sse
- SSE/HTTP MCP protocol endpoint
Available MCP Tools
search_codebase
- Semantic search through your codebase- Parameters:
query
(string),limit
(number),filters
(object) - Returns: Formatted search results with file paths, scores, and code blocks
- Parameters:
get_search_stats
- Get indexing status and statisticsconfigure_search
- Configure search parameters at runtime
Scripts
💡 Why Use MCP Server Mode?
Problems Solved
- ❌ Repeated Indexing: Every IDE connection re-indexes, wasting time and resources
- ❌ Complex Configuration: Each project needs different path parameters in IDE
- ❌ Resource Waste: Multiple IDE windows start multiple server instances
Benefits
- ✅ One-time Indexing: Server runs long-term, index persists
- ✅ Simplified Configuration: Universal IDE configuration, no project-specific paths
- ✅ Resource Efficiency: One server instance per project
- ✅ Better Developer Experience: Start server in project directory intuitively
- ✅ Backward Compatible: Still supports traditional per-connection mode
- ✅ Web Interface: Status monitoring and configuration help
- ✅ Dual Mode: Can run both TUI and MCP server simultaneously
This is a platform-agnostic library extracted from the roo-code VSCode plugin.
📚 Examples
See the examples/
directory for complete usage examples:
nodejs-usage.ts
- Node.js integration examplesrun-demo-tui.tsx
- TUI demo application
This server cannot be installed
HTTP-based server that provides semantic code search capabilities to IDEs through the Model Context Protocol, allowing efficient codebase exploration without repeated indexing.
Related MCP Servers
- -securityFlicense-qualityA smart code retrieval tool based on Model Context Protocol that provides efficient and accurate code repository search capabilities for large language models.Last updated -Python
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server that helps large language models index, search, and analyze code repositories with minimal setupLast updated -1157PythonMIT License
- -securityAlicense-qualityA Model Context Protocol server that enables semantic search capabilities by providing tools to manage Qdrant vector database collections, process and embed documents using various embedding services, and perform semantic searches across vector embeddings.Last updated -89TypeScriptMIT License
- AsecurityAlicenseAqualityA flexible Model Context Protocol server that makes documentation or codebases searchable by AI assistants, allowing users to chat with code or docs by simply pointing to a git repository or folder.Last updated -12236JavaScriptMIT License