C++ Core Guidelines — Claude Code MCP server: C++ review
The C++ Core Guidelines MCP server checks C++ naming, memory safety, and const correctness. Use it during code review or when moving code toward C++11–C++23.
MIT 1,962 installs updated 2026-02-18
claude mcp add --transport http cpp-guidelines https://cpp_guidelines--songjiangzhou.run.toolsWhat C++ Core Guidelines does
The server examines identifiers such as variables, classes, and functions, checks header guards or #pragma once, and looks for leaks, dangling pointers, and unsafe memory patterns. It also reports missing const qualifiers and suggests changes for C++11 through C++23.
Its package contains 5 analysis tools, reference resources for naming, best practices, standards, and design patterns, plus 2 prompt templates for reviews and refactoring. You can connect through the HTTP endpoint https://cpp-style-guide-mcp.fly.dev/mcp or run it locally with uv.
A local setup needs Python >= 3.12 and uv. The server entry point is cpp_style_server.py, launched with uv run mcp run; without those components, the local setup will not start.
What it helps with
- check C++ identifiers against naming rules
- spot memory leaks and dangling pointers
- verify header guards or
#pragma once - find missing
constqualifiers - plan a move to C++11–C++23 features
Example prompts for the agent
- Review the naming of variables, classes, and functions in this C++ file.
- Inspect this snippet for leaks, dangling pointers, and unsafe memory use.
- Suggest changes that move this code to C++17 while keeping its behavior.
How to install C++ Core Guidelines
Platform CLI: remote server
claude mcp add --transport http cpp-guidelines https://cpp_guidelines--songjiangzhou.run.toolsPlatform CLI: remote server
codex mcp add c-core-guidelines --url https://cpp_guidelines--songjiangzhou.run.toolsConfig file
{
"mcpServers": {
"c-core-guidelines": {
"url": "https://cpp_guidelines--songjiangzhou.run.tools"
}
}
}Config file
{
"servers": {
"c-core-guidelines": {
"type": "http",
"url": "https://cpp_guidelines--songjiangzhou.run.tools"
}
}
}Platform CLI: remote server
gemini mcp add -t http c-core-guidelines https://cpp_guidelines--songjiangzhou.run.toolsStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about C++ Core Guidelines
How do I install C++ Core Guidelines in Claude Code?
Run claude mcp add --transport http cpp-guidelines https://cpp_guidelines--songjiangzhou.run.tools. This adds the server under the cpp-guidelines MCP name.
What does C++ Core Guidelines do?
It checks naming, header guards, memory safety, and const correctness in C++ code. It also suggests modernization for C++11 through C++23 and exposes reference resources.
What is required for a local C++ Core Guidelines setup?
The local setup requires Python >= 3.12 and the uv package manager. After cloning the repository, run uv sync, then start the server with uv run mcp run cpp_style_server.py.