Semantic code search for every AI coding agent. Built in Rust. MCP-native.
Give your AI perfect memory of your entire codebase
Codetriever is a semantic code search engine with MCP support. The goal is to give AI agents memory of codebases through the Model Context Protocol.
# These commands exist but may not work:
codetriever mcp # MCP server (untested, may crash)
# These commands don't exist yet:
codetriever index /path/to/repo
codetriever search "database connection pooling logic"
Every AI coding tool needs semantic search. We're building the open protocol that powers them all through MCP. Not locked to Claude, Copilot, or Cursor - works with everything.
See LIMITATIONS.md for known issues, hardware requirements, and missing features.
Your Code β Tree-sitter Parser β Semantic Chunks β Vector Embeddings β Qdrant
β β
File Tracking ββββββββββββββββββββββββββββββββββββββββββββββββββββββ Search
(PostgreSQL) (MCP/API)
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install Just (command runner)
cargo install just
# or on macOS
brew install just
# Docker (for PostgreSQL and Qdrant)
# Install Docker Desktop from https://www.docker.com/products/docker-desktop
git clone https://github.com/clafollett/codetriever
cd codetriever
# Setup development environment
source stack.env
just dev-setup
# Build and install
cargo install --path crates/codetriever
cargo install --path crates/codetriever-api
# Initialize Docker services and database
just init
# Start API server
codetriever-api
# Index via API (requires file CONTENT, not filesystem paths - SaaS-ready!)
# Path should be repo-relative (e.g., "src/main.rs" not "/Users/bob/code/project/src/main.rs")
curl -X POST http://localhost:8080/index \
-H "Content-Type: application/json" \
-d '{
"project_id": "my-project",
"files": [
{
"path": "src/main.rs",
"content": "fn main() { println!(\"Hello\"); }"
}
]
}'
# Search via API (works! returns semantic results)
curl -X POST http://localhost:8080/search \
-H "Content-Type: application/json" \
-d '{"query": "function that prints hello", "limit": 10}'
# MCP server (exists but untested, probably broken)
codetriever mcp
# Initial setup
just dev-setup # Install dependencies and setup environment
source stack.env # Load development environment
# Infrastructure (Docker services)
just init # Initialize Docker services and database
just docker-up # Start PostgreSQL and Qdrant
just docker-down # Stop all containers
just docker-reset # Clean reset of Docker environment
just docker-logs # View service logs
# Database
just db-setup # Initialize database schema
just db-migrate # Run migrations
just db-reset # Drop and recreate database
# Development workflow
just test # Run all tests
just test-unit # Run unit tests only (fast)
just test-integration # Run integration tests
just fmt # Format code
just lint # Run clippy lints
just clippy-fix # Fix clippy warnings
just check # Run all quality checks (fmt + lint + test)
just watch # Watch mode for development
# Building & Running
just build # Build debug version
just build-release # Build optimized release
just run [args] # Run CLI with arguments
just api # Run API server
# Utility
just clean # Clean build artifacts
just docs # Generate and open documentation
just stats # Show project statistics
just update # Update dependencies
just audit # Security audit
just clean-test-data # Clean Qdrant test collections
# Quick setup for new contributors
just quick-start # Runs init + test
# Full CI pipeline locally
just ci # Runs fmt + lint + test + build
# Fix all auto-fixable issues
just fix # Runs fmt + clippy-fix
# Development mode with auto-reload
just dev # Starts Docker and watches API
# Run all tests
just test
# Run unit tests only (faster)
just test-unit
# Run integration tests
just test-integration
# Run specific crate tests
cargo test -p codetriever-indexer
cargo test -p codetriever-meta-data
VectorStorage, EmbeddingService, ContentParser, TokenCounterπ§ Alpha - Core functionality is working, API stabilizing.
See docs/architecture/current-architecture.md for detailed system design.
Want to make AI coding better? π¦Έ
just test && just clippy-fixSee CONTRIBUTING.md for setup details.
First PR merged gets a shoutout in the README! π
Week 1: Human architect brainstorms during dog walks, chatting with Claude mobile. "What if AI agents could semantically search codebases?"
Friday Aug 30, 2025: First commit at 2:36 PM EDT. Human designs, AI codes. Perfect pair programming.
Labor Day Weekend: Marathon coding session. Tree-sitter parsing, embeddings, vector storage. Human guides architecture, AI implements. No sleep, pure flow state.
Week 2: PostgreSQL state management, MCP server (via our Agenterra tool), comprehensive testing. Refactored everything twice because why not.
Today: Open sourcing as an alpha experiment. Indexing and search work, MCP untested but ready for contributors!
2 weeks. 1 human architect. 1 AI developer. Pure collaboration.
MIT - Use it, fork it, sell it, build a company. We don't care. Just make AI coding better.
Built with:
Special thanks to the MCP team at Anthropic for creating the protocol that makes this possible.
From dog walks to production in 14 days. This is what happens when humans and AI build together. π
120 commits
2 commits
Rust
78.0%
Python
20.4%
Just
1.2%
Semantic code search for every AI coding agent. Built in Rust. MCP-native.
Give your AI perfect memory of your entire codebase
Codetriever is a semantic code search engine with MCP support. The goal is to give AI agents memory of codebases through the Model Context Protocol.
# These commands exist but may not work:
codetriever mcp # MCP server (untested, may crash)
# These commands don't exist yet:
codetriever index /path/to/repo
codetriever search "database connection pooling logic"
Every AI coding tool needs semantic search. We're building the open protocol that powers them all through MCP. Not locked to Claude, Copilot, or Cursor - works with everything.
See LIMITATIONS.md for known issues, hardware requirements, and missing features.
Your Code β Tree-sitter Parser β Semantic Chunks β Vector Embeddings β Qdrant
β β
File Tracking ββββββββββββββββββββββββββββββββββββββββββββββββββββββ Search
(PostgreSQL) (MCP/API)
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install Just (command runner)
cargo install just
# or on macOS
brew install just
# Docker (for PostgreSQL and Qdrant)
# Install Docker Desktop from https://www.docker.com/products/docker-desktop
git clone https://github.com/clafollett/codetriever
cd codetriever
# Setup development environment
source stack.env
just dev-setup
# Build and install
cargo install --path crates/codetriever
cargo install --path crates/codetriever-api
# Initialize Docker services and database
just init
# Start API server
codetriever-api
# Index via API (requires file CONTENT, not filesystem paths - SaaS-ready!)
# Path should be repo-relative (e.g., "src/main.rs" not "/Users/bob/code/project/src/main.rs")
curl -X POST http://localhost:8080/index \
-H "Content-Type: application/json" \
-d '{
"project_id": "my-project",
"files": [
{
"path": "src/main.rs",
"content": "fn main() { println!(\"Hello\"); }"
}
]
}'
# Search via API (works! returns semantic results)
curl -X POST http://localhost:8080/search \
-H "Content-Type: application/json" \
-d '{"query": "function that prints hello", "limit": 10}'
# MCP server (exists but untested, probably broken)
codetriever mcp
# Initial setup
just dev-setup # Install dependencies and setup environment
source stack.env # Load development environment
# Infrastructure (Docker services)
just init # Initialize Docker services and database
just docker-up # Start PostgreSQL and Qdrant
just docker-down # Stop all containers
just docker-reset # Clean reset of Docker environment
just docker-logs # View service logs
# Database
just db-setup # Initialize database schema
just db-migrate # Run migrations
just db-reset # Drop and recreate database
# Development workflow
just test # Run all tests
just test-unit # Run unit tests only (fast)
just test-integration # Run integration tests
just fmt # Format code
just lint # Run clippy lints
just clippy-fix # Fix clippy warnings
just check # Run all quality checks (fmt + lint + test)
just watch # Watch mode for development
# Building & Running
just build # Build debug version
just build-release # Build optimized release
just run [args] # Run CLI with arguments
just api # Run API server
# Utility
just clean # Clean build artifacts
just docs # Generate and open documentation
just stats # Show project statistics
just update # Update dependencies
just audit # Security audit
just clean-test-data # Clean Qdrant test collections
# Quick setup for new contributors
just quick-start # Runs init + test
# Full CI pipeline locally
just ci # Runs fmt + lint + test + build
# Fix all auto-fixable issues
just fix # Runs fmt + clippy-fix
# Development mode with auto-reload
just dev # Starts Docker and watches API
# Run all tests
just test
# Run unit tests only (faster)
just test-unit
# Run integration tests
just test-integration
# Run specific crate tests
cargo test -p codetriever-indexer
cargo test -p codetriever-meta-data
VectorStorage, EmbeddingService, ContentParser, TokenCounterπ§ Alpha - Core functionality is working, API stabilizing.
See docs/architecture/current-architecture.md for detailed system design.
Want to make AI coding better? π¦Έ
just test && just clippy-fixSee CONTRIBUTING.md for setup details.
First PR merged gets a shoutout in the README! π
Week 1: Human architect brainstorms during dog walks, chatting with Claude mobile. "What if AI agents could semantically search codebases?"
Friday Aug 30, 2025: First commit at 2:36 PM EDT. Human designs, AI codes. Perfect pair programming.
Labor Day Weekend: Marathon coding session. Tree-sitter parsing, embeddings, vector storage. Human guides architecture, AI implements. No sleep, pure flow state.
Week 2: PostgreSQL state management, MCP server (via our Agenterra tool), comprehensive testing. Refactored everything twice because why not.
Today: Open sourcing as an alpha experiment. Indexing and search work, MCP untested but ready for contributors!
2 weeks. 1 human architect. 1 AI developer. Pure collaboration.
MIT - Use it, fork it, sell it, build a company. We don't care. Just make AI coding better.
Built with:
Special thanks to the MCP team at Anthropic for creating the protocol that makes this possible.
From dog walks to production in 14 days. This is what happens when humans and AI build together. π
120 commits
2 commits
Rust
78.0%
Python
20.4%
Just
1.2%