Skip to content

Conversation

@xiangyan99
Copy link
Member

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

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Updated servers/Azure.Mcp.Server/CHANGELOG.md and/or servers/Fabric.Mcp.Server/CHANGELOG.md for product changes (features, bug fixes, UI/UX, updated dependencies)
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Validate README.md changes using script at eng/scripts/Process-PackageReadMe.ps1. See Package README
    • Updated command list in /servers/Azure.Mcp.Server/docs/azmcp-commands.md and/or /docs/fabric-commands.md
    • Run .\eng\scripts\Update-AzCommandsMetadata.ps1 to update tool metadata in azmcp-commands.md (required for CI)
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
    • For tools with new names, including new tools or renamed tools, update consolidated-tools.json
    • For new tools associated with Azure services or publicly available tools/APIs/products, add URL to documentation in the PR description
  • Extra steps for Azure MCP Server tool changes:
    • Updated test prompts in /servers/Azure.Mcp.Server/docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

@xiangyan99 xiangyan99 changed the title Uvx support [In progress] Uvx support Dec 10, 2025
@xiangyan99 xiangyan99 marked this pull request as ready for review January 13, 2026 23:18
@xiangyan99 xiangyan99 requested a review from a team as a code owner January 13, 2026 23:18
Copilot AI review requested due to automatic review settings January 13, 2026 23:18
@xiangyan99 xiangyan99 requested review from a team as code owners January 13, 2026 23:18
@xiangyan99 xiangyan99 changed the title [In progress] Uvx support Uvx support Jan 13, 2026
Copy link
Contributor

Copilot AI left a 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

Comment on lines +34 to +38
system = platform.system().lower()
if system == "windows":
executable_name = "azmcp.exe"
else:
executable_name = "azmcp"
Copy link

Copilot AI Jan 13, 2026

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:

  1. Dynamically detect the executable by scanning the bin directory for the first executable file, or
  2. Make the executable name a template variable (like CLI_NAME) that Pack-Pypi.ps1 replaces during packaging (similar to how it replaces version).

Copilot uses AI. Check for mistakes.
Copy link
Contributor

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
Copy link
Contributor

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?

Copy link
Member Author

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
Copy link
Contributor

@scbedd scbedd Jan 14, 2026

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👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

3 participants