mcp-server-cpp-format
Model Context Protocol (MCP) server that formats C/C++ source files in-place using clang-format.
Designed to back the cpp-format Claude Code plugin,
but usable as a standalone MCP server in any MCP-compatible client.
Install
The server is published on PyPI and intended to be invoked via uvx:
uvx mcp-server-cpp-format
Or install into a regular environment:
pip install mcp-server-cpp-format
mcp-server-cpp-format
Requires Python 3.10+ and clang-format available on PATH (or via CLANG_FORMAT_BIN).
Tools
applyClangFormat
Formats C/C++ source files in-place.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
files |
string[] |
yes | Absolute file paths or absolute glob patterns (/path/**/*.cpp). Directory paths without a glob are rejected. |
style |
string |
no | Explicit style (LLVM, Google, file, file:<path>, ...). Overrides environment defaults. |
Allowed extensions (others are silently skipped):
.c .cc .cpp .cxx .c++ .h .hh .hpp .hxx .h++ .ipp .tpp .inl
Style resolution priority
styleargument when explicitly providedCLANG_FORMAT_CONFIGenv (path to a.clang-format) →--style=file:<path>CLANG_FORMAT_STYLEenv (e.g.LLVM,Google) →--style=<style>- Default →
--style=file(clang-format auto-discovers.clang-formatupward; falls back to LLVM)
Environment variables
| Variable | Effect |
|---|---|
CLANG_FORMAT_BIN |
Absolute path to a clang-format binary. Default: clang-format from PATH. |
CLANG_FORMAT_CONFIG |
Absolute path to a .clang-format file to enforce. |
CLANG_FORMAT_STYLE |
Fallback style name when no .clang-format is provided/found. |
CPP_FORMAT_LOG_LEVEL |
Logging verbosity for the server (default INFO). |
License
MIT
Metadata
Release files for mcp-server-cpp-format 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcp_server_cpp_format-0.3.0.tar.gz | 10.2 kB | Without provenance | Details for mcp_server_cpp_format-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcp_server_cpp_format-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for mcp_server_cpp_format-0.3.0-py3-none-any.whl |
Total release size: 15.9 kB
Release files / mcp_server_cpp_format-0.3.0.tar.gz
| Download URL | mcp_server_cpp_format-0.3.0.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7d8797fb82673913f0e9786ad34f7e45bbc562e48b632c2d35884fc830e72b29
|
|
BLAKE2b-256 checksum How to use checksums |
44b163b80841e24c1e429126a62066a977474a480990e648acd098848732dc5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / mcp_server_cpp_format-0.3.0-py3-none-any.whl
| Download URL | mcp_server_cpp_format-0.3.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e133120ad310867385e836b22b945733653982bb428b69018b031d7e5f93ab91
|
|
BLAKE2b-256 checksum How to use checksums |
a503c6620f4125a0fdf77b18178fce3801b042b1acb0bfd0115f85a70920bc34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for mcp-server-cpp-format 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.