DC

duysolo/codebaxing

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

52 stars 6 forks 质量 76 趋势 0MIT

duysolo/codebaxing 是一个从 https://github.com/duysolo/codebaxing. 导入的 MCP 服务器候选服务器

概览

duysolo/codebaxing 是一个从 https://github.com/duysolo/codebaxing. 导入的 MCP 服务器候选服务器

概述(AI 翻译)

英语 |越南

用于语义代码搜索的MCP服务器。先索引一次代码库,然后用自然语言搜索。

工作原理

传统搜索匹配原文。Codebaxing 理解含义:

查询 发现(即使没有完全匹配)
“认证” login(), validCredentials(), authMiddleware()
“数据库连接” connectDB(), prismaClient, repository.query()

快速启动

1.启动ChromaDB

2.索引你的代码库(CLI)

这样会创建一个带有索引的 .codebaxing/ 文件夹。每个项目只需执行一次。

性能说明: 本地嵌入较慢(~4,000 个文件需约 4 分钟)。如需更快的索引,请使用 Gemini 嵌入(免费)——详见下文云嵌入。

3.安装 AI 编辑器 MCP 服务器

重启你的编辑器。现在你可以问:“查找认证逻辑”*

CLI 命令

指挥 描述
npx codebaxing@latest index 索引代码库(先要求)
npx codebaxing search 搜索索引代码
npx codebaxing stats [path] 显示指数统计

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Codebaxing

English | Tiếng Việt

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 → Results

Traditional search matches exact text. Codebaxing understands meaning:

Query Finds (even without exact match)
“authentication” login(), validateCredentials(), authMiddleware()
“database connection” connectDB(), prismaClient, repository.query()

Quick Start

1. Start ChromaDB

docker run -d -p 8000:8000 --name chromadb chromadb/chroma

2. Index Your Codebase (CLI)

npx codebaxing@latest index /path/to/your/project

This 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 editors

Restart your editor. Now you can ask: “Find the authentication logic”

CLI Commands

Command Description
npx codebaxing@latest index Index a codebase (required first)
npx codebaxing search Search indexed code
npx codebaxing stats [path] Show index statistics
npx codebaxing clean [path] Remove index (reset)
npx codebaxing install [--editor] Install MCP server
npx codebaxing uninstall [--editor] Uninstall MCP server

Tip: Use @latest for index to 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
search Semantic code search
stats Index statistics
languages Supported file extensions
remember Store project memory
recall Retrieve memories
forget Delete memories

Note: The index tool is disabled for AI agents. Use CLI: npx codebaxing@latest index

Configuration

Cloud Embedding (Fastest)

在 GitHub 查看完整 README

安装

npx -y codebaxing
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "codebaxing": { "command": "npx", "args": ["-y", "codebaxing"], "env": { "CHROMADB_URL": "http://localhost:8000" } } } }