MM

mpsm/mcp-cpp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

114 stars 30 forks 品質 75 トレンド 16MIT

mpsm/mcp-CPPは、https://github.com/mpsm/mcp-cpp.からインポートされたMCPサーバー候補です。

概要

mpsm/mcp-CPPは、https://github.com/mpsm/mcp-cpp.からインポートされたMCPサーバー候補です。

概要(AI 翻訳)

clangd LSP統合を通じてC++コード解析機能を提供するモデルコンテキストプロトコル(MCP)サーバーです。AIエージェントが現代のIDEに似た意味理解を用いてC++コードベースで作業できるようにします。

なぜこのMCPサーバーなのか?

現代のC++開発は、プリプロセッサマクロ、テンプレートインスタンス化、複雑な継承階層を含む複雑なコードベースをナビゲートするために高度なツールに大きく依存しています。人間はこれらの複雑さを理解するためにIntelliSense搭載IDEを使っていますが、ほとんどのAIエージェントはテキストのみのブラウジングに依存しています。

このMCPサーバーは、現代のIDEで開発者が経験するようなセマンティック解析機能を提供することで、そのギャップを埋めています。一般的なLSP MCP実装とは異なり、このサーバーは特にC++ワークフローに特化しています。

サーバーは複数のC++プロジェクトを同時に処理でき、個々のコンポーネント間の相互作用を理解することが重要な組み込みLinux開発のような複雑なシナリオで特に有用です。CMakeとMesonの両方のビルドシステムをサポートし、自動ビルドディレクトリ検出とスイッチングが可能です。

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

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

GitHub で README 全文を見る

インストール

docker run -i --rm -v /path/to/cpp-project:/workspace mcp-cpp-server --root /workspace
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "cpp-tools": { "command": "mcp-cpp-server", "env": { "CLANGD_PATH": "/usr/bin/clangd-20" } } } }