-
Notifications
You must be signed in to change notification settings - Fork 26
From Zero to Package in Seconds: the new Conan MCP #298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 18 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
000f906
conan-mpc-blog
ErniGH 9ae276a
Update _posts/2025-11-01-From-Zero-to-Package-in-Seconds-the-new-Cona…
ErniGH cc2aa63
Update _posts/2025-11-01-From-Zero-to-Package-in-Seconds-the-new-Cona…
ErniGH eab6b46
Update _posts/2025-11-01-From-Zero-to-Package-in-Seconds-the-new-Cona…
ErniGH b5c6105
Update _posts/2025-11-01-From-Zero-to-Package-in-Seconds-the-new-Cona…
ErniGH 9334e21
Update _posts/2025-11-01-From-Zero-to-Package-in-Seconds-the-new-Cona…
ErniGH 913c143
Update _posts/2025-11-01-From-Zero-to-Package-in-Seconds-the-new-Cona…
ErniGH 4e0642a
Update _posts/2025-11-01-From-Zero-to-Package-in-Seconds-the-new-Cona…
ErniGH 0b7ae73
Update _posts/2025-11-01-From-Zero-to-Package-in-Seconds-the-new-Cona…
ErniGH 57c3fe7
reviews with new videos
ErniGH 5c4c122
Update _posts/2025-11-01-From-Zero-to-Package-in-Seconds-the-new-Cona…
ErniGH c13706c
Update _posts/2025-11-01-From-Zero-to-Package-in-Seconds-the-new-Cona…
ErniGH 13efa5a
Update _posts/2025-11-01-From-Zero-to-Package-in-Seconds-the-new-Cona…
ErniGH f41426d
Apply suggestion from @ErniGH
ErniGH 32aff30
armv and gif
ErniGH 6551215
killer features first
ErniGH a441fe8
assumes uv
ErniGH 2c95b28
change date
ErniGH c4c00db
Update _posts/2025-12-04-From-Zero-to-Package-in-Seconds-the-new-Cona…
ErniGH 4634555
Update _posts/2025-12-04-From-Zero-to-Package-in-Seconds-the-new-Cona…
ErniGH f1a7619
Update _posts/2025-12-04-From-Zero-to-Package-in-Seconds-the-new-Cona…
ErniGH 8f5ca32
Update _posts/2025-12-04-From-Zero-to-Package-in-Seconds-the-new-Cona…
ErniGH 0f08fee
wip
ErniGH 1a4f155
Update _posts/2025-12-04-From-Zero-to-Package-in-Seconds-the-new-Cona…
ErniGH 47f289d
Update _posts/2025-12-04-From-Zero-to-Package-in-Seconds-the-new-Cona…
ErniGH b9d6fee
Update _posts/2025-12-04-From-Zero-to-Package-in-Seconds-the-new-Cona…
ErniGH eb27cbf
the Conan MCP *Server*
ErniGH File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
129 changes: 129 additions & 0 deletions
129
_posts/2025-12-04-From-Zero-to-Package-in-Seconds-the-new-Conan-MCP.markdown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,129 @@ | ||
| --- | ||
| layout: post | ||
| comments: false | ||
| title: "From Zero to Package in Seconds: the new Conan MCP" | ||
| description: "The integration of Conan with the MCP server offers several compelling advantages, particularly for developers working with C and C++ dependencies" | ||
| meta_title: "From Zero to Package in Seconds: the new Conan MCP" | ||
ErniGH marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| categories: [MCP, AI, GPT, conan, conan-mcp] | ||
| --- | ||
|
|
||
| MCP (Model Context Protocol) is an [open-source standard](https://modelcontextprotocol.io/docs/getting-started/intro) that allows language models and AI applications like ChatGPT, | ||
| Claude, or Grok to connect with other systems, enabling them to access data sources such as local files or databases, | ||
| workflows like specific prompts, and tools, such as, in our case, the Conan client. | ||
|
|
||
| This standard allows all these resources to be grouped together and provides the AI with a way to use them to complete | ||
| tasks in an **agentic way**. | ||
ErniGH marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Why should I use it? | ||
| The integration of Conan with MCP offers several compelling advantages, particularly for developers working | ||
ErniGH marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| with C and C++ dependencies and AI development tools: | ||
|
|
||
| ### Enhanced Automation and Efficiency | ||
| * **Easier Packaging Workflow**: The MCP server allows the language model to run Conan commands directly. This makes it | ||
| possible to generate the basic structure of a C++ project, add dependencies in natural language, and prepare the project by | ||
| installing the Conan dependencies it needs. | ||
| It can also run security scans on your dependencies and list their declared licenses. All of this happens through simple natural | ||
| language prompts, using your preferred LLM. | ||
| * **Reduced Context Switching**: Developers no longer need to jump between their development environment, command line, | ||
| and documentation to manage dependencies. The AI acts as an intelligent intermediary, handling complex Conan tasks | ||
| in the background. | ||
|
|
||
| ### Easy Dependency Management and Auditing | ||
| * **Advanced Package Search**: Thanks to the Conan MCP Server, you can search for the exact package you need from your | ||
ErniGH marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| remotes by specifying the operating system, architecture, compiled binary options, or even complex version range | ||
| filters, all without resorting to command line syntax. | ||
| * **Simplified Dependency Definition**: Leveraging the power of natural language processing through MCP, developers can | ||
| define their required C/C++ dependencies without needing to memorize specific Conan syntax for creating recipe files. | ||
| For instance, a simple request like "I need the latest version of Boost for my project, | ||
| compiled with C++17 support" is translated by the AI agent into the necessary Conan commands and configuration. | ||
| * **Proactive Auditing and Security**: The AI agent can proactively audit dependencies as they are installed, automatically | ||
| checking for known vulnerabilities (CVEs) and verifying license compliance against project policies, giving immediate | ||
| feedback in natural language. | ||
|
|
||
| ## Let’s dive into real examples | ||
| ### Create new packages | ||
ErniGH marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Let’s move on to one of the highlights of the MCP: **package creation**. Suppose we want to start a project of a library | ||
ErniGH marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| that uses CMake, with dependencies on fmt and OpenSSL. We can let Conan MCP create the entire project scaffolding and | ||
| install the dependencies. | ||
| {% highlight bash %} | ||
| Create a project for a CMake library using Conan, with dependencies on the | ||
| latest versions of fmt and OpenSSL. Install the dependencies of the project. | ||
| {% endhighlight %} | ||
| <div style="text-align: center;"> | ||
| <img src="{{ site.baseurl }}/assets/post_images/2025-12-04/gif3-Create-project-x6.gif" | ||
| alt="Create project gif example"/> | ||
| </div> | ||
| <br> | ||
|
|
||
| ### Auditing project and checking licenses | ||
| The crown jewel of this Conan MCP is **library auditing and license listing**, just a simple prompt away. Using the previous | ||
ErniGH marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| project as a base, let’s ask the language model to ensure that the resolved versions have no vulnerabilities and that | ||
| all the licenses used by our dependencies are suitable for commercial use. | ||
| {% highlight bash %} | ||
| Ensure my project’s third-party libraries are secure and licensed for commercial use. | ||
| {% endhighlight %} | ||
| <div style="text-align: center;"> | ||
| <img src="{{ site.baseurl }}/assets/post_images/2025-12-04/gif4-Verify-x10.gif" | ||
| alt="Verify project gif example"/> | ||
| </div> | ||
| <br> | ||
|
|
||
| ### Listing packages | ||
| Let’s see a simpler one: we’re going to try to search for the compiled packages on ConanCenter for a library, | ||
| such as zlib, with some options, including the architecture being arm and the shared option set to false, and have it tell | ||
| us which versions we have packages for. | ||
| {% highlight bash %} | ||
| Tell me which versions of zlib packages are available with armv8 architecture and statically linked | ||
| {% endhighlight %} | ||
| <div style="text-align: center;"> | ||
| <img src="{{ site.baseurl }}/assets/post_images/2025-12-04/gif1-List-versions-x6.gif" | ||
| alt="List versions gif example"/> | ||
| </div> | ||
| <br> | ||
|
|
||
| ### Manage existing profiles | ||
| The MCP can also access the list of profiles and is able to query it, so that, for example, if you want to check which | ||
ErniGH marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| C++ version my Windows profile with MSVC 193 is configured for, you can simply ask: | ||
| {% highlight bash %} | ||
| Check my Conan profiles and tell me which cppstd is configured in the Windows profile that uses compiler version 193. | ||
| {% endhighlight %} | ||
| <div style="text-align: center;"> | ||
| <img src="{{ site.baseurl }}/assets/post_images/2025-12-04/gif2-profile-x6.gif" | ||
| alt="Search profile gif example"/> | ||
| </div> | ||
| <br> | ||
| It will list the profiles using a `conan profile list` command and then use `conan profile show` with the selected profile | ||
| to obtain the required information. For this type of functionality to work correctly, we recommend maintaining a proper | ||
| order when naming your Conan profiles. | ||
|
|
||
| ## Installing Conan MCP | ||
ErniGH marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| To install it, the first thing you need is an MCP client. You can use for example LibreChat or | ||
ErniGH marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Cursor. Then, simply add to your MCP configuration. | ||
| This assumes you have ``uv`` installed in your machine. ``uv`` has become the standard for MCPs. If you want to install ``uv`` you can find [how to install uv here](https://docs.astral.sh/uv/getting-started/installation/). | ||
ErniGH marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| {% highlight bash %} | ||
| { | ||
| "mcpServers": { | ||
| "conan": { | ||
| "command": "uvx", | ||
ErniGH marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "args": ["conan-mcp"] | ||
| } | ||
| } | ||
| } | ||
| {% endhighlight %} | ||
|
|
||
| ## What is next? | ||
| Conan MCP is still in an early stage, with a strong focus on the most critical developer workflows, and we are gradually | ||
ErniGH marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| expanding support for more Conan features. We would love to hear your feedback about what you are missing or which | ||
| workflows you would like to see supported next. | ||
|
|
||
| We have prioritized the features most critical for the developer workflow: powerful **package search** and filtering, | ||
| seamless **project creation** and dependency installation, profile checking, and the most essential: **vulnerability | ||
| scanning and license listing**. | ||
|
|
||
| We would love to hear your ideas. Feel free to share your thoughts in our [repository](https://github.com/conan-io/conan-mcp)! | ||
| If you have any suggestions for new features you would like to see addressed by the Conan MCP, or even if you wish to | ||
ErniGH marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| contribute code to the project, don't hesitate to do so! | ||
| Your feedback and contributions are invaluable in shaping the future of this tool. | ||
|
|
||
| Happy prompting with Conan MCP! | ||
ErniGH marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.