Skip to main content
Glama
PasNavigator MCP

PasNavigator MCP

by dmchet

PasNavigator MCP

MCP server for semantic navigation in Delphi/Pascal codebases.

The long-term design is:

  • Delphi-based indexer/backend that reuses ideas and code from CodeComparer

  • thin MCP server layer that exposes project indexing and symbol navigation tools

  • compact symbol-level responses for AI agents instead of raw grep output

Current status

This repository contains:

  • Python MCP tool surface and process adapter

  • Delphi console backend with vendored CodeComparer/DelphiAST sources under delphi/vendor/codecomparer/

  • no runtime dependency on a live CodeComparer repository checkout

DevExpress VCL is still required to compile the Delphi indexer (DXVCL).

The vendored importer carries a few local changes so that defines and unit_scopes reach the parser; they are listed in delphi/vendor/codecomparer/NOTICE.txt.

Docs:

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

  • Delphi build: delphi/README.md

Related MCP server: Delphi Compiler MCP

Tools

  • open_project, open_project_from_config

  • project_status

  • find_symbol — ranked, capped, reports total_count

  • get_symbol

  • get_hierarchy

  • get_descendants

  • get_source

Configuration

Example project configuration:

{
  "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/**"]
}

Development

Create a virtual environment and install the package in editable mode:

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

Run the server with the in-memory stub:

python -m pasnavigator_mcp

Talk to the Delphi console backend (stub build, no DevExpress):

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

Run the tests. Cases that need the compiled backend skip themselves when PasNavigatorBackend.exe is missing; the rest run against a Python fake process:

python -m unittest discover -s tests

Next step

The MCP layer itself (server.py, config.py) has no test coverage, because the mcp dependency has not been installable in this environment.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    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
      D
      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.
      34 npm
      33
      GPL 3.0