mcp-server-cpp-format

v0.3.0
mcp-server-cpp-format Checked 2 days ago Published 4 months ago

MCP server that formats C/C++ files with clang-format

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

applyClangFormat

Format C/C++ source files in-place using clang-format. Provide ABSOLUTE file paths or ABSOLUTE glob patterns (e.g. 'D:/proj/src/**/*.cpp'). Directory paths without a glob are rejected. Non-C/C++ files are silently skipped. Style resolution: explicit `style` arg > CLANG_FORMAT_CONFIG (file) > CLANG_FORMAT_STYLE > clang-format auto-detection.

ParameterTypeDescription
files *arrayAbsolute file paths or absolute glob patterns. Relative paths are resolved against cwd with a warning.
styleOptional explicit style (LLVM, Google, file, file:<path>, ...). Overrides environment defaults.