Skip to main content

🔮 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 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.

Metadata

Release files for mcp-codebase-oracle 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-codebase-oracle 0.1.1
File Size Uploaded Provenance
mcp_codebase_oracle-0.1.1.tar.gz 128.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-codebase-oracle 0.1.1
File Interpreter ABI Platform
mcp_codebase_oracle-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 132.3 kB

Release files / mcp_codebase_oracle-0.1.1.tar.gz

Download URL mcp_codebase_oracle-0.1.1.tar.gz
Size 128.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b2efb3b1de10deb42e61891d62f6ac85d7a9b79b27d2388fb4d777ea46f51a78
BLAKE2b-256 checksum
How to use checksums
b66679ffcf31e23dbd8a8a4e23bea2bf613f404cf475ea34dde1761c6f1c086e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / mcp_codebase_oracle-0.1.1-py3-none-any.whl

Download URL mcp_codebase_oracle-0.1.1-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
38c7d09d7f5484cba43b08643c72ac9208aafdbba92175e144c1495974f1002e
BLAKE2b-256 checksum
How to use checksums
69a32d8eca807be256d038daacd044db51d40079533715d34ebcebe529b9bb62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Security for mcp-codebase-oracle 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page