Skip to content

Add install_conan_packages tool#5

Merged
czoido merged 14 commits intomainfrom
danimtb/install-conan-packages
Oct 31, 2025
Merged

Add install_conan_packages tool#5
czoido merged 14 commits intomainfrom
danimtb/install-conan-packages

Conversation

@danimtb
Copy link
Copy Markdown
Member

@danimtb danimtb commented Oct 17, 2025

Allows installing conan packages from a conanfile.
Settings and options for the host profile can be added.
There is also a 'build_missing' boolean option to build missing packages for the given configuration.

Comment thread main.py Outdated
Comment thread main.py Outdated
description="Install the requirements specified in a recipe (conanfile.py or conanfile.txt)."
)
async def install_conan_packages(
path: str = Field(description='Absolute path to the folder containing the recipe of the project or to a recipe file conanfile.txt/.py'),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we may want to default the path to . unless it's explicitly mentioned by the user?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had issues with this in Cursor. It tried using . for the path, but it was resolved to the conan-mcp project folder instead of the project I was editing. So I had to indicate that it should be absolute so it was more clear the project I wanted the command for.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, let's check what we should do with that

Comment thread main.py Outdated
@czoido czoido changed the title Add install_conan_packages tool Add install_conan_packages tool Oct 21, 2025
Comment thread main.py Outdated
Comment thread main.py Outdated
Comment thread main.py Outdated
Comment on lines +316 to +323
build_profiles: list[str] = Field(
default=None,
description="List of profiles to apply to the build context. They will be applied in the order they are provided.",
),
host_profiles: list[str] = Field(
default=None,
description="List of profiles to apply to the host context. They will be applied in the order they are provided.",
),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we may simplify this to a single profile even if the command supports passing multiple composable profiles? It can be a bit challenging for the LLM to decide how to compose those, I think we can reduce this to the minimum.

Comment thread conan_mcp/main.py
@@ -243,6 +243,136 @@ async def list_conan_profiles() -> list[str]:
return json.loads(raw_output)


@mcp.tool(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if we want to use that but I've read that you can use ToolAnnotations and set readOnlyHint to False

https://gofastmcp.com/servers/tools#param-annotations

Comment thread main.py Outdated
@czoido czoido merged commit f937a9b into main Oct 31, 2025
1 check passed
@czoido czoido deleted the danimtb/install-conan-packages branch November 12, 2025 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants