# C++ Core Guidelines

Enforce consistent C++ style and best practices across your codebase. Analyze naming, memory safety, and const correctness, and get actionable modernization suggestions up to C++23. Accelerate review…

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add SongJiangzhou/cpp_guidelines

# Browse available tools
npx -y @smithery/cli@latest tool list SongJiangzhou/cpp_guidelines

# Get full schema for a tool
npx -y @smithery/cli@latest tool get SongJiangzhou/cpp_guidelines check_naming

# Call a tool
npx -y @smithery/cli@latest tool call SongJiangzhou/cpp_guidelines check_naming '{}'
```

## Direct MCP Connection

Endpoint: `https://cpp_guidelines--songjiangzhou.run.tools`

## Tools (5)

- `check_naming` — Check whether a C++ identifier follows naming conventions. Validates variables, constants, functions, classes, namespac…
- `check_include_guard` — Check whether a C++ header file has correct include guards or #pragma once directives. Detects missing guards, malforme…
- `analyze_memory_safety` — Analyze C++ code for memory safety issues including memory leaks, dangling pointers, double-free errors, use of raw own…
- `suggest_modern_cpp` — Suggest how to modernize C++ code to use features from a target standard (C++11 through C++23). Identifies outdated pat…
- `check_const_correctness` — Check C++ code for const correctness issues. Identifies member functions that do not modify state but are missing the c…

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get SongJiangzhou/cpp_guidelines <tool-name>
```

## Resources

- `cpp-style://naming/{category}` — Reference documentation for C++ naming conventions by category: variable, constant, function, class, namespace, member_…
- `cpp-style://best-practices/{topic}` — C++ best practice guides by topic: memory, exceptions, templates, concurrency, performance, modern_cpp, or all.
- `cpp-style://standard/{version}` — Feature documentation for C++ standards: cpp11, cpp14, cpp17, cpp20, cpp23, or all.
- `cpp-style://examples/{pattern}` — C++ design pattern and idiom examples: singleton, factory, observer, raii, pimpl, strategy, or all.

## Prompts (2)

- `code_review` (focus) — Generate a C++ code review prompt template focused on a specific aspect: general, performance, safety, readability, or …
- `refactor_suggestion` (target_standard) — Generate a C++ refactoring suggestion prompt targeting a specific C++ standard from cpp11 to cpp23.

---

Source: https://github.com/SongJiangzhou/cpp_guidelines_mcp
