
An MCP Server for Code Understanding for AI-assisted development
概览
An MCP (Model Context Protocol) server designed to understand codebases and provide intelligent context to AI coding assistants. This server handles local directories, GitHub repositories, and Azure DevOps repositories, supporting standard MCP-compliant operations. - Clone and analyze GitHub repositories, Azure DevOps repositories, or local codebases - Get repository structure and file organization - Identify critical files based on complexity metrics and code structure - Generate detailed repository maps showing: - Function signatures and relationships - Class definitions and hierarchies - Code structure and dependencies - Retrieve and analyze repository documentation - Target analysis to specific files or directories - Keep analysis up-to-date with repository changes via refresh - : Intelligent repository synchronization that: - Automatically refreshes active repositories every 24 hours - Refreshes inactive repositories every 7 days - Adapts to repository activity patterns -...
README
以下为原文 README 节选,完整内容请查看原文。
Code Expert MCP Server
An MCP (Model Context Protocol) server designed to understand codebases and provide intelligent context to AI coding assistants. This server handles local directories, GitHub repositories, and Azure DevOps repositories, supporting standard MCP-compliant operations.
Features
- Clone and analyze GitHub repositories, Azure DevOps repositories, or local codebases
- Get repository structure and file organization
- Identify critical files based on complexity metrics and code structure
- Generate detailed repository maps showing:
- Function signatures and relationships
- Class definitions and hierarchies
- Code structure and dependencies
- Retrieve and analyze repository documentation
- Target analysis to specific files or directories
- Keep analysis up-to-date with repository changes via refresh
- Auto-refresh system: Intelligent repository synchronization that:
- Automatically refreshes active repositories every 24 hours
- Refreshes inactive repositories every 7 days
- Adapts to repository activity patterns
- Provides error handling and recovery mechanisms
- Offers configurable scheduling and resource management
Quick Start: MCP Client Configuration
Prerequisites
Required: uv Installation
This server requires uv, a modern Python package manager. If you don’t already have uv installed:
# Install UV (macOS/Linux)
curl -sSf https://astral.sh/uv/install.sh | sh
# Install UV (Windows PowerShell)
ipow https://astral.sh/uv/install.ps1 | iex
For more installation options, visit the official uv installation guide at astral.sh/uv.
Installation Methods
Method 1: Tool Installation (Recommended)
For the most reliable isolated installation:
# Install the MCP server as a tool
uv tool install code-expert-mcp
Method 2: Direct Execution with uvx (Fallback)
⚠️ Warning: This method may encounter dependency conflicts with other Python packages on your system. Use Method 1 if you experience any issues.
# Run directly without installation
uvx code-expert-mcp
Verify Installation
After installation, verify the binary location:
# For Method 1 (tool installation)
which code-expert-mcp
# Expected output example: /Users/username/.local/bin/code-expert-mcp
# For Method 2 (uvx) - no persistent binary
# The tool runs directly through uvx
Configure Your MCP Client
Use the verified binary path in your MCP client configuration:
{
"mcpServers": {
"code-expert": {
"command": "/path/to/code-expert-mcp",
"args": []
}
}
}
Replace /path/to/code-expert-mcp with the actual path from the verification step above.
For uvx method (less reliable):
{
"mcpServers": {
"code-expert": {
"command": "uvx",
"args": [
"code-expert-mcp-server"
]
}
}
}
Common Use Cases
Reference Repository Analysis
安装
uvx code-expert-mcp-server配置
{
"mcpServers": {
"code-expert": {
"command": "/path/to/code-expert-mcp",
"args": []
}
}
}