code-index-mcp — Claude MCP 必备工具中文教程 是 AI Skill Hub 本期精选MCP工具之一。综合评分 8.4 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
code-index-mcp — Claude MCP 必备工具中文教程 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
code-index-mcp — Claude MCP 必备工具中文教程 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/johnhuang316/code-index-mcp
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"code-index-mcp---claude-mcp---------": {
"command": "npx",
"args": ["-y", "code-index-mcp"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 code-index-mcp — Claude MCP 必备工具中文教程 执行以下任务... Claude: [自动调用 code-index-mcp — Claude MCP 必备工具中文教程 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"code-index-mcp___claude_mcp_________": {
"command": "npx",
"args": ["-y", "code-index-mcp"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
Intelligent code indexing and analysis for Large Language Models
Transform how AI understands your codebase with advanced search, analysis, and navigation capabilities.
</div>
<a href="https://glama.ai/mcp/servers/@johnhuang316/code-index-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@johnhuang316/code-index-mcp/badge" alt="code-index-mcp MCP server" /> </a>
Code Index MCP is a Model Context Protocol server that bridges the gap between AI models and complex codebases. It provides intelligent indexing, advanced search capabilities, and detailed code analysis to help AI assistants understand and navigate your projects effectively.
Perfect for: Code review, refactoring, documentation generation, debugging assistance, and architectural analysis.
The easiest way to get started with any MCP-compatible application:
Prerequisites: Python 3.10+ and uv
1. Add to your MCP configuration (e.g., claude_desktop_config.json or ~/.claude.json):
{
"mcpServers": {
"code-index": {
"command": "uvx",
"args": ["code-index-mcp"]
}
}
}
> Optional: append --project-path /absolute/path/to/repo to the args array so the server > initializes with that repository automatically (equivalent to calling set_project_path > after startup).
uvx automatically handles installation and execution3. Start using (give these prompts to your AI assistant):
Set the project path to /Users/dev/my-react-app
Find all TypeScript files in this project
Search for "authentication" functions
Analyze the main App.tsx file
If you launch with --project-path, you can skip the first command above - the server already knows the project location.
For contributing or local development:
1. Clone and install:
git clone https://github.com/johnhuang316/code-index-mcp.git
cd code-index-mcp
uv sync
2. Configure for local development:
{
"mcpServers": {
"code-index": {
"command": "uv",
"args": ["run", "code-index-mcp"]
}
}
}
3. Debug with MCP Inspector:
npx @modelcontextprotocol/inspector uv run code-index-mcp
<details> <summary><strong>Alternative: Manual pip Installation</strong></summary>
If you prefer traditional pip management:
pip install code-index-mcp
Then configure:
{
"mcpServers": {
"code-index": {
"command": "code-index-mcp",
"args": []
}
}
}
</details>
git clone https://github.com/johnhuang316/code-index-mcp.git
cd code-index-mcp
uv sync
uv run code-index-mcp
Code Review: "Find all places using the old API" Refactoring Help: "Where is this function called?" Learning Projects: "Show me the main components of this React project" Debugging: "Search for all error handling related code"
1. Initialize Your Project
Set the project path to /Users/dev/my-react-app Automatically indexes your codebase and creates searchable cache
2. Explore Project Structure
Find all TypeScript component files in src/components Uses: find_files with pattern src/components/**/*.tsx
3. Analyze Key Files
Give me a summary of src/api/userService.ts Uses: get_file_summary to show functions, imports, and complexity Tip: run build_deep_index first if you get a needs_deep_index response.
<details> <summary><strong>Code Pattern Search</strong></summary>
Search for all function calls matching "get.*Data" using `regex=True` Finds: getData(), getUserData(), getFormData(), etc. Regex search is opt-in; install a native search tool and use regex=True because the basic fallback stays literal-only.
</details>
<details> <summary><strong>Fuzzy Function Search</strong></summary>
Find authentication-related functions with fuzzy search for 'authUser' Matches: authenticateUser, authUserToken, userAuthCheck, etc.
</details>
<details> <summary><strong>Language-Specific Search</strong></summary>
Search for "API_ENDPOINT" only in Python files Uses: search_code_advanced with literal matching and file_pattern: "*.py" (defaults to 10 matches; use max_results to expand or start_index to page)
</details>
<details> <summary><strong>Auto-refresh Configuration</strong></summary>
Configure automatic index updates when files change Uses: configure_file_watcher to enable/disable monitoring and set debounce timing
</details>
<details> <summary><strong>Project Maintenance</strong></summary>
I added new components, please refresh the project index Uses: refresh_index to update the searchable cache
</details>
If you are using Anthropic's Codex CLI, add the server to ~/.codex/config.toml. On Windows the file lives at C:\Users\<you>\.codex\config.toml:
[mcp_servers.code-index]
type = "stdio"
command = "uvx"
args = ["code-index-mcp"] > You can append --project-path C:/absolute/path/to/repo to the args list to set the project > automatically on startup (same effect as running the set_project_path tool).
On Windows, uvx needs the standard profile directories to be present. Keep the environment override in the same block so the MCP starts reliably:
env = {
HOME = "C:\\Users\\<you>",
APPDATA = "C:\\Users\\<you>\\AppData\\Roaming",
LOCALAPPDATA = "C:\\Users\\<you>\\AppData\\Local",
SystemRoot = "C:\\Windows"
}
Linux and macOS already expose the required XDG paths and HOME, so you can usually omit the env table there. Add overrides only if you run the CLI inside a restricted container.
The default FSEvents observer works well for most projects. If you experience issues, you can switch to an alternative observer via configure_file_watcher:
"auto" (default): Platform default (FSEvents on macOS)"kqueue": Kqueue observer (macOS/BSD)"fsevents": Force FSEvents (macOS only)"polling": Cross-platform polling fallbackNote: Kqueue opens one file descriptor per watched file. For large projects using kqueue, you may need to increase the limit: ulimit -n 10240
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,code-index-mcp — Claude MCP 必备工具中文教程 在MCP工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | code-index-mcp |
| 原始描述 | A Model Context Protocol (MCP) server that helps large language models index, search, and analyze code repositories with minimal setup |
| Topics | mcp |
| GitHub | https://github.com/johnhuang316/code-index-mcp |
| License | MIT |
| 语言 | Python |
收录时间:2026-05-22 · 更新时间:2026-05-22 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端