Skip to main content
Glama
cpp-analyzer

cpp-analyzer

by kybird

C++ MCP Server (fastMCP)

A Model Context Protocol (MCP) server for analyzing C++ codebases using libclang and fastMCP.

Features

  • Semantic C++ Analysis: Understands classes, functions, inheritance, and call graphs

  • Dual Mode Support: STDIO (Claude Desktop) and HTTP (Web UI) modes

  • 15+ Analysis Tools: Search, analyze, and explore C++ codebases efficiently

  • Real-time Indexing: Background analysis with file watching

Related MCP server: fw-context-mcp

Quick Start

  1. Setup:

    git clone https://github.com/doogypoo1977/cpp_Analyzer_mcp.git
    cd cpp_Analyzer_mcp
    server_setup.bat  # Windows
  2. Run Server:

    # STDIO mode (Claude Desktop)
    run_fastmcp.bat
    
    # HTTP mode (Web UI)
    run_fastmcp_http.bat
  3. Configure Claude Desktop:

    {
      "mcpServers": {
        "cpp-analyzer": {
          "command": "python",
          "args": ["-m", "mcp_server.main_fastmcp"],
          "cwd": "YOUR_PATH_HERE",
          "env": {"PYTHONPATH": "YOUR_PATH_HERE"}
        }
      }
    }

Available Tools

  • get_indexing_status - Check analysis status

  • search_classes - Find classes by pattern

  • search_functions - Find functions by pattern

  • get_callers - Who calls this function

  • get_callees - What this function calls

  • get_class_info - Detailed class analysis

  • analyze_class - Comprehensive class report

  • find_in_file - Symbols within specific files

  • get_call_tree - Multi-level call relationships

  • search_symbols - Universal symbol search

  • get_project_stats - Project overview

  • And more...

Requirements

  • Python 3.9+

  • libclang (included in requirements.txt)

  • MSVC compiler (Windows)

HTTP Mode

When running in HTTP mode:

run_fastmcp_http.bat

Check console output for available endpoints.

License

All rights reserved. See LICENSE file for details.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables fast semantic code search and analysis across 15+ programming languages. Supports searching for functions and classes, tracing code usage, detecting syntax errors, and analyzing code quality and structure.
      34 npm
      33
      GPL 3.0
    • A
      license
      A
      quality
      A
      maintenance
      Exposes tools for AI assistants to query a persistent SQLite+FTS5 index of C/C++ symbols parsed from real build commands, enabling sub-millisecond lookup, full-text search, and natural-language explanation without hallucination.
      37
      509 PyPI
      10
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Provides C++ code intelligence tools for AI agents via the Model Context Protocol, enabling symbol navigation, type information, and diagnostics.
      9
      50
      Mozilla Public 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Bridges AI assistants to clangd for C/C++ code intelligence, providing tools for symbol search, definitions, references, type info, and more.
      2
      MIT