cpp_list_filesLABSCO SUMMARY
Stops the agent grepping for a function it has been editing all afternoon.
The pitch in the README is a familiar frustration: after a context compaction the model goes back to searching text for a symbol it already knew. Call hierarchies and reference lists give it a real answer instead. One thing to weigh first — the author's own note says Claude Code now has built-in language-server support, so this earns its place mainly in other agent harnesses.
What it is
A code-intelligence server for a C/C++ project. It pairs clangd for accurate lookups with Tree-sitter parsing so structural queries still answer when the build is broken, and it points the agent at your project through a compile_commands.json you generate once.
What you get
- cpp_list_files and cpp_search_symbols find where things live in the codebase
- cpp_definition, cpp_references and cpp_hover jump to a definition, list every use, and read type information at a position
- cpp_incoming_calls and cpp_outgoing_calls trace who calls a function and what it calls in turn
- cpp_prepare_type_hierarchy, cpp_supertypes and cpp_subtypes walk an inheritance chain
- cpp_list_functions, cpp_list_classes, cpp_get_outline and cpp_extract_signatures answer structural questions from the parse tree, which keeps working through compilation errors
- With --ai-enabled, lookups can be summarised by Google Gemini; --ai-cost-limit caps the monthly spend and --ai-cache-days keeps summaries warm
Requirements
Python 3.10 or newer, clangd 16 or newer, and a compile_commands.json in the project root — generated with compiledb, bear, or CMake's CMAKE_EXPORT_COMPILE_COMMANDS. The server is version 0.2.0 and takes --project PATH as its one required flag. AI summaries are optional and need a Google AI key in CLANGAROO_AI_API_KEY.
Setup effort
Build from source — git clone https://github.com/jasondk/clangaroo
USE CASES
Finding where a class actually comes from
One lookup returns the definition instead of a grep across headers.
Judging the blast radius of a change
References plus incoming calls show everything that would have to move with it.
Understanding an inheritance chain
Supertypes and subtypes read the hierarchy both ways rather than reconstructing it from headers.
Getting oriented in a file that will not compile
The Tree-sitter path still lists functions, classes and signatures while the build is red.
14 tools
Listed in project docs. Your client may show a different list.
cpp_search_symbolscpp_definitioncpp_referencescpp_hovercpp_incoming_callscpp_outgoing_callscpp_prepare_type_hierarchycpp_supertypescpp_subtypescpp_list_functionscpp_list_classescpp_get_outlinecpp_extract_signaturesBEFORE YOU INSTALL
What to know first
Tools you get
14 tools named in the project's documentation.
Requires
- Python 3.10+
- clangd 16+ (brew install llvm or apt install clangd)
- A C++ project with compile_commands.json in its root (generated with compiledb, bear, or CMake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON)
INSTALLATION
Connect your client
You clone this one yourself.
Server setup
git clone https://github.com/jasondk/clangaroo
cd clangaroo
pip install -e .MCP Clients
Claude Desktop
{
"mcpServers": {
"clangaroo": {
"command": "/usr/local/bin/clangaroo",
"args": [
"--project",
"<YOUR_PATH_TO_CPP_PROJECT>",
"--warmup",
"--warmup-limit",
"10",
"--log-level",
"info",
"--ai-enabled",
"--ai-provider",
"gemini-2.5-flash",
"--ai-cache-days",
"14",
"--ai-cost-limit",
"15.0",
"--call-hierarchy-depth",
"10",
"--ai-analysis-level",
"summary",
"--ai-context-level",
"minimal"
],
"env": {
"CLANGAROO_AI_API_KEY": "<YOUR_CLANGAROO_AI_API_KEY>"
}
}
}
}--ai-enabled turns on Google Gemini summaries, which incur a small cost on your Gemini API key: put your key in CLANGAROO_AI_API_KEY, or leave out all the --ai options and the env block to run without AI. The command is where clangaroo is installed on your system (/usr/local/bin/clangaroo in the example), and <YOUR_PATH_TO_CPP_PROJECT> is your C++ project.
Claude Code
claude mcp add-from-claude-desktop
# (make sure `clangaroo` is checked)