A Model Context Protocol server for Conan package manager integration. - Python >= 3.10 - Conan installed Add to your mcp.json: By default, the server uses conan from the system PATH (or the virtual environment where the MCP server is running). If you need to use a specific Conan installation or version, you can set the CONANMCPCONANPATH environment variable in your MCP configuration: If CONANMCPC
Add this skill
npx mdskills install conan-io/conan-mcpComprehensive Conan package manager integration with well-documented tools for dependency management and security scanning
1# Conan MCP Server23A Model Context Protocol server for Conan package manager integration.45## Usage Examples67> *"Create a CMake library project with Conan that has the latest version of fmt8> and openssl as requirements, install the dependencies and verify that the9> libraries I depend on don't have serious vulnerabilities and have a license10> that allows my application to be commercial."*1112## Installation1314### Requirements1516- Python >= 3.1017- Conan [installed](https://docs.conan.io/2/installation.html)1819### MCP Configuration2021Add to your `mcp.json`:2223```json24{25 "mcpServers": {26 "conan": {27 "command": "uvx",28 "args": ["conan-mcp"]29 }30 }31}32```3334> **Note:** `uvx` is provided by [uv](https://github.com/astral-sh/uv). If you don't have `uv` installed, you can install it or use `pip install conan-mcp` and then use `conan-mcp` directly as the command.3536#### Configuring Conan Binary Path3738By default, the server uses `conan` from the system PATH (or the virtual environment where the MCP server is running). If you need to use a specific Conan installation or version, you can set the `CONAN_MCP_CONAN_PATH` environment variable in your MCP configuration:3940```json41{42 "mcpServers": {43 "conan": {44 "command": "uv",45 "args": ["--directory", "/path/to/conan-mcp", "run", "conan-mcp"],46 "env": {47 "CONAN_MCP_CONAN_PATH": "/home/user/venv/bin/conan"48 }49 }50 }51}52```5354If `CONAN_MCP_CONAN_PATH` is not set, the server will use `conan` from PATH or55the virtual environment where the MCP server is running.5657### Available Tools5859**`get_conan_profile`**:6061Get Conan profile configuration6263Parameters:64- `profile` (optional): If provided, show that specific profile; otherwise, default6566Usage examples:6768- *"What is my default Conan profile?"*69- *"Show me the linux-debug profile configuration"*7071**`list_conan_profiles`**7273List available Conan profiles7475Parameters:76- No parameters7778Usage examples:7980- *"What Conan profiles do I have available?"*8182**`create_conan_project`**8384Create a new Conan project with specified dependencies8586Parameters:87- `template` (required): Template type for the project.88 - Libraries: `cmake_lib` (default), `header_lib`, `meson_lib`, `msbuild_lib`, `bazel_lib`, `autotools_lib`89 - Executables: `cmake_exe` (default), `meson_exe`, `msbuild_exe`, `bazel_exe`, `autotools_exe`90- `name` (required): Name of the project91- `version` (optional): Version of the project (default: "0.1")92- `requires` (optional): List of dependencies with versions (e.g., ["fmt/12.0.0", "openssl/3.6.0"])93- `tool_requires` (optional): List of tool dependencies (e.g., ["cmake/4.1.2", "ninja/1.13.1", "meson/1.9.1"])94- `work_dir` (**required**): Working directory where the command should be executed. The project will be created directly in this directory.95- `force` (optional): Overwrite existing files if they exist (default: False)9697Usage examples:9899- *"Create a new CMake executable project called 'myapp' with fmt and openssl dependencies"*100- *"Create a header-only library project called 'mylib'"*101- *"Create a Meson executable project with gtest and spdlog dependencies"*102- *"Create a CMake library project with boost dependencies and cmake tool_requires"*103104**`list_conan_packages`**105106List recipes and packages from the local cache or configurated remotes107108Parameters:109- `name` (**required**): Package name.110- `version` (optional): Version or version range.111- `user` (optional): User name to search.112- `channel` (optional): Channel name to search.113- `recipe_revision` (optional): Recipe revision (rrev). Use `"*"` for all, `"latest"` for latest.114- `package_id` (optional): Package ID. Use `"*"` for all packages.115- `filter_settings` (optional): List of setting filters. E.g. `["arch=armv8", "os=Windows"]`.116- `filter_options` (optional): List of option filters. E.g. `["*:fPIC=True", "*:shared=False"]`.117- `remote` (optional): Remote name to search in. Use `"*"`for all.118- `search_in_cache` (optional): Whether to include the local cache in the search.119120Usage examples:121- *"List all available versions for fmt in conancenter"*122- *"List versions of zlib with architecture armv8 and shared=False"*123- *"Show all zlib packages for Windows armv8 in my local cache"*124- *"List all packages that contain boost in the name in conancenter"*125- *"Search for fmt versions greater than or equal to 8.0 but less than 9.0 in conancenter"*126- *"Search for zlib versions compatibles with 1.3.x in every remote"*127- *"List versions of poco provided by user barbarian and channel stable in local cache"*128- *"Provide all packages for zlib 1.3 that use the recipe at revision b3b71bfe8dd07abc7b82ff2bd0eac021 in conancenter"*129130**`install_conan_packages`**131132Install all dependencies of a Conan recipe, producing a full dependency graph.133134Parameters:135- `path` (**required**): Path to the folder containing the recipe, or to a `conanfile.txt` or `conanfile.py`. This path is ALWAYS relative to `work_dir`.136- `work_dir` (**required**): Working directory where the command should be executed. This is the base directory from which all paths are resolved.137- `remote` (optional): Name of the remote to search for dependencies. If omitted, all remotes are searched.138- `search_in_cache` (optional): Do not use remote, resolve exclusively in the cache.139- `settings_host` (optional): List of settings (host context) to override. Example: `["arch=armv8", "os=Windows", "build_type=Release"]`140- `options_host` (optional): List of options (host context) to override. Example: `["fPIC=True", "shared=False"]`141- `build_missing` (optional): Boolean, build missing binary dependencies from source if not available (`false` by default).142143Usage examples:144- *"Install dependencies in this project using conancenter"*145- *"Install dependencies from ~/project for architecture armv8, and shared=False build the missing binaries"*146- *"Install dependencies in this project use windows profile for host and linux profile for build"*147148**`get_conan_licenses`**149150Collect license information for Conan package dependencies. This tool uses `conan graph info` to extract license information from the dependency graph for all packages.151152Only packages in the "host" context are analyzed (build context packages are excluded as they are build-time tools and not included in the final product).153154Parameters:155- `work_dir` (**required**): Working directory where the command should be executed. This is the base directory from which all paths are resolved.156- `path` (**required**): Path to the folder containing the recipe, or to a `conanfile.txt` or `conanfile.py`. This path is ALWAYS relative to `work_dir`.157- `remote` (optional): Name of the remote to search for dependencies. If omitted, all remotes are searched.158- `build_profile` (optional): Profile to the build context.159- `host_profile` (optional): Profile to the host context.160161Usage examples:162- *"Collect license information for dependencies in this project"*163- *"Get all licenses from my project dependencies"*164- *"Collect license information for conanfile.py in ~/my_project using the windows profile"*165166**`scan_conan_dependencies`**167168Scan Conan packages and dependencies for security vulnerabilities169170Parameters:171- `work_dir` (**required**): Working directory where the command should be executed. This is the base directory from which all paths are resolved.172- `path` (optional): Path to the folder containing the recipe or to a `conanfile.txt`/`conanfile.py`. This path is ALWAYS relative to `work_dir`.173- `reference` (optional): Conan reference of a specific package to audit, e.g. `"fmt/12.0.0"`. Use this instead of `path` to audit only a specific package and not its dependencies.174175> **Note:** `path` and `reference` are mutually exclusive. Only one of them should be provided at a time.176177Usage examples:178- *"Scan dependencies in this project for known vulnerabilities"*179- *"Scan the latest version of zlib for vulnerabilities"*180181182## Local Development183184### Clone and run185186```bash187# Clone the repository188git clone https://github.com/conan-io/conan-mcp.git189cd conan-mcp190191# Install dependencies192uv sync193194# Run the server195uv run conan-mcp196```197198### Local MCP configuration199200For local development, use the absolute path:201202```json203{204 "mcpServers": {205 "conan": {206 "command": "uv",207 "args": ["--directory", "/absolute/path/to/conan-mcp", "run", "conan-mcp"]208 }209 }210}211```212213### Testing with MCP Inspector214215You can test the server using the MCP Inspector to verify it's working216correctly:217218```bash219uv run mcp dev main.py220```221222### Running Conan MCP Server tests223224See [test/README.md](test/README.md) for detailed testing instructions.225226## License227228MIT License
Full transparency — inspect the skill content before installing.