MCP Codebase Index 0cfdab34

MCP搜索检索

提供方 itseasy21 · 包名 mcp-codebase-index

搜索检索 stdio · 本地进程 无需鉴权 社区 / 第三方 Claude DesktopClaudeCursorWindsurf
查看接入方式

MCP Codebase Index 是一个基于语义搜索的代码库索引服务,允许开发者使用自然语言查询搜索和理解代码库,支持多种编程语言和实时更新。

一句话选型结论

按资料字段整理

MCP Codebase Index 0cfdab34 属于搜索检索类 MCP 服务器,stdio · 本地进程,无需鉴权,可直接接入 Claude Desktop、Claude、Cursor 等,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类搜索检索 传输方式stdio · 本地进程 鉴权无需鉴权 部署方式本地部署
GitHub 星标 0 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

搜索检索
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

语义搜索TypeScript本地部署代码索引自然语言处理多语言支持实时更新

安装与配置

stdio · 本地进程 无需鉴权
客户端在本机拉起子进程,数据不出本机
npx mcp-codebase-index

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Node.js,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
联网搜索取证

让模型查最新资料并给出出处。

资料聚合

把一个主题的网页、文档集中抓回来整理。

情报与竞品检索

按关键词持续检索行业动态和竞品信息。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude Desktop、Claude、Cursor,换客户端不用重新研究配置。
  • 资料标注无需鉴权,装好就能连。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在搜索检索场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop、Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
MCP Codebase Index 0cfdab34当前 未标注 stdio · 本地进程 本地部署 有 2026-05-17
Brave Search 433812ff 2 未标注 未标注 无 2026-05-17
Sequentialthinking 1 SSE · 服务端推送 远程部署 有 2026-05-18
Baidu Netdisk 未标注 未标注 未标注 无 2026-05-17
ragflow 未标注 stdio · 本地进程 本地部署 有 2026-04-11
mindsdb (430e18) 未标注 未标注 未标注 有 2026-05-17

服务器档案

搜索检索
字段来自项目仓库与公开索引,中文说明由本站标注
提供方itseasy21上游标注的维护方 itseasy21
分类搜索检索本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式无需鉴权远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时mcp-codebase-index · Node.js本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

11.9 KB
来自项目仓库与上游目录的原文,未做删改

MCP Codebase Index

A powerful Model Context Protocol (MCP) server that enables AI assistants to search and understand your codebase using semantic search. Find code using natural language queries like "authentication logic" or "database connection handling" instead of exact text matching.

Features

  • 🔍 Semantic Code Search - Search using natural language, not just keywords
  • 🎯 Smart Code Parsing - Understands functions, classes, and code structure using Tree-sitter
  • 🔄 Real-time Updates - Automatically reindexes when files change or branches switch
  • 🚀 Multiple Embedding Providers - Use Google Gemini (free), OpenAI, or local Ollama models
  • ☁️ Flexible Storage - Works with Qdrant Cloud (free tier) or self-hosted instances

Installation```bash

npm install -g mcp-codebase-index


Or use with npx (no installation required):```bash
npx mcp-codebase-index

Quick Start

1. Set Up Qdrant Vector Database

Choose one option:

Option A: Qdrant Cloud (Recommended for beginners)
- Sign up for free at Qdrant Cloud
- Create a cluster (free tier available)
- Get your API URL and key

Option B: Local Docker```bash
docker run -p 6333:6333 qdrant/qdrant


### 2. Get an Embedding Provider API Key

Choose one option:

**Option A: Google Gemini (Free)**
- Get a free API key at Google AI Studio

**Option B: OpenAI**
- Get an API key at OpenAI Platform

**Option C: Ollama (Local, Free)**
- Install Ollama
- Pull a model: `ollama pull nomic-embed-text`

### 3. Configure Your IDE/Editor

Choose your IDE or editor and follow the setup instructions:

Claude Desktop

Add this to your Claude Desktop config file:

**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
**Linux**: `~/.config/Claude/claude_desktop_config.json````json
{
  "mcpServers": {
    "codebase-index": {
      "command": "npx",
      "args": ["-y", "mcp-codebase-index"],
      "env": {
        "CODEBASE_PATH": "/absolute/path/to/your/repository",
        "EMBEDDING_PROVIDER": "gemini",
        "GEMINI_API_KEY": "your-api-key-here",
        "QDRANT_URL": "http://localhost:6333"
      }
    }
  }
}

