🎖️ 🐍 🏠 🍎 🪟 🐧 - Conan C/C++ package manager: create projects, manage dependencies, check licenses and scan for…
Conan MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
A Model Context Protocol server for Conan package manager integration.
Usage Examples
> *"Create a CMake library project with Conan that has the latest version of fmt
> and openssl as requirements, install the dependencies and verify that the
> libraries I depend on don't have serious vulnerabilities and have a license
> that allows my application to be commercial."*
Installation
Requirements
- Python >= 3.10
- Conan installed
MCP Configuration
Add to your mcp.json:
> **Note:** uvx is provided by 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.
Configuring Conan Binary Path
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 CONAN_MCP_CONAN_PATH environment variable in your MCP configuration:
If CONAN_MCP_CONAN_PATH is not set, the server will use conan from PATH or
the virtual environment where the MCP server is running.
Available Tools
**get_conan_profile**:
Get Conan profile configuration
Parameters:
- profile (optional): If provided, show that specific profile; otherwise, default
Usage examples:
- *"What is my default Conan profile?"*
- *"Show me the linux-debug profile configuration"*
**list_conan_profiles**
List available Conan profiles
Parameters:
- No parameters
Usage examples:
- *"What Conan profiles do I have available?"*
**create_conan_project**
Create a new Conan project with specified dependencies
Parameters:
- template (required): Template type for the project.
- Libraries: cmake_lib (default), header_lib, meson_lib, msbuild_lib, bazel_lib, autotools_lib
- Executables: cmake_exe (default), meson_exe, msbuild_exe, bazel_exe, autotools_exe
- name (required): Name of the project
- version (optional): Version of the project (default: "0.1")
- requires (optional): List of dependencies with versions (e.g., ["fmt/12.0.0", "openssl/3.6.0"])
- tool_requires (optional): List of tool dependencies (e.g., ["cmake/4.1.2", "ninja/1.13.1", "meson/1.9.1"])
- work_dir (**required**): Working directory where the command should be executed. The project will be created directly in this directory.
- force (optional): Overwrite existing files if they exist (default: False)
Usage examples:
- *"Create a new CMake executable project called 'myapp' with fmt and openssl dependencies"*
- *"Create a header-only library project called 'mylib'"*
- *"Create a Meson executable project with gtest and spdlog dependencies"*
- *"Create a CMake library project with boost dependencies and cmake tool_requires"*
**list_conan_packages**
List recipes and packages from the local cache or configurated remotes
Parameters:
- name (**required**): Package name.
- version (optional): Version or version range.
- user (optional): User name to search.
- channel (optional): Channel name to search.
- recipe_revision (optional): Recipe revision (rrev). Use "*" for all, "latest" for latest.
- package_id (optional): Package ID. Use "*" for all packages.
- filter_settings (optional): List of setting filters. E.g. ["arch=armv8", "os=Windows"].
- filter_options (optional): List of option filters. E.g. ["*:fPIC=True", "*:shared=False"].
- remote (optional): Remote name to search in. Use "*"for all.
- search_in_cache (optional): Whether to include the local cache in the search.
Usage examples:
- *"List all available versions for fmt in conancenter"*