loading…
Search for a command to run...
loading…
An open-source AI-powered development assistant that connects Claude Desktop to your codebase via MCP, enabling semantic code search, AI-assisted editing, and p
An open-source AI-powered development assistant that connects Claude Desktop to your codebase via MCP, enabling semantic code search, AI-assisted editing, and persistent memory without additional subscriptions.
Transform your AI coding workflow with powerful codebase management through Model Context Protocol (MCP)
A comprehensive Model Context Protocol (MCP) server that enables Claude AI, VS Code Copilot, and other MCP-compatible AI assistants to seamlessly interact with your codebase. Perform file operations, Git version control, command execution, and project analysis—all through natural language commands.
# Clone the repository
git clone https://github.com/yourusername/codebase-manager-mcp.git
cd codebase-manager-mcp
# Initialize UV project
uv init --name codebase-mcp-server
# Install dependencies
uv add "mcp[cli]" GitPython
# Test the server
uv run python server.py /path/to/your/project
# Clone the repository
git clone https://github.com/yourusername/codebase-manager-mcp.git
cd codebase-manager-mcp
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install "mcp[cli]" GitPython
# Test the server
python server.py /path/to/your/project
Create or edit your Claude Desktop configuration file:
📍 Configuration File Locations:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/claude/claude_desktop_config.json{
"mcpServers": {
"codebase-manager": {
"command": "python",
"args": ["/absolute/path/to/server.py", "/path/to/your/project"],
"env": {}
}
}
}
{
"mcpServers": {
"codebase-manager": {
"command": "uv",
"args": [
"run",
"--project", "/path/to/codebase-manager-mcp",
"python", "server.py",
"/path/to/your/project"
],
"env": {}
}
}
}
Create .vscode/mcp.json in your project:
{
"mcp": {
"servers": {
"codebase-manager": {
"command": "python",
"args": ["/path/to/server.py", "${workspaceFolder}"]
}
}
}
}
Once configured, interact with your codebase using natural language:
"List all Python files in the src directory"
"Read the contents of main.py"
"Create a new file called utils.py with helper functions"
"Search for files containing 'database' in their name"
"Show me the project structure"
"What's my current git status?"
"Show me the files I've modified"
"Commit all changes with message 'Add new feature'"
"Create a new branch called 'feature-auth'"
"Show me the last 5 commits"
"What's the diff for auth.py?"
"Run the test suite"
"Execute npm install"
"Check code style with flake8"
"Run black formatter on all Python files"
"Show me Python version"
"What dependencies does this project have?"
"Analyze the project structure"
"Show me project information"
"Find all TODO comments in the codebase"
| Tool | Description | Example Usage |
|---|---|---|
read_file |
Read file contents | "Read the README.md file" |
write_file |
Write to files | "Update config.py with new settings" |
list_directory |
Browse directories | "List all files in the src folder" |
search_files |
Find files by pattern | "Find all .js files containing 'api'" |
git_status |
Git repository status | "What's my git status?" |
git_commit |
Create commits | "Commit changes with message" |
git_branch_operations |
Branch management | "Create branch feature-x" |
execute_command |
Run commands | "Run pytest on the tests folder" |
codebase-manager-mcp/
├── server.py # Main MCP server
├── setup.py # Auto-configuration script
├── requirements.txt # Pip dependencies
├── README.md # This file
├── LICENSE # MIT License
Configure multiple projects simultaneously:
{
"mcpServers": {
"project-frontend": {
"command": "python",
"args": ["/path/to/server.py", "/path/to/frontend"],
"env": {}
},
"project-backend": {
"command": "python",
"args": ["/path/to/server.py", "/path/to/backend"],
"env": {}
}
}
}
{
"mcpServers": {
"codebase-manager": {
"command": "python",
"args": ["/path/to/server.py", "${PROJECT_DIR}"],
"env": {
"PROJECT_DIR": "/current/project/path",
"PYTHONPATH": "/custom/python/path"
}
}
}
}
Modify the ALLOWED_COMMANDS in server.py:
ALLOWED_COMMANDS = {
'python', 'python3', 'pip', 'pip3',
'node', 'npm', 'yarn', 'pnpm',
'pytest', 'black', 'flake8', 'mypy',
'docker', 'docker-compose',
'your-custom-command' # Add your commands here
}
# Install MCP SDK
pip install "mcp[cli]"
# or with UV
uv add "mcp[cli]"
# Install GitPython
pip install GitPython
# or with UV
uv add GitPython
python server.py /test/pathTest your server locally before connecting to Claude:
# Test with MCP inspector
mcp dev server.py /path/to/project
# Manual testing
python server.py /path/to/project --debug
We welcome contributions! Here's how to get started:
git checkout -b feature-namepytest tests/git commit -m 'Add feature'git push origin feature-name# Clone your fork
git clone https://github.com/danyQe/codebase-mcp.git
cd codebase-mcp
# Install development dependencies
uv add --dev pytest black flake8 mypy
# Run tests
uv run pytest
# Format code
uv run black .
# Type checking
uv run mypy server.py
This project is licensed under the MIT License - see the LICENSE file for details.
mcp model-context-protocol claude-ai ai-development codebase-management git-integration python automation developer-tools ai-assistant vs-code file-management code-analysis ai-coding productivity
⭐ Star this repository if it helped you!
Built with ❤️ for the AI development community
Выполни в терминале:
claude mcp add codebase-mcp -- npx Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development