Conan MCP Server

Conan MCP Server

A Model Context Protocol server for Conan package manager integration, enabling dependency management, project creation, and security scanning via natural language.

Category
访问服务器

README

Conan MCP Server

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

MCP Configuration

Add to your mcp.json:

{
  "mcpServers": {
    "conan": {
      "command": "uvx",
      "args": ["conan-mcp"]
    }
  }
}

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:

{
  "mcpServers": {
    "conan": {
      "command": "uv",
      "args": ["--directory", "/path/to/conan-mcp", "run", "conan-mcp"],
      "env": {
        "CONAN_MCP_CONAN_PATH": "/home/user/venv/bin/conan"
      }
    }
  }
}

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"
  • "List versions of zlib with architecture armv8 and shared=False"
  • "Show all zlib packages for Windows armv8 in my local cache"
  • "List all packages that contain boost in the name in conancenter"
  • "Search for fmt versions greater than or equal to 8.0 but less than 9.0 in conancenter"
  • "Search for zlib versions compatibles with 1.3.x in every remote"
  • "List versions of poco provided by user barbarian and channel stable in local cache"
  • "Provide all packages for zlib 1.3 that use the recipe at revision b3b71bfe8dd07abc7b82ff2bd0eac021 in conancenter"

install_conan_packages

Install all dependencies of a Conan recipe, producing a full dependency graph.

Parameters:

  • 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.
  • work_dir (required): Working directory where the command should be executed. This is the base directory from which all paths are resolved.
  • remote (optional): Name of the remote to search for dependencies. If omitted, all remotes are searched.
  • search_in_cache (optional): Do not use remote, resolve exclusively in the cache.
  • settings_host (optional): List of settings (host context) to override. Example: ["arch=armv8", "os=Windows", "build_type=Release"]
  • options_host (optional): List of options (host context) to override. Example: ["fPIC=True", "shared=False"]
  • build_missing (optional): Boolean, build missing binary dependencies from source if not available (false by default).

Usage examples:

  • "Install dependencies in this project using conancenter"
  • "Install dependencies from ~/project for architecture armv8, and shared=False build the missing binaries"
  • "Install dependencies in this project use windows profile for host and linux profile for build"

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).

Parameters:

  • work_dir (required): Working directory where the command should be executed. This is the base directory from which all paths are resolved.
  • 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.
  • remote (optional): Name of the remote to search for dependencies. If omitted, all remotes are searched.
  • build_profile (optional): Profile to the build context.
  • host_profile (optional): Profile to the host context.

Usage examples:

  • "Collect license information for dependencies in this project"
  • "Get all licenses from my project dependencies"
  • "Collect license information for conanfile.py in ~/my_project using the windows profile"

scan_conan_dependencies

Scan Conan packages and dependencies for security vulnerabilities

Parameters:

  • work_dir (required): Working directory where the command should be executed. This is the base directory from which all paths are resolved.
  • path (optional): Path to the folder containing the recipe or to a conanfile.txt/conanfile.py. This path is ALWAYS relative to work_dir.
  • 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.

Note: path and reference are mutually exclusive. Only one of them should be provided at a time.

Usage examples:

  • "Scan dependencies in this project for known vulnerabilities"
  • "Scan the latest version of zlib for vulnerabilities"

Local Development

Clone and run

# Clone the repository
git clone https://github.com/conan-io/conan-mcp.git
cd conan-mcp

# Install dependencies
uv sync

# Run the server
uv run conan-mcp

Local MCP configuration

For local development, use the absolute path:

{
  "mcpServers": {
    "conan": {
      "command": "uv",
      "args": ["--directory", "/absolute/path/to/conan-mcp", "run", "conan-mcp"]
    }
  }
}

Testing with MCP Inspector

You can test the server using the MCP Inspector to verify it's working correctly:

uv run mcp dev main.py

Running Conan MCP Server tests

See test/README.md for detailed testing instructions.

License

MIT License

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选