For Qdrant Cloud:```json
{
"mcpServers": {
"codebase-index": {
"command": "npx",
"args": ["-y", "mcp-codebase-index"],
"env": {
"CODEBASE_PATH": "/absolute/path/to/your/repository",
"EMBEDDING_PROVIDER": "gemini",
"GEMINI_API_KEY": "your-api-key-here",
"QDRANT_URL": "https://your-cluster.cloud.qdrant.io",
"QDRANT_API_KEY": "your-qdrant-api-key"
}
}
}
}


Restart Claude Desktop after saving the configuration.

Claude Code (VS Code Extension)

1. Open VS Code Settings (Cmd/Ctrl + ,)
2. Search for "Claude Code: MCP Servers"
3. Click "Edit in settings.json"
4. Add this configuration:```json
{
  "claude-code.mcpServers": {
    "codebase-index": {
      "command": "npx",
      "args": ["-y", "mcp-codebase-index"],
      "env": {
        "CODEBASE_PATH": "/absolute/path/to/your/repository",
        "EMBEDDING_PROVIDER": "gemini",
        "GEMINI_API_KEY": "your-api-key-here",
        "QDRANT_URL": "http://localhost:6333"
      }
    }
  }
}

Reload VS Code after saving.

Cursor

Cursor supports MCP servers through its AI settings:

  1. Open Cursor Settings (Cmd/Ctrl + ,)
  2. Navigate to "Features" → "AI"
  3. Scroll to "Model Context Protocol"
  4. Click "Edit Config" or locate the config file:
    - macOS: ~/Library/Application Support/Cursor/User/globalStorage/mcp.json
    - Windows: %APPDATA%/Cursor/User/globalStorage/mcp.json
    - Linux: ~/.config/Cursor/User/globalStorage/mcp.json

  5. Add this configuration:```json
    {
    "mcpServers": {
    "codebase-index": {
    "command": "npx",
    "args": ["-y", "mcp-codebase-index"],
    "env": {
    "CODEBASE_PATH": "/absolute/path/to/your/repository",
    "EMBEDDING_PROVIDER": "gemini",
    "GEMINI_API_KEY": "your-api-key-here",
    "QDRANT_URL": "http://localhost:6333"
    }
    }
    }
    }


Restart Cursor after saving.

VS Code with Continue Extension

If you're using the Continue extension:

1. Open the Continue configuration file:
   - **macOS/Linux**: `~/.continue/config.json`
   - **Windows**: `%USERPROFILE%\.continue\config.json`

2. Add to the `experimental.modelContextProtocolServers` section:```json
{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "name": "codebase-index",
        "command": "npx",
        "args": ["-y", "mcp-codebase-index"],
        "env": {
          "CODEBASE_PATH": "/absolute/path/to/your/repository",
          "EMBEDDING_PROVIDER": "gemini",
          "GEMINI_API_KEY": "your-api-key-here",
          "QDRANT_URL": "http://localhost:6333"
        }
      }
    ]
  }
}

Reload VS Code after saving.

Windsurf Editor

