Skip to main content
Glama
conan-io

Conan MCP Server

Official
by conan-io

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CONAN_MCP_CONAN_PATHNoPath to a specific Conan binary. If not set, uses 'conan' from PATH or virtual environment.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_conan_packagesA
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", filter_settings=["arch=armv8"]) - List all available versions for fmt package with architecture armv8
 - list_conan_packages(name="fmt", filter_options=["*:fPIC=True"]) - List all available versions for fmt package with fPIC

Args:
    name: Package name pattern (required). Supports wildcards:
        - "fmt" : exact name
        - "fmt*" : starts with "fmt"
        - "*fmt*" : contains "fmt"
        - "*fmt" : ends with "fmt"
    version: Version or version range (default: "*"). Supports Conan2 syntax:
        - "1.2.3" : exact version
        - "[>=1.0 <2.0]" : range >=1.0 and <2.0
        - "[~1.2]" : compatible with 1.2.x
        - "[^1.0]" : compatible up to next major
        - "[>1 <2.0 || ^3.2]" : multiple ranges
    user: User name (default: None). Use "*" for all users.
    channel: Channel name (default: None). Use "*" for all channels.
    recipe_revision: Recipe revision (rrev) (default: None). 
        Use "*" for all, "latest" for latest.
        Use it together with package_id to find all packages with the same recipe revision.
    package_id: Package ID (default: None). Use "*" for all packages.
        Use "*" when you are trying to find all packages.
        Use it together with include_all_package_revisions to include all package revisions.
    filter_settings: Filter by settings (default: None). List of strings:
        Pass as list of strings, e.g. ["arch=armv8", "os=Windows", "build_type=Release"]
        - ["arch=armv8"] : architecture
        - ["os=Windows"] : operating system
        - ["build_type=Release"] : build type
        - ["compiler=gcc"] : compiler
        - ["compiler_version=11"] : compiler version
        - ["compiler_runtime=libstdc++11"] : compiler runtime
        - ["compiler_runtime_version=11"] : compiler runtime version
    filter_options: Filter by options (default: None). List of strings:
        Pass as list of strings, e.g. ["*:fPIC=True", "*:header_only=True", "*:shared=False", "*:with_boost=True"]
        - ["*:fPIC=True"] : fPIC option
        - ["*:header_only=True"] : header only
        - ["*:shared=False"] : shared library
        - ["*:with_boost=True"] : with boost option
    remote: Remote name (default: "*"). 
        - None: Search in local cache only
        - "conancenter": Search in ConanCenter remote
        - "*": Search in all remotes
        - Other remote names: Search in specific remote
    search_in_cache: Include local cache in search (default: False). 
        - True: Search in both remotes and local cache
        - False: Search only in remotes (default)
        Note: This parameter should be set consistently across requests.
    include_all_package_revisions: Include all package revisions (default: False). 
        - True: Include all package revisions.
        - False: Include only the latest package revision (default)

Returns:
    Dictionary containing available packages and their metadata.

 Examples:
     - list_conan_packages(name="fmt", version="1.0.0")
     - list_conan_packages(name="*boost*", filter_settings=["arch=armv8", "os=Windows"])
     - list_conan_packages(name="zlib", filter_options=["*:shared=True"])
get_conan_profileA

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 about
the user's build environment.

Args:
    profile: Optional profile name to retrieve. If not specified, retrieves the default profile.

Returns:
    Dictionary containing both host and build profile configurations.
    The dictionary structure includes:
    - "host": Host profile settings (compiler, arch, build_type, etc.)
    - "build": Build profile settings (compiler, arch, build_type, etc.)
    - Additional configuration like package_settings, options, tool_requires, etc.
list_conan_profilesA

List Conan profiles available.

Use this tool to see which profiles are available to select or inspect.

Returns:
    List of profile names.
install_conan_packagesA
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
some dependencies, it will error unless the 'build_missing' argument is used to build from source.

Examples:
    - install_conan_packages(work_dir="/home/user/project", path="conanfile.txt")
    - install_conan_packages(work_dir="~/my_project", path="conanfile.py", remote="conancenter")
    - install_conan_packages(work_dir="/home/user/project", path="conanfile.py",
                            settings_host=["os=Windows", "arch=armv8"])

