cmake-mcp
by ibuildrun
README.md
# cmake-mcp
MCP server for CMake build automation and project management. Gives AI assistants the ability to configure, build, clean, and inspect CMake projects with structured error parsing.
## Features
- **cmake_configure** — run CMake configure with custom generator and options
- **cmake_build** — build with structured error parsing (MSVC + GCC/Clang)
- **cmake_clean** — clean build artifacts
- **cmake_list_targets** — list available build targets
- **cmake_cache_get** — read CMake cache variables
- **cmake_run_executable** — run a built executable and capture output
Automatically falls back to vcvarsall environment on Windows when cmake is not in PATH.
## Requirements
- CMake 3.12+ installed and in PATH
- Python 3.10+
## Installation
```bash
pip install cmake-mcp
```
Or from source:
```bash
git clone https://github.com/ibuildrun/cmake-mcp.git
cd cmake-mcp
pip install -e .
```
## MCP Configuration
Add to your `.kiro/settings/mcp.json`:
```json
{
"mcpServers": {
"cmake": {
"command": "cmake-mcp",
"disabled": false
}
}
}
```
Or with uvx:
```json
{
"mcpServers": {
"cmake": {
"command": "uvx",
"args": ["cmake-mcp"],
"disabled": false
}
}
}
```
## Usage Examples
```
> cmake_configure "." "build" "Visual Studio 17 2022"
> cmake_build "build" "Debug" "teeworlds"
> cmake_cache_get "build" "CMAKE_BUILD_TYPE"
> cmake_list_targets "build"
```
## License
MIT
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo recent community issues