codebaxing
Allows Windsurf (by Codeium) to perform semantic code search on an indexed codebase, enabling natural language queries to find relevant code.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@codebaxing find the authentication logic"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Codebaxing
MCP server for semantic code search. Index your codebase once, then search using natural language.
How It Works
Your Code → Tree-sitter Parser → Symbols → Embedding Model → Vectors → ChromaDB
↓
"find auth logic" → Embedding → Query Vector → Similarity Search → ResultsTraditional search matches exact text. Codebaxing understands meaning:
Query | Finds (even without exact match) |
"authentication" | login(), validateCredentials(), authMiddleware() |
"database connection" | connectDB(), prismaClient, repository.query() |
Related MCP server: code-context-mcp
Quick Start
1. Start ChromaDB
docker run -d -p 8000:8000 --name chromadb chromadb/chroma2. Index Your Codebase (CLI)
npx codebaxing@latest index /path/to/your/projectThis creates a .codebaxing/ folder with the index. Only needs to be done once per project.
Performance note: Local embedding is slow (~4 min for ~4,000 files). For faster indexing, use Gemini embedding (free) — see Cloud Embedding below.
3. Install MCP Server for AI Editors
npx codebaxing install # Claude Desktop
npx codebaxing install --cursor # Cursor
npx codebaxing install --windsurf # Windsurf
npx codebaxing install --all # All editorsRestart your editor. Now you can ask: "Find the authentication logic"
CLI Commands
Command | Description |
| Index a codebase (required first) |
| Search indexed code |
| Show index statistics |
| Remove index (reset) |
| Install MCP server |
| Uninstall MCP server |
Tip: Use
@latestforindexto ensure you have the newest version.
Search Options
npx codebaxing search "auth middleware" --path ./src --limit 10--path, -p- Codebase path (default: current directory)--limit, -n- Number of results (default: 5)
MCP Tools (for AI Agents)
After installing, AI agents can use these tools:
Tool | Description |
| Semantic code search |
| Index statistics |
| Supported file extensions |
| Store project memory |
| Retrieve memories |
| Delete memories |
Note: The
indextool is disabled for AI agents. Use CLI:npx codebaxing@latest index <path>
Configuration
Cloud Embedding (Fastest)
Local embedding runs on CPU and can be slow for large codebases (~4 min for ~4,000 files). Cloud embedding is ~25x faster and recommended for any project with 1,000+ files.
# Gemini (FREE - recommended, 1500 RPM free tier)
CODEBAXING_EMBEDDING_PROVIDER=gemini GEMINI_API_KEY=... npx codebaxing@latest index /path
# OpenAI (text-embedding-3-small, 384 dims)
CODEBAXING_EMBEDDING_PROVIDER=openai OPENAI_API_KEY=sk-... npx codebaxing@latest index /path
# Voyage (voyage-code-3, 1024 dims, code-optimized)
CODEBAXING_EMBEDDING_PROVIDER=voyage VOYAGE_API_KEY=va-... npx codebaxing@latest index /pathProvider | Model | Speed | Cost |
Gemini |
| ~10,000 texts/sec | Free (1500 RPM) |
OpenAI |
| ~10,000 texts/sec | ~$0.02 / 1M tokens |
Voyage |
| ~10,000 texts/sec | ~$0.06 / 1M tokens |
Local |
| ~200 texts/sec | Free (CPU) |
Note: Switching between providers requires full re-index (
npx codebaxing@latest index <path>) due to dimension differences.
Environment Variables
Variable | Description | Default |
| ChromaDB server URL |
|
| Embedding backend: |
|
| Compute device (local only): |
|
| Model quantization (local only): |
|
| Worker threads for parallel embedding (local only, 0=off) |
|
| Max file size in MB |
|
| Max chunks to index |
|
| Files per batch (lower = less RAM) |
|
| Concurrent batches |
|
| Save progress every N batches |
|
| Model cache directory (local only) |
|
| OpenAI API key (or use | - |
| Voyage API key (or use | - |
| Gemini API key (or use | - |
| Override embedding model name | per-provider default |
| Override embedding dimensions | per-provider default |
| Custom API endpoint for cloud providers | provider default |
Manual Editor Config
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"codebaxing": {
"command": "npx",
"args": ["-y", "codebaxing"],
"env": { "CHROMADB_URL": "http://localhost:8000" }
}
}
}~/.cursor/mcp.json
{
"mcpServers": {
"codebaxing": {
"command": "npx",
"args": ["-y", "codebaxing"],
"env": { "CHROMADB_URL": "http://localhost:8000" }
}
}
}Windsurf: ~/.codeium/windsurf/mcp_config.json
Zed: ~/.config/zed/settings.json (use context_servers key)
VS Code + Continue: ~/.continue/config.json
Supported Languages
Python, JavaScript, TypeScript, Go, Rust, Java, C/C++, C#, Ruby, PHP, Kotlin, Swift, Scala, Lua, Dart, Elixir, Haskell, OCaml, Zig, Perl, Bash, HTML, CSS, Vue, JSON, YAML, TOML, Makefile
Requirements
Node.js >= 20.0.0
Docker (for ChromaDB)
~500MB disk space (embedding model)
Technical Details
Component | Technology |
Local Embedding |
|
Cloud Embedding | Gemini |
Model Cache |
|
Vector Database | ChromaDB |
Code Parser | Tree-sitter (28 languages) |
MCP SDK |
|
Local mode: The embedding model is downloaded from HuggingFace on first run and cached at ~/.cache/codebaxing/models/. Uses q8 quantization (~3x faster than fp32). No network access after initial download.
Cloud mode: Sends code chunks to OpenAI/Voyage API for embedding. ~25x faster than local CPU. Requires API key.
License
MIT
Available Tools
9 toolscleanADestructiveIdempotent
Clean all indexed data for a codebase. Deletes ChromaDB collection and .codebaxing/ data. Preserves user config (ignore.json). Use this to fix corrupted indexes or start fresh.
Inputs: path (required).
forgetADestructiveIdempotent
DESTRUCTIVE: Remove memories matching specified criteria.
Delete by: memory_id, memory_type, tags, older_than (1d, 7d, 30d, 1y)
Inputs: path, tags, memory_id, older_than, +1 more.
indexAIdempotent
Index a codebase for semantic search. REQUIRED FIRST STEP.
Modes:
auto (default): Smart detection. If index exists, updates incrementally.
full: Force complete re-index.
load-only: Just load existing index without any indexing.
Creates a .codebaxing/ folder in the codebase directory.
Inputs: path (required), mode, embedding_model, file_extensions.
languagesARead-onlyIdempotent
List all supported programming languages and file extensions.
Inputs: no named parameters.
memory-statsARead-onlyIdempotent
Get statistics about stored memories for the current project.
Inputs: path.
recallARead-onlyIdempotent
Retrieve memories using semantic search.
Filters: memory_type, tags, time_range (today, week, month, all)
Inputs: query (required), path, tags, n_results, +2 more.
rememberB
Store a memory for later retrieval.
Memory types: conversation, status, decision, preference, doc, note TTL options: session (24h), day, week, month, permanent (default)
Inputs: content (required), memory_type (required), ttl, path, +1 more.
searchARead-onlyIdempotent
Semantic search for code. Returns ranked code chunks with file paths and line numbers.
Examples:
search(question="authentication login flow")
search(question="user model", language="python", symbol_type="class")
Inputs: question (required), path, language, n_results, +1 more.
statsBRead-onlyIdempotent
Get statistics about the currently loaded codebase index.
Inputs: path.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool has a distinct purpose: index, search, stats, languages, memory-stats, clean, remember, recall, forget. No overlapping or ambiguous tools; even stats and memory-stats are clearly scoped to different domains.
All tool names are single-word lowercase verbs or nouns that clearly indicate their action (e.g., index, search, remember, forget). This is consistent and predictable, though not verb_noun, the pattern is uniform and intuitive.
With 9 tools, the server is well-scoped, covering indexing, searching, memory management, and cleanup. Each tool is necessary for the core workflows, and the count is within the ideal range (3-15).
The toolset covers the full lifecycle: index creation/update, search, stats, memory CRUD (create, read, delete), and cleanup. A minor gap is the lack of a tool to list all memories or update a specific memory, but the core functionality is well covered.
Maintenance
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
MCP server for searching Airweave collections with natural language queries.
Capability registry for the agentic economy. Semantic search over verified MCP server listings.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceA semantic code search MCP server that enables natural language queries against your codebase, supporting features like related file discovery and context expansion, all running locally.2-
- FlicenseNot gradedqualityDmaintenanceMCP server for semantic code search and dependency graph analysis. Indexes codebases into a knowledge graph with vector embeddings for AI-powered code understanding.-
- AlicenseAqualityBmaintenanceMCP server for semantic code search with AST-aware chunking, hybrid vectors, and query syntax.121Apache 2.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server for semantic code search using Qdrant vector database, enabling natural language queries to find relevant code snippets across indexed codebases.MIT