Args:
    path: Path to a folder containing a recipe or to a recipe file (conanfile.txt or conanfile.py).
          This path is ALWAYS relative to work_dir. For example, if work_dir is "/home/user/project" 
          and path is "conanfile.py", it will resolve to "/home/user/project/conanfile.py".
    work_dir: Working directory where the command should be executed. 
             This is the base directory from which all paths are resolved.
             Always required. If the user mentions they are in a specific directory, use that.
    remote: Optional remote name to search in (searches all remotes if not specified)
    search_in_cache: Do not use remote, resolve exclusively in the cache.
    build_profile: Profile to the build context.
    host_profile: Profile to the host context.
    settings_host: Substitute settings from the default host profile (architecture, OS, etc.)
        Omit to use the settings of the default host profile.
        e.g. ["arch=armv8", "os=Windows", "build_type=Release"] 
        - "arch=armv8": architecture,
        - "os=Windows": operating system, 
        - "build_type=Release": build type,
        - "compiler=gcc": compiler,
        - "compiler.version=11": compiler version,
        - "compiler.runtime=libstdc++11": compiler runtime,
        - "compiler.runtime_version=11": compiler runtime version
    options_host: Substitute options from the default host profile (fPIC, shared, etc.)
        Omit to use the options of the default host profile.
        e.g. ["fPIC=True", "shared=False"]
        - "Use "&:fPIC=True" to refer to the current package. "
        - "Use "*:fPIC=True" or other pattern if the intent was to apply to dependencies"
        - "*:fPIC=True": fPIC for all packages,
        - "&:shared=False": shared for the current package,
        - "*:with_boost=True": with boost option for all packages,
    build_missing: Build missing binary dependencies from source

Returns:
    JSON string with dependency graph metadata including installation status for each package.

    The "binary" and "recipe" fields on each node indicate the package status:
    - Missing: Recipe/binary not found, needs to be built
    - Invalid: Package invalid due to recipe restrictions
    - Build: Package has been built
    - Cache: Recipe/binary exists in local cache
    - Skip: Package skipped from installation
    - Download: Recipe/binary was downloaded
    - null: Binary unknown (e.g., consumer conanfile.txt)
create_conan_projectA

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.
              
              Libraries (produce libraries to be linked):
              - cmake_lib: CMake library (default for libraries)
              - header_lib: Header-only library
              - meson_lib: Meson build system
              - msbuild_lib: Visual Studio / MSBuild (Windows only)
              - bazel_lib: Bazel build system (experimental)
              - autotools_lib: Autotools (configure/make)
              
              Executables (programs that can be run):
              - cmake_exe: CMake executable (default for executables)
              - meson_exe: Meson build system
              - msbuild_exe: Visual Studio / MSBuild (Windows only)
              - bazel_exe: Bazel build system (experimental)
              - autotools_exe: Autotools (configure/make)
              
              Note: If the user doesn't specify build system, use cmake_lib
              for libraries or cmake_exe for executables as defaults.
    name: Name of the project
    version: Version of the project (default: "0.1")
    requires: List of dependencies with versions (e.g., ['fmt/12.0.0', 
              'openssl/3.6.0'])
    tool_requires: List of tool dependencies with versions. Common examples:
                  - ['cmake/4.1.2'] - CMake build tool
                  - ['ninja/1.13.1'] - Ninja build system
                  - ['meson/1.9.1'] - Meson build system
    work_dir: Working directory where the command should be executed. 
             The project will be created directly in this directory.
             Always required.
    force: Overwrite existing files if they exist (default: False)

Returns:
    Dictionary containing:
    - result: Success message with project details, dependency note, and 
              raw output from the conan new command
get_conan_licensesA
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.

Use this tool when you need to:
- Search for licenses of the project
- Extract license information
- Check license information 

Examples:
    - get_conan_licenses(work_dir="/home/user/project", path="conanfile.py")
    - get_conan_licenses(work_dir="~/my_project", path="conanfile.txt")
    - get_conan_licenses(work_dir="/tmp", requires=["zlib/1.2.11"])
    - get_conan_licenses(work_dir="/tmp", requires=["zlib/1.2.11", "fmt/10.0.0"])

Args:
    work_dir: Working directory where the command should be executed.
              This is the base directory from which all paths are resolved.
              Always required.
    path: Path to a folder containing a recipe or to a recipe file (conanfile.txt or conanfile.py).
          This path is ALWAYS relative to work_dir. Optional if requires is provided.
    requires: List 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 to conan graph info.
              Optional if path is provided. At least one of path or requires must be provided.
    remote: Optional remote name to search in (searches all remotes if not specified)
    build_profile: Profile to the build context.
    host_profile: Profile to the host context.

Returns:
    List of dictionaries, each containing:
    - "ref": Package reference (string)
    - "licenses": List of license strings (always a list, empty if no license specified)
scan_conan_dependenciesA
⚠️ 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.

There is a limit of 100 API calls per day. If the limit is reached, the tool will return an error.
Use path to scan the complete graph of dependencies. Use reference to audit a specific package.
Do not use both path and reference at the same time.

Args:
    work_dir: Working directory where the command should be executed. Always required.
    path: This path is ALWAYS relative to work_dir. For example, if work_dir is "/home/user/project" and path is "conanfile.txt", it will resolve to "/home/user/project/conanfile.txt". When using path, all transitive dependencies will be scanned for vulnerabilities.

    reference: Conan reference to audit. For example, "fmt/12.0.0". Use it in case the user provides a specific reference to audit. Use it instead of path. When using reference, only the vulnerabilities of that specific package reference will be scanned, but NOT its dependencies.
Returns:
    Dictionary containing the result of the audit scan.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/conan-io/conan-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server