Provides C++ code analysis tools for checking naming conventions, include guards, memory safety, const correctness, and modern C++ upgrade suggestions, along with access to C++ style guide documentation and best practices.
C++ Style Guide MCP Server
专业的 C++ 编码规范检查和最佳实践建议工具,基于 MCP (Model Context Protocol) 协议构建。
功能特性
5 个代码分析工具
check_naming- 检查命名规范(变量、函数、类等)check_include_guard- 验证头文件包含保护analyze_memory_safety- 检测内存泄漏和悬空指针suggest_modern_cpp- 现代 C++ 升级建议 (C++11/14/17/20/23)check_const_correctness- 检查 const 正确性
4 类规范文档资源
cpp-style://naming/{category}- 命名规范cpp-style://best-practices/{topic}- 最佳实践cpp-style://standard/{version}- C++ 标准特性cpp-style://examples/{pattern}- 设计模式示例
2 个代码审查提示模板
code_review- 综合/性能/安全/可读性审查refactor_suggestion- 重构建议
快速开始
通过 Smithery 安装(推荐)
本地安装
使用示例
发布到 Smithery
准备工作
项目已包含所有必需的配置文件:
✅
smithery.yaml- Smithery 部署配置✅
Dockerfile- 容器化配置✅
pyproject.toml- 项目元数据
发布步骤
验证清单
本地测试通过:
uv run mcp run cpp_style_server.pyGitHub 仓库已推送
Smithery 构建成功
可以通过 Smithery CLI 安装
工具调用正常
项目结构
开发
技术栈
Python >= 3.12
FastMCP >= 1.21.0
uv (包管理)
Docker (部署)
许可证
MIT License
链接
This server cannot be installed