mcp-server-cpp-format
v0.3.0MCP 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.
| Parameter | Type | Description |
|---|---|---|
files * | array | Absolute file paths or absolute glob patterns. Relative paths are resolved against cwd with a warning. |
style | Optional explicit style (LLVM, Google, file, file:<path>, ...). Overrides environment defaults. |