Skip to main content

🔮 MCP sunucusu — Herhangi bir codebase'i analiz et, mimariyi çıkar, etki analizi yap

Project description

🔮 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/mcp-codebase-oracle/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 indeksleme
  • rescan_project — Incremental güncelleme
  • get_project_summary — Proje özeti

Sorgulama

  • find_symbol — Fonksiyon/sınıf/değişken arama
  • get_symbol_detail — Sembol detayları
  • search_code — Kod içi arama
  • get_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şisi
  • find_circular_dependencies — Döngüsel bağımlılık tespiti

Etki Analizi

  • analyze_impact — Değişiklik etki analizi
  • what_if_delete — Silme senaryosu
  • what_if_rename — Yeniden adlandırma senaryosu
  • find_dead_code — Kullanılmayan kod tespiti

Mimari

  • detect_architecture — Mimari pattern tespiti
  • get_module_coupling — Modül bağlılık metrikleri
  • detect_code_smells — Kod kokusu tespiti

Açıklama & Görselleştirme

  • explain_file — Dosya açıklama
  • explain_function — Fonksiyon açıklama
  • generate_onboarding_guide — Onboarding rehberi
  • generate_architecture_diagram — Mimari diyagram
  • generate_dependency_matrix — Bağımlılık matrisi
  • generate_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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_codebase_oracle-0.1.0.tar.gz (39.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_codebase_oracle-0.1.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file mcp_codebase_oracle-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_codebase_oracle-0.1.0.tar.gz
  • Upload date:
  • Size: 39.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for mcp_codebase_oracle-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a23bb69db4628ecb4c2fc1a9917d4deef5e49b6a5416169c6d27467e413b652c
MD5 d529ff25f1d48709af2ab8aac5fc37aa
BLAKE2b-256 52308dac2009b7318972b12aa72f4326c9af563654b990111ea2214ca713d6c7

See more details on using hashes here.

File details

Details for the file mcp_codebase_oracle-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_codebase_oracle-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d367fa4cf8449daee1b6b344ce47e7c84306d2fc7e1fb8459924795c904ddb4
MD5 1dd48efa08ea3245b750753dad4389c9
BLAKE2b-256 0ae63132eae1b0823c4d1bc71077b2a166318d100f29a787941691cdfa1970b5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page