Skip to main content
Glama
PasNavigator MCP

PasNavigator MCP

by dmchet

PasNavigator MCP

MCP-Server für die semantische Navigation in Delphi/Pascal-Codebasen.

Das langfristige Design ist:

  • Delphi-basierter Indexer/Backend, der Ideen und Code aus CodeComparer wiederverwendet

  • dünne MCP-Server-Schicht, die Projekt-Indexierung und Symbol-Navigationswerkzeuge bereitstellt

  • kompakte Symbol-Antworten für KI-Agenten anstelle von rohem grep-Ausgabe

Aktueller Status

Dieses Repository enthält:

  • Python-MCP-Werkzeugoberfläche und Prozessadapter

  • Delphi-Konsolen-Backend mit eingebetteten CodeComparer/DelphiAST-Quellen unter delphi/vendor/codecomparer/

  • keine Laufzeitabhängigkeit von einem Live-CodeComparer-Repository-Checkout

DevExpress VCL ist weiterhin erforderlich, um den Delphi-Indexer zu kompilieren (DXVCL).

Der eingebettete Importer enthält einige lokale Änderungen, damit defines und unit_scopes den Parser erreichen; sie sind in delphi/vendor/codecomparer/NOTICE.txt aufgelistet.

Dokumentation:

  • Protokoll: docs/delphi-backend-protocol.md

  • Delphi-Build: delphi/README.md

Related MCP server: Delphi Compiler MCP

Werkzeuge

  • open_project, open_project_from_config

  • project_status

  • find_symbol — sortiert, begrenzt, meldet total_count

  • get_symbol

  • get_hierarchy

  • get_descendants

  • get_source

Konfiguration

Beispiel-Projektkonfiguration:

{
  "project_name": "MyApp",
  "roots": [
    "E:/Work/MyApp/Source",
    "E:/Work/MyApp/Modules"
  ],
  "search_paths": [
    "E:/Libs/Common",
    "C:/RAD/Studio/22.0/source/vcl"
  ],
  "defines": ["MSWINDOWS", "VER350"],
  "unit_scopes": ["System", "Vcl", "Winapi"],
  "excludes": ["**/__history/**", "**/backup/**"]
}

Entwicklung

Erstellen Sie eine virtuelle Umgebung und installieren Sie das Paket im bearbeitbaren Modus:

python -m venv .venv
.venv\Scripts\Activate.ps1
pip install -e .

Führen Sie den Server mit dem In-Memory-Stub aus:

python -m pasnavigator_mcp

Sprechen Sie mit dem Delphi-Konsolen-Backend (Stub-Build, ohne DevExpress):

$env:PASNAVIGATOR_BACKEND = "delphi"
$env:PASNAVIGATOR_DELPHI_EXE = "E:\Github_dm75\PasNavigator_MCP\delphi\bin\Win32\Debug\PasNavigatorBackend.exe"
python -m pasnavigator_mcp

Führen Sie die Tests aus. Fälle, die das kompilierte Backend benötigen, überspringen sich selbst, wenn PasNavigatorBackend.exe fehlt; der Rest läuft gegen einen Python-Fake-Prozess:

python -m unittest discover -s tests

Nächster Schritt

Die MCP-Schicht selbst (server.py, config.py) hat keine Testabdeckung, weil die mcp-Abhängigkeit in dieser Umgebung nicht installierbar war.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables semantic code search across projects using AI embeddings to find code by meaning rather than just text matching. Provides fast intelligent search, symbol analysis, and code similarity detection with multi-language support.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables semantic code search across multiple repositories using natural language queries. Provides intelligent code discovery, symbol lookups, and cross-repo dependency analysis for AI coding agents.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables fast semantic code search and analysis across 15+ programming languages. Supports searching for functions and classes, tracing code usage, detecting syntax errors, and analyzing code quality and structure.
    61 npm
    33
    GPL 3.0