conan-mcp

v0.1.0
conan-mcp Checked 1 day ago Published 1 year ago

MCP server for Conan package manager

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_conan_packages

Search for Conan packages across remotes with fine-grained filtering. Use this tool when you need to: - Check available versions of dependencies - Find the latest version of a package - Search for packages by name - Search for packages by version or version range - Search for packages and filter them using filter settings or filter options - Search for package specifying package ID, or recipe revision Examples: - list_conan_packages(name="fmt", version="1.0.0") - List all available versions for fmt/1.0.0 package. - list_conan_packages(name="fmt…

ParameterTypeDescription
name *stringPackage name pattern (supports wildcards)
channelstringChannel name. Use * to search all channels.
filter_optionsarrayFilter options like fPIC, header_only, shared, with_*, without_*, etc.
filter_settingsarrayFilter settings like architecture, operating system, build type, compiler, compiler version, compiler runtime, compiler runtime version.
include_all_package_revisionsbooleanInclude all package revisions
package_idstringPackage ID. Use * to search all packages.
recipe_revisionstringRecipe revision number also know as rrev. Use * to search all revisions. Use "latest" to search the latest revision.
remotestringName of the remote to search in.
search_in_cachebooleanInclude local cache in search
userstringUser name. Use * to search all users.
versionstringVersion or version range to search for.

get_conan_profile

Get Conan profile configuration. This tool should be called when the user mentions: - Their platform (Windows, macOS, Linux) - Their compiler (gcc, clang, msvc, etc.) - Their architecture (x86_64, arm64, etc.) - Build configurations - When they want to list packages for their specific platform - When they need context about their Conan environment - When they want to check a specific profile configuration This is typically a prerequisite step before listing packages or making platform-specific recommendations, as it provides essential context…

ParameterTypeDescription
profilestringSpecific profile name to retrieve. If not provided, uses the default profile.

list_conan_profiles

List Conan profiles available. Use this tool to see which profiles are available to select or inspect. Returns: List of profile names.

install_conan_packages

Install Conan package dependencies from a recipe file (conanfile.py or conanfile.txt). This tool uses the `conan install` command to install the dependencies of a Conan recipe. It provides a complete, structured view of all nodes and relationships in the dependency graph. If any requirement is not found in the local cache, it will iterate the remotes looking for it. When the full dependency graph is computed and all dependency recipes have been found, it will look for binary packages matching the current settings and options. If no binary package is found for som…

ParameterTypeDescription
path *stringPath to the folder containing the recipe of the project or to a recipe file conanfile.txt/.py
work_dir *stringWorking directory where the command should be executed. This is the base directory from which all paths are resolved. Always required.
build_missingbooleanBuild all the missing binary dependencies when they are not available in the cache or in the remotes for download.
build_profilestringProfile to the build context.
host_profilestringProfile to the host context.
options_hostarrayApply options like fPIC, header_only, shared, with_*, without_*, etc. to the host context only.
remotestringRemote name. Omit to search in all remotes.
search_in_cachebooleanDo not use remote, resolve exclusively in the cache.
settings_hostarrayApply different settings like architecture, operating system, build type, compiler,

create_conan_project

Create a new Conan project with specified dependencies. This tool creates a new Conan project using templates and automatically adds the specified dependencies. Useful for setting up new projects with common libraries like fmt, openssl, boost, etc. Note: The generated code contains placeholder examples. You need to review and update: includes/imports, source code usage, and build system targets (CMakeLists.txt, meson.build, etc.) to properly use your specified dependencies. Args: template: Template type for the project.…

ParameterTypeDescription
name *stringName of the project
template *stringTemplate type for the project. If not specified, use cmake_lib for libraries or cmake_exe for executables
work_dir *stringWorking directory where the command should be executed. The project will be created directly in this directory. Always required.
forcebooleanOverwrite existing files if they exist
requiresarrayList of dependencies with versions
tool_requiresarrayList of tool dependencies with versions. Common examples: ['cmake/4.1.2'], ['ninja/1.13.1'], ['meson/1.9.1']
versionstringVersion of the project

get_conan_licenses

Collect license information for Conan package dependencies. This tool uses `conan graph info` to extract license information from the dependency graph for all packages. Only 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). You can either provide a path to a conanfile OR a list of package references to check. At least one of these must be provided. Examples: - get_conan_licenses(work_dir="/home/user/project", path="conanfile.py") - get_conan_l…

ParameterTypeDescription
work_dir *stringWorking directory where the command should be executed. This is the base directory from which all paths are resolved. Always required.
build_profilestringProfile to the build context.
host_profilestringProfile to the host context.
pathstringPath to the folder containing the recipe of the project or to a recipe file conanfile.txt/.py. Optional if requires is provided.
remotestringRemote name. Omit to search in all remotes.
requiresarrayList of package references to check licenses for (e.g., ['zlib/1.2.11', 'fmt/10.0.0']). Each reference will be passed as a --requires flag. Optional if path is provided.

scan_conan_dependencies

⚠️ WARNING: This tool makes an API call to audit.conan.io service. Only use when explicitly requested by the user. Requires provider authentication. If you dont have any yet you can get a token by signing up for a free at https://audit.conan.io/register Audit a Conan project or a specific package for security vulnerabilities using the audit.conan.io service. When using path: Scans the conanfile and all its transitive dependencies for vulnerabilities. When using reference: Scans only the vulnerabilities of that specific package reference, but NOT its dependencies.…

ParameterTypeDescription
work_dir *stringWorking directory where the command should be executed. Always required.
pathstringPath to the folder relative to working directory containing the recipe of the project or to a recipe file conanfile.txt/.py
referencestringConan reference to audit. For example, 'fmt/12.0.0'.