Windsurf supports MCP servers natively:

  1. Open Windsurf Settings
  2. Navigate to MCP Settings or locate the config file:
    - macOS: ~/Library/Application Support/Windsurf/mcp_config.json
    - Windows: %APPDATA%/Windsurf/mcp_config.json
    - Linux: ~/.config/Windsurf/mcp_config.json

  3. Add this configuration:```json
    {
    "mcpServers": {
    "codebase-index": {
    "command": "npx",
    "args": ["-y", "mcp-codebase-index"],
    "env": {
    "CODEBASE_PATH": "/absolute/path/to/your/repository",
    "EMBEDDING_PROVIDER": "gemini",
    "GEMINI_API_KEY": "your-api-key-here",
    "QDRANT_URL": "http://localhost:6333"
    }
    }
    }
    }


Restart Windsurf after saving.

Zed Editor

Zed has experimental MCP support:

1. Open Zed Settings (Cmd/Ctrl + ,)
2. Add to your settings.json:```json
{
  "experimental": {
    "mcp_servers": {
      "codebase-index": {
        "command": "npx",
        "args": ["-y", "mcp-codebase-index"],
        "env": {
          "CODEBASE_PATH": "/absolute/path/to/your/repository",
          "EMBEDDING_PROVIDER": "gemini",
          "GEMINI_API_KEY": "your-api-key-here",
          "QDRANT_URL": "http://localhost:6333"
        }
      }
    }
  }
}

Restart Zed after saving.

Other MCP-Compatible Clients

For any MCP-compatible client, use this standard configuration:```json
{
"mcpServers": {
"codebase-index": {
"command": "npx",
"args": ["-y", "mcp-codebase-index"],
"env": {
"CODEBASE_PATH": "/absolute/path/to/your/repository",
"EMBEDDING_PROVIDER": "gemini",
"GEMINI_API_KEY": "your-api-key-here",
"QDRANT_URL": "http://localhost:6333"
}
}
}
}


Consult your client's documentation for the exact config file location.

### 4. Restart Your IDE/Editor

After saving the configuration, restart your IDE/editor. The server will automatically start indexing your codebase on first run.

## Usage

Once configured, you can ask your AI assistant to search your codebase:

**Example queries:**
- "Find the authentication middleware"
- "Show me database connection code"
- "Where is the user validation logic?"
- "Find API endpoint handlers"
- "Show me error handling utilities"

**Advanced usage:**
- "Search for 'rate limiting' in TypeScript files"
- "Find functions related to payment processing in the /src/api directory"
- "Show me recent changes (reindex first)"

## Available Tools

The MCP server provides these tools to your AI assistant:

### `codebase_search`
Search your codebase using natural language or code queries.

**Parameters:**
- `query` (required) - Your search query
- `limit` - Number of results (default: 10)
- `threshold` - Similarity threshold 0-1 (default: 0.7)
- `fileTypes` - Filter by extensions (e.g., `[".ts", ".js"]`)
- `paths` - Filter by paths (e.g., `["src/api"]`)
- `includeContext` - Include surrounding code (default: true)

### `indexing_status`
Check indexing progress and statistics.

### `reindex`
Re-index your codebase (useful after pulling changes).

**Parameters:**
- `mode` - 'full', 'incremental', or 'file'
- `paths` - Specific files to reindex (optional)
- `force` - Force reindex even if unchanged

### `configure_indexer`
Update indexer settings at runtime.

### `validate_config`
Test your configuration and connections.

### `clear_index`
Clear all indexed data and start fresh.

## Configuration Reference

### Required Settings

| Variable | Description | Example |
|----------|-------------|---------|
| `CODEBASE_PATH` | Absolute path to your repository | `/Users/you/projects/myapp` |
| `EMBEDDING_PROVIDER` | Provider to use | `gemini`, `openai`, or `ollama` |
| `QDRANT_URL` | Qdrant instance URL | `http://localhost:6333` |

### Provider-Specific Settings

**For Gemini:**```bash
GEMINI_API_KEY=your-api-key

For OpenAI:```bash
OPENAI_API_KEY=your-api-key
OPENAI_MODEL=text-embedding-3-small # or text-embedding-3-large


**For Ollama:**```bash
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_MODEL=nomic-embed-text

Optional Settings

Variable Description Default
COLLECTION_NAME Qdrant collection name codebase_index
INDEX_BATCH_SIZE Files per batch 50
INDEX_CONCURRENCY Parallel processing limit 5
LOG_LEVEL Logging detail info
QDRANT_API_KEY For Qdrant Cloud -

Supported Languages

  • TypeScript/JavaScript
  • Python
  • Java
  • Go
  • Rust
  • C/C++
  • C#
  • Ruby
  • PHP
  • Markdown

Unsupported languages fall back to intelligent text chunking.

Troubleshooting

"Cannot find module" errors```bash

npm install -g mcp-codebase-index


### Indexing is slow
Reduce `INDEX_CONCURRENCY` or increase `INDEX_BATCH_SIZE` in your configuration.

### "Connection refused" to Qdrant
- Ensure Qdrant is running: `docker ps` or check Qdrant Cloud status
- Verify `QDRANT_URL` is correct
- For cloud: ensure `QDRANT_API_KEY` is set

### No search results
- Check indexing status using the `indexing_status` tool
- Try reindexing with the `reindex` tool
- Lower the similarity `threshold` in your search

### Rate limiting errors
If using a free API tier:
- Reduce `INDEX_CONCURRENCY` to 1-2
- Increase `INDEX_BATCH_SIZE` to reduce API calls

## How It Works

1. **Code Parsing**: Uses Tree-sitter to parse code into meaningful chunks (functions, classes, etc.)
2. **Embedding Generation**: Converts code into vector embeddings using your chosen AI provider
3. **Vector Storage**: Stores embeddings in Qdrant for fast similarity search
4. **Semantic Search**: Finds relevant code by comparing query embeddings to stored code embeddings
5. **Real-time Updates**: Watches for file changes and automatically reindexes

## Performance Tips

- **For large codebases (1000+ files)**: Use `INDEX_BATCH_SIZE=100` and `INDEX_CONCURRENCY=3`
- **For fast iteration**: Use Ollama with local models (no API calls)
- **For best quality**: Use OpenAI's `text-embedding-3-large` model
- **For free usage**: Use Google Gemini (generous free tier)

## Privacy & Security

- All code indexing happens locally or in your chosen infrastructure
- API keys are only used for embedding generation
- Code is never sent to third parties (except for embedding generation)
- Self-hosted Ollama option keeps everything completely local

## Examples

### Example 1: Find Authentication Code```
You: "Find all authentication middleware in the codebase"
AI Assistant: [Uses codebase_search tool with query "authentication middleware"]

Example 2: Reindex After Git Pull```

You: "I just pulled new changes, please reindex"
AI Assistant: [Uses reindex tool with mode "incremental"]


### Example 3: Search Specific Directory```
You: "Search for error handlers in the src/api directory"
AI Assistant: [Uses codebase_search with query "error handlers" and paths ["src/api"]]

Contributing

Contributions are welcome! Please visit our GitHub repository to:
- Report issues
- Submit pull requests
- Request features
- Ask questions

License

MIT License - see LICENSE file for details

Support

  • Issues: GitHub Issues
  • Discussions: GitHub Discussions

Acknowledgments

Built with:
- Model Context Protocol by Anthropic
- Tree-sitter for code parsing
- Qdrant for vector storage

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
MCP Codebase Index 0cfdab34 怎么安装?

在客户端按下面的安装命令接入:npx mcp-codebase-index。对应的包名是 mcp-codebase-index。装完在客户端配置里引用同一个包或端点。

MCP Codebase Index 0cfdab34 怎么在 Claude Desktop、Claude、Cursor 里配置?

它的传输方式是stdio · 本地进程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

MCP Codebase Index 0cfdab34 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

MCP Codebase Index 0cfdab34 需要 API Key 吗?

资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

MCP Codebase Index 0cfdab34 支持哪些客户端?

资料标注支持 Claude Desktop、Claude、Cursor、Windsurf、VS Code;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

MCP Codebase Index 0cfdab34 能提供哪些能力?

资料显示能力标签包括 搜索、代码索引、TypeScript、Claude、实时更新。具体工具清单以官方文档为准。

MCP Codebase Index 0cfdab34 需要什么运行环境?

运行时为 Node.js;属于本地进程,需要在本机装好运行环境。

MCP Codebase Index 0cfdab34 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。