CI

conan-io/conan-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

11 stars 5 forks Качество 69 Тренд 8MIT

Сервер контекстного протокола Conan

Обзор

Сервер Model Context Protocol для интеграции пакетного менеджера Conan. Создайте проект библиотеки CMake с Conan, который имеет последнюю версию fmt и openssl в качестве требований, установите зависимости и убедитесь, что библиотеки, от которых я зависим, не имеют серьезных уязвимостей и имеют лицензию, которая позволяет моему приложению быть коммерческим. uvx предоставляется компанией uv. Если у вас нет установленного uv, вы можете установить его или использовать pip-установку conan-mcp, а затем использовать conan-mcp непосредственно в качестве команды. По умолчанию сервер использует конан из системы PATH (или виртуальной среды, в которой работает сервер MCP). Если вам нужно использовать определенную установку или версию Conan, вы можете установить переменную среды CONAN MCP CONAN PATH в вашей конфигурации MCP: Если CONAN MCP CONAN PATH не установлен, сервер будет использовать конан из PATH или виртуальной среды, в которой работает MCP-сервер.

Обзор (машинный перевод)

Сервер Model Context Protocol для интеграции пакетного менеджера Conan.

Примеры использования

Создать проект библиотеки CMake с Conan, который имеет последнюю версию fmt

и открывается как требования, установить зависимости и проверить, что Библиотеки, от которых я зависим, не имеют серьезных уязвимостей и имеют лицензию. Это позволяет моей заявке быть коммерческой.

##Установка

Требования

Python = 3.10 Конан установлен

Конфигурация MCP

Добавьте к своему [[0]]:

**Примечание: ** uvx предоставляется Uv. Если у вас нет [T2], вы можете установить его или использовать [T3], а затем использовать [T4] непосредственно в качестве команды.

####Конфигурация бинарного пути

По умолчанию сервер использует conan из системы PATH (или виртуальной среды, в которой работает сервер MCP). Если вам нужно использовать конкретную установку или версию Conan, вы можете установить переменную среды CONAN_MCP_CONAN_PATH в своей конфигурации MCP:

Если [7] не установлен, сервер будет использовать [8] от PATH или Виртуальная среда, в которой работает MCP-сервер.

Доступные инструменты

get_conan_profile:

Конфигурация профиля Conan

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального 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:

Открыть полный README на GitHub

Установка

uvx conan-mcp
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

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