PasNavigator MCP
PasNavigator MCP
用于在 Delphi/Pascal 代码库中进行语义导航的 MCP 服务器。
长期设计是:
基于 Delphi 的索引器/后端,复用
CodeComparer的思路和代码轻量 MCP 服务器层,暴露项目索引和符号导航工具
面向 AI 代理的紧凑符号级响应,而非原始 grep 输出
当前状态
本仓库包含:
Python MCP 工具面和进程适配器
Delphi 控制台后端,包含位于
delphi/vendor/codecomparer/下的内置 CodeComparer/DelphiAST 源码不依赖实时的 CodeComparer 仓库检出
编译 Delphi 索引器仍需要 DevExpress VCL(DXVCL)。
内置导入器带有少量本地修改,使 defines 和 unit_scopes 能够到达解析器;这些修改列在 delphi/vendor/codecomparer/NOTICE.txt 中。
文档:
协议:
docs/delphi-backend-protocol.mdDelphi 构建:
delphi/README.md
Related MCP server: Delphi Compiler MCP
工具
open_project,open_project_from_configproject_statusfind_symbol— 排序、封顶、报告total_countget_symbolget_hierarchyget_descendantsget_source
配置
示例项目配置:
{
"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/**"]
}开发
创建虚拟环境并以可编辑模式安装包:
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install -e .使用内存桩运行服务器:
python -m pasnavigator_mcp与 Delphi 控制台后端通信(桩构建,无 DevExpress):
$env:PASNAVIGATOR_BACKEND = "delphi"
$env:PASNAVIGATOR_DELPHI_EXE = "E:\Github_dm75\PasNavigator_MCP\delphi\bin\Win32\Debug\PasNavigatorBackend.exe"
python -m pasnavigator_mcp运行测试。需要编译后端的用例在缺少 PasNavigatorBackend.exe 时会自行跳过;其余用例针对 Python 假进程运行:
python -m unittest discover -s tests下一步
MCP 层本身(server.py、config.py)没有测试覆盖,因为 mcp 依赖在此环境中一直无法安装。
This server cannot be deployed
Maintenance
Related MCP Connectors
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Ask a codebase what calls what: search, blast radius, paths between symbols, and diffs.
Search indexed code, trace dependencies, assess change impact, and recall repository memory.
Ask who calls a route, what a change breaks or who reads a field, across a system's repos.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables 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
- AlicenseNot gradedqualityDmaintenanceEnables compilation of Delphi (RAD Studio) Object Pascal projects through natural language commands. Supports automatic Debug/Release builds for Win32 and Win64 platforms using the native Delphi compiler toolchain.13MIT
- AlicenseNot gradedqualityDmaintenanceEnables 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
- AlicenseNot gradedqualityCmaintenanceEnables 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 npm33GPL 3.0