
mpsm/mcp-cpp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
mpsm/mcp-cpp — это кандидат на сервер MCP, импортированный из https://github.com/mpsm/mcp-cpp.
Обзор
mpsm/mcp-cpp — это кандидат на сервер MCP, импортированный из https://github.com/mpsm/mcp-cpp.
Обзор (машинный перевод)
Сервер Model Context Protocol (MCP), предоставляющий возможности анализа кода на C++ через интеграцию с LSP с Clangd. Позволяет агентам искусственного интеллекта работать с кодовыми базами C++, используя семантическое понимание, аналогичное современным IDE.
Почему именно этот сервер MCP?
Современная разработка на C++ во многом опирается на продвинутые инструменты для навигации по сложным кодовым базам с помощью макросов препроцессора, экземпляров шаблонов и сложных иерархий наследования. Хотя люди используют IDE на базе IntelliSense для понимания этих сложностей, большинство ИИ-агентов полагаются на просмотр только по тексту.
Этот MCP-сервер преодолевает этот разрыв, предоставляя агентам ИИ возможности семантического анализа, аналогичные тем, что используют разработчики в современных IDE. В отличие от стандартных реализаций LSP MCP, этот сервер специализируется именно на рабочих процессах на C++.
Сервер может одновременно обрабатывать несколько проектов на C++, что особенно полезно для сложных сценариев, таких как разработка встроенных Linux, где важно понимать взаимодействие между отдельными компонентами. Он поддерживает как CMake, так и Meson с автоматическим обнаружением и переключением каталогов сборок.
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
C++ MCP Server
A Model Context Protocol (MCP) server that provides C++ code analysis capabilities through clangd LSP integration. Enables AI agents to work with C++ codebases using semantic understanding similar to modern IDEs.
Why This MCP Server?
Modern C++ development relies heavily on advanced tooling to navigate complex codebases with preprocessor macros, template instantiations, and intricate inheritance hierarchies. While humans use IntelliSense-powered IDEs to understand these complexities, most AI agents rely on text-only browsing.
This MCP server bridges that gap by providing AI agents with semantic analysis capabilities similar to what developers experience in modern IDEs. Unlike generic LSP MCP implementations, this server focuses specifically on C++ workflows.
The server can handle multiple C++ projects simultaneously, which is particularly useful for complex scenarios like embedded Linux development where understanding interactions between individual components is crucial. It supports both CMake and Meson build systems with automatic build directory detection and switching.
Advanced indexing monitoring tracks both clangd’s index state and logs to ensure complete symbol coverage, while intelligent filtering distinguishes between project code and external dependencies.
Features
The server provides three core analysis tools for C++ development. The get_project_details tool performs dynamic CMake and Meson build environment discovery and enables configuration switching. For symbol exploration, search_symbols offers C++ symbol search with project boundary detection and intelligent filtering. When deeper analysis is needed, analyze_symbol_context provides symbol analysis with inheritance and call hierarchy support.
The implementation works with both CMake and Meson projects, handling projects with multiple libraries and executables simultaneously. Advanced indexing monitors clangd’s index state and logs to ensure complete symbol coverage, while intelligent filtering distinguishes between project code and external dependencies. The server automatically discovers and switches between build configurations, and includes a Python CLI tool for quick symbol exploration.
Component Discovery
Установка
docker run -i --rm -v /path/to/cpp-project:/workspace mcp-cpp-server --root /workspaceКонфигурация
{
"mcpServers": {
"cpp-tools": {
"command": "mcp-cpp-server",
"env": {
"CLANGD_PATH": "/usr/bin/clangd-20"
}
}
}
}