mcp-codebase-oracle
Analyzes software projects to extract architecture, build dependency graphs, and predict the impact of code changes.
README
🔮 MCP Codebase Oracle
"Bu kodu kim yazdı, ne yapıyor anlamıyorum" sorusunu tarihe gömüyoruz.
MCP Codebase Oracle, herhangi bir yazılım projesini analiz eden, mimari yapıyı çıkaran ve kod değişikliklerinin etkisini önceden gösteren bir Model Context Protocol (MCP) sunucusudur.
✨ Özellikler
| Özellik | Açıklama |
|---|---|
| 🏗️ Mimari Tespit | MVC, Layered, Hexagonal, Clean Architecture ve diğer pattern'leri otomatik tespit |
| 🕸️ Bağımlılık Grafı | Modüller, sınıflar ve fonksiyonlar arası ilişki haritası |
| 💥 Etki Analizi | "Bu kodu değiştirirsem ne bozulur?" sorusuna kesin cevap |
| 📊 Karmaşıklık Metrikleri | Cyclomatic, cognitive complexity ve maintainability index |
| 🔍 Sembol Arama | Fonksiyon, sınıf, değişken arama ve detay görüntüleme |
| 📖 Kod Açıklama | Dosya ve fonksiyon bazlı insan tarafından anlaşılır açıklamalar |
| 🎯 Dead Code Tespiti | Kullanılmayan kod parçalarını bulma |
| 🌊 Görselleştirme | Mermaid diyagramları ile grafik çıktılar |
🚀 Kurulum
uv ile (önerilen)
# Projeyi klonla
git clone https://github.com/iamseyhmus7/mcp-codebase-oracle.git
cd mcp-codebase-oracle
# Bağımlılıkları kur
uv sync
# Çalıştır
uv run mcp-codebase-oracle
pip ile
pip install mcp-codebase-oracle
Docker ile
docker build -t mcp-codebase-oracle .
docker run -v /path/to/project:/project:ro mcp-codebase-oracle
⚡ MCP İstemci Konfigürasyonu
Claude Desktop
claude_desktop_config.json dosyasına ekle:
{
"mcpServers": {
"codebase-oracle": {
"command": "uv",
"args": [
"--directory", "/path/to/mcp-codebase-oracle",
"run", "mcp-codebase-oracle"
]
}
}
}
VS Code (Copilot / Continue)
{
"mcp.servers": {
"codebase-oracle": {
"command": "mcp-codebase-oracle",
"args": []
}
}
}
🔧 Kullanılabilir Tool'lar
Tarama & İndeksleme
scan_project— Proje tarama ve indekslemerescan_project— Incremental güncellemeget_project_summary— Proje özeti
Sorgulama
find_symbol— Fonksiyon/sınıf/değişken aramaget_symbol_detail— Sembol detaylarısearch_code— Kod içi aramaget_file_overview— Dosya yapı özeti
Graf Analizi
get_dependency_graph— Bağımlılık grafıget_call_graph— Fonksiyon çağrı grafıget_class_hierarchy— Sınıf hiyerarşisifind_circular_dependencies— Döngüsel bağımlılık tespiti
Etki Analizi
analyze_impact— Değişiklik etki analiziwhat_if_delete— Silme senaryosuwhat_if_rename— Yeniden adlandırma senaryosufind_dead_code— Kullanılmayan kod tespiti
Mimari
detect_architecture— Mimari pattern tespitiget_module_coupling— Modül bağlılık metrikleridetect_code_smells— Kod kokusu tespiti
Açıklama & Görselleştirme
explain_file— Dosya açıklamaexplain_function— Fonksiyon açıklamagenerate_onboarding_guide— Onboarding rehberigenerate_architecture_diagram— Mimari diyagramgenerate_dependency_matrix— Bağımlılık matrisigenerate_hotspot_map— Hotspot haritası
🗣️ Desteklenen Diller
| Dil | Parser | Durum |
|---|---|---|
| Python | ast (native) |
✅ Tam destek |
| JavaScript/TypeScript | tree-sitter | 🔜 Yakında |
| Java | tree-sitter | 🔜 Yakında |
| Go | tree-sitter | 🔜 Yakında |
| Rust | tree-sitter | 🔜 Yakında |
| C# | tree-sitter | 🔜 Yakında |
| Diğerleri | regex (generic) | ⚡ Temel destek |
🛠️ Geliştirme
# Dev bağımlılıklarını kur
uv sync --extra dev
# Testleri çalıştır
uv run pytest -v
# Linting
uv run ruff check src/ tests/
# Type checking
uv run mypy src/
# MCP Inspector ile test
uv run mcp dev src/mcp_codebase_oracle/server.py
📄 Lisans
MIT License — Detaylar için LICENSE dosyasına bakın.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.