Skip to main content
Glama
ibuildrun

clangd-mcp

by ibuildrun

clangd-mcp

MCP server for C/C++ code analysis using clangd and clang tools. Provides diagnostics, symbol search, include analysis, function listing, and code formatting.

Features

  • check_file — run clangd diagnostics on a C/C++ file (errors, warnings)

  • find_symbol — search for symbol definitions across source files (regex)

  • get_includes — list and analyze #include directives

  • list_functions — extract function/method declarations from a file

  • clang_format — format code using clang-format (dry-run or in-place)

Falls back to compiler syntax checking (clang++, g++, MSVC) if clangd is not available.

Related MCP server: C++ MCP Server

Requirements

  • Python 3.10+

  • Optional: clangd, clang-format, ctags (for full functionality)

  • Works with fallback even without clang tools installed

Installation

pip install clangd-mcp

Or from source:

git clone https://github.com/ibuildrun/clangd-mcp.git
cd clangd-mcp
pip install -e .

MCP Configuration

Add to your .kiro/settings/mcp.json:

{
  "mcpServers": {
    "clangd": {
      "command": "clangd-mcp",
      "disabled": false
    }
  }
}

Or with uvx:

{
  "mcpServers": {
    "clangd": {
      "command": "uvx",
      "args": ["clangd-mcp"],
      "disabled": false
    }
  }
}

Usage Examples

> check_file "src/game/client/components/menus.cpp" "build"
> find_symbol "RenderBackground" "src"
> get_includes "src/game/client/ui.h"
> list_functions "src/game/client/components/menus.cpp"
> clang_format "src/game/client/ui.cpp" "file" true

License

MIT

Install Server
A
license - permissive license
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • MCP server for Klever blockchain smart contract development.

  • Augments MCP Server - A comprehensive framework documentation provider for Claude Code

  • A MCP server built for developers enabling Git based project management with project and personal…

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ibuildrun/clangd-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server