clangd-mcp-server
Verified Safeby felipeerias
Overview
Model Context Protocol server that bridges Claude Code with clangd LSP for enhanced C++ code intelligence and navigation in large codebases.
Installation
clangd-mcp-serverEnvironment Variables
- PROJECT_ROOT
- COMPILE_COMMANDS_DIR
- CLANGD_PATH
- CLANGD_ARGS
- LOG_LEVEL
- CLANGD_LOG_LEVEL
Security Notes
The server operates via standard I/O (stdio) for communication with the MCP client, limiting direct external network exposure. It spawns a local 'clangd' subprocess. Argument parsing for 'CLANGD_ARGS' (from environment variables) uses a custom 'parseShellArgs' function which, if not perfectly robust, could potentially lead to unexpected clangd behavior if malicious input is provided, though it passes arguments as an array to 'spawn' which mitigates shell injection. No 'eval' or obvious hardcoded secrets are found. File content is read from the local file system (via `fs/promises.readFile`) and passed to `clangd`.
Similar Servers
mcp-language-server
Serves as an MCP (Model Context Protocol) gateway, enabling LLMs to interact with Language Servers (LSPs) for codebase navigation, semantic analysis, and code editing operations.
cclsp
Integrate LLM-based coding agents with Language Server Protocol (LSP) servers to enable robust code navigation, symbol resolution, and refactoring across various programming languages.
Delphi-MCP-Server
Implements the Model Context Protocol (MCP) in Delphi to enable AI-powered development workflows and integrate with clients like Claude Code.
consult-llm-mcp
An MCP server that allows AI agents like Claude Code to consult stronger, more capable AI models (e.g., GPT-5.2, Gemini 3.0 Pro) for complex code analysis, debugging, and architectural advice.