Loading repository data…
Loading repository data…
danyQe / repository
Open-source AI development assistant via Model Context Protocol (MCP). Turn Claude or any LLM into your personal coding assistant. Privacy-first with local semantic search, AI-assisted editing, persistent memory, and quality-checked code generation. Built for Python & React. Free alternative to paid AI coding tools.
Privacy-first AI development assistant via MCP | Turn Claude into your personal coding assistant | Semantic code search • AI-assisted editing • Quality-checked generation • Persistent memory | Free open-source alternative to Cursor & paid AI coding tools | Python, React, TypeScript, FastAPI
Open Source**
Codebase MCP is an open-source AI-powered development assistant that connects Claude Desktop (or any MCP-compatible LLM) to your codebase through the Model Context Protocol. Stop paying for separate coding assistants - if you already have a Claude subscription, that's all you need.
📖 Read Full Documentation | 🏗️ Architecture | 🤝 Contributing
Modern AI coding assistants like Cursor, Windsurf, and others charge $20-40+/month on top of your existing LLM subscription. If you already pay for Claude, why pay again for a coding assistant?
Codebase MCP turns your existing Claude subscription into a powerful coding assistant:
1. Clone the repository:
git clone https://github.com/danyQe/codebase-mcp.git
cd codebase-mcp
2. Install globally (recommended):
# Install uv if you haven't
pip install uv
# Create virtual environment and install dependencies
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -r requirements.txt
# Install formatters globally (required for code formatting)
pip install black ruff
3. Configure Gemini API (for edit tool):
# Create .env file
cp .env.example .env
# Get free API key from: https://aistudio.google.com/app/apikey
# Add to .env:
GEMINI_API_KEY=your_api_key_here
4. Configure Claude Desktop:
Add to your claude_desktop_config.json:
{
"mcpServers": {
"codebase-manager": {
"command": "/path/to/your/.venv/bin/python",
"args": [
"/path/to/codebase-mcp/mcp_server.py"
]
}
}
}
5. Start the FastAPI server:
# In a separate terminal, navigate to your project directory
python main.py /path/to/your/project
# Server starts on http://localhost:6789
# You can access the web dashboard at: http://localhost:6789
6. Use with Claude Desktop:
.codebase directory.git - track AI changes independently┌─────────────────┐
│ Claude Desktop │ User interacts via chat
└────────┬────────┘
│ MCP Protocol (stdio)
↓
┌─────────────────┐
│ MCP Server │ 13+ Tools (proxy layer)
│ (mcp_server.py)│ Lightweight, fast
└────────┬────────┘
│ HTTP/REST
↓
┌─────────────────┐
│ FastAPI Server │ Port 6789 (main.py)
│ Core Engine │ 40+ API endpoints
└────────┬────────┘
│
┌────┴─────┬─────────┬──────────┐
↓ ↓ ↓ ↓
┌────────┐ ┌──────┐ ┌────────┐ ┌───────────┐
│Semantic│ │Memory│ │ Git │ │Code Tools │
│ Search │ │System│ │Manager │ │ Pipeline │
└────────┘ └──────┘ └────────┘ └───────────┘
│ │ │ │
└──────────┴─────────┴──────────┘
↓
┌──────────────────────┐
│ Local Storage │
│ • FAISS (vectors) │
│ • SQLite (metadata) │
│ • .codebase (git) │
└──────────────────────┘
Privacy Note: All processing is local except the edit tool, which uses Google's free Gemini API for AI-assisted code editing. Only the edited file is sent to Gemini - no project context or history.
Codebase MCP provides 13 specialized MCP tools for comprehensive development automation:
| Tool | Purpose | Key Features |
|---|---|---|
session_tool | Manage dev sessions | Create branches, auto-commit, merge |
memory_tool | Store/retrieve knowledge | Persistent context, semantic search |
git_tool | Git operations | Status, diff, log, commit, branches |
write_tool | Intelligent file creation | Auto-format, quality scoring, dependency check |
edit_file | AI-assisted editing | Gemini-powered, error recovery, format validation |
search_tool | Semantic code search | 4 modes: semantic, fuzzy, text, symbol |
read_code_tool | Smart code reading | Symbol-level, line ranges, whole file |
project_context_tool | Project analysis | Structure, dependencies, overview |
list_directory_tool | Directory exploration | Tree view, metadata, gitignore support |
code_analysis_tool | Code quality checks | Syntax, linting, imports, dependencies |
list_file_symbols_tool | Symbol extraction | Functions, classes, interfaces |
read_symbol_from_database | DB symbol lookup | Fast indexed retrieval |
project_structure_tool | Project visualization | Enhanced tree with stats |
Note: Edit tool can be slow due to Gemini API latency and code formatting. Claude Desktop may timeout on very large edits (use smaller, focused edits).
User: "Create a FastAPI endpoint for user authentication with JWT tokens"
Claude:
✅ Searching for existing auth patterns...
✅ Creating session: feat/user-auth
✅ Writing authentication.py with JWT implementation
✅ Auto-formatted with Black + Ruff
✅ Quality score: 95% - Auto-committed
✅ Storing solution in memory
User: "Refactor the user service to use dependency injection"
Claude:
✅ Reading current user service implementation
✅ Searching for DI patterns in codebase
✅ Editing with AI assistance (Gemini)
✅ Validating changes with quality gates
✅ Session: refactor/user-di ready for review
User: "Continue working on the payment integration"
Claude:
✅ Loading memory context...
✅ Found previous progress: Stripe API setup complete
✅ Found previous mistake: Don't use synchronous requests in async endpoints
✅ Continuing from last checkpoint...
edit_file tool uses Gemini.env with API keys.gitignore for sensitive filesWe welcome contributions! This project was built to be community-driven and extensible.
Priority Areas:
See CONTRIBUTING.md for detailed guidelines.
This project is licensed under the Apache License 2.0 - see LICENSE file for details.
Credits:
Current Version: v1.0.0-beta
Upcoming Features:
Special thanks to:
Made with ❤️ by developers, for developers
Stop paying for coding assistants. Start building with your own LLM.