-
Notifications
You must be signed in to change notification settings - Fork 343
Uvx support #1359
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
base: main
Are you sure you want to change the base?
Uvx support #1359
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds PyPI packaging support to enable installation of Azure MCP Server via pip, pipx, and uvx. The implementation creates platform-specific wheels containing pre-compiled binaries for different OS and architecture combinations.
Changes:
- Added PyPI packaging infrastructure including packaging script (Pack-Pypi.ps1), Python entry point modules, and project template
- Updated build scripts to extract and track PyPI-specific properties from project files
- Added PyPI package configuration to Azure.Mcp.Server.csproj
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| servers/Azure.Mcp.Server/src/Azure.Mcp.Server.csproj | Added PyPI package metadata (package name and keywords) |
| eng/scripts/Process-PackageReadMe.ps1 | Added 'pypi' as a valid package type for README processing |
| eng/scripts/Pack-Pypi.ps1 | New script to create platform-specific PyPI wheels with embedded binaries |
| eng/scripts/New-BuildInfo.ps1 | Added extraction of PyPI properties from project files |
| eng/scripts/Get-ProjectProperties.ps1 | Added PyPI-related properties to extraction list |
| eng/pypi/wrapper/init.py | Cross-platform wrapper package (currently unused by packaging script) |
| eng/pypi/pyproject.toml.template | Template for PyPI package metadata |
| eng/pypi/init.py | Python entry point that executes the platform-specific binary |
| eng/pypi/README.md | Documentation for PyPI packaging process |
| system = platform.system().lower() | ||
| if system == "windows": | ||
| executable_name = "azmcp.exe" | ||
| else: | ||
| executable_name = "azmcp" |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The executable name is hardcoded as "azmcp" but different servers use different CLI names (e.g., Fabric MCP Server uses "fabmcp"). The code should either:
- Dynamically detect the executable by scanning the bin directory for the first executable file, or
- Make the executable name a template variable (like CLI_NAME) that Pack-Pypi.ps1 replaces during packaging (similar to how it replaces version).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to be seeing this for npm package too.
|
|
||
| ```bash | ||
| # Install - pip automatically selects the correct wheel for your platform | ||
| pip install msmcp-azure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Did we double check this naming convention for the pypi package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This name was proposed by Johan. :)
|
|
||
| ```bash | ||
| # Upload to production PyPI | ||
| twine upload .work/packages_pypi/Azure.Mcp.Server/*.whl .work/packages_pypi/Azure.Mcp.Server/*.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not be accurate. I left a comment that links to how we will release this package in release-pypi.yml👍
What does this PR do?
[Provide a clear, concise description of the changes]Add uvx support.
[Any additional context, screenshots, or information that helps reviewers]GitHub issue number?
[Link to the GitHub issue this PR addresses]Pre-merge Checklist
servers/Azure.Mcp.Server/CHANGELOG.mdand/orservers/Fabric.Mcp.Server/CHANGELOG.mdfor product changes (features, bug fixes, UI/UX, updated dependencies)servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentationeng/scripts/Process-PackageReadMe.ps1. See Package README/servers/Azure.Mcp.Server/docs/azmcp-commands.mdand/or/docs/fabric-commands.md.\eng\scripts\Update-AzCommandsMetadata.ps1to update tool metadata in azmcp-commands.md (required for CI)ToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test promptsconsolidated-tools.json/servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline