Labsco
jasondk logo

Clangaroo

โ˜… 24

from jasondk

Provides fast C++ code intelligence for LLMs using the clangd language server.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredAdvanced setup

Clangaroo Banner

๐Ÿฆ˜ Clangaroo: Fast C++ code intelligence for LLMs via MCP

โœจ About

NOTE (January 2026): Claude Code now has built-in support for LSPs, making this unnecessary. Since it may still be useful in other agentic harnesses I'll leave the project here for now.

Clangaroo enables Claude Code, Gemini CLI, and other coding agents to jump around your C++ codebase with ease. Clangaroo provides fast, direct lookup of C/C++ symbols, functions, definitions, call hierarchies, type hierarchies, and more by your bestest LLM pals.

Clangaroo combines the speed of Tree-sitter parsing with the accuracy of clangd LSP, optionally enhanced by Google Gemini Flash AI for deeper insights. Let your AI buddies spend more time coding and less time stumbling around.

But WHY did you make this? I โค๏ธ using Claude Code, but every time it auto-compacts and then starts grepping around for the function we've been working on for forever, I die a little bit inside. But aren't there already a few MCPs that do this - why do we need another? I spent some time searching and found both MCP-language-server and Serena, which both look perfectly nice! Unfortunately, neither worked for me ๐Ÿ˜ญ

Clangaroo is meant to be super simple and is intended to 'just work'.

๐Ÿ“š Table of Contents

๐ŸŽฏ Features

  • โšก Ultra-Fast Navigation: Fast response times for code structure queries
  • ๐Ÿ” Smart Symbol Search: Hybrid Tree-sitter + clangd search with automatic fallback
  • ๐Ÿ“Š Deep Code Analysis: Call hierarchies, type hierarchies, and reference tracking
  • ๐Ÿค– AI-Powered Insights: Documentation summarization, pattern detection, and architectural analysis
  • ๐Ÿ’ช Robust: Works even with compilation errors thanks to Tree-sitter fallback
  • ๐Ÿš€ Zero Configuration: Just point to a project with compile_commands.json

๐Ÿ› ๏ธ Available Tools

Tool CategoryToolsDescription
๐Ÿ” Discoverycpp_list_files
cpp_search_symbols
Find files and symbols in your codebase
๐Ÿ“ Navigationcpp_definition
cpp_references
cpp_hover
Jump to definitions, find references, get type info
๐Ÿ“ž Call Analysiscpp_incoming_calls
cpp_outgoing_calls
Trace function relationships
๐Ÿ—๏ธ Type Hierarchycpp_prepare_type_hierarchy
cpp_supertypes
cpp_subtypes
Analyze inheritance
โšก Structurecpp_list_functions
cpp_list_classes
cpp_get_outline
cpp_extract_signatures
Fast structural analysis

๐Ÿค– AI Features (Optional)

Setup

  1. Get your API key from Google AI Studio
  2. Add to your environment (bash):
    export CLANGAROO_AI_API_KEY="your-api-key"

What You Get

  • ๐Ÿ“š Smart Documentation: Complex C++ docs explained clearly
  • ๐Ÿ” Pattern Analysis: Understand why and how functions are called
  • ๐Ÿ›๏ธ Architecture Insights: Identify design patterns automatically
  • ๐Ÿ’ก Refactoring Tips: Get improvement recommendations
  • ๐Ÿ’ฐ Cost Effective: $3-7/month typical usage with smart caching

๐Ÿ“„ License

MIT License - see the file for details.

๐Ÿ™ Acknowledgments