Skip to content

Python: Add MCP as a hard dep in Foundry Hosting#6634

Open
TaoChenOSU wants to merge 1 commit into
mainfrom
taochen/add-mcp-dep-to-foundry-hosting
Open

Python: Add MCP as a hard dep in Foundry Hosting#6634
TaoChenOSU wants to merge 1 commit into
mainfrom
taochen/add-mcp-dep-to-foundry-hosting

Conversation

@TaoChenOSU

@TaoChenOSU TaoChenOSU commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Motivation & Context

Foundry toolbox integration requires MCP thus we need to take a dependency on the MCP package.

Description & Review Guide

  • What are the major changes?
    Add a new dependency to the Foundry Hosting package.

  • What is the impact of these changes?
    An extra dependency may increase install time.

  • What do you want reviewers to focus on?

Why not an optional dep? Because we'd rather guarantee the toolbox related feature always works for foundry hosting (rather than depend on the user also installing the MCP extra), keeping mcp as a hard dependency would be the safer call. The optional dep (lazy import) approach trades that guarantee only for a lighter default install.

Related Issue

Foundry hosting agent samples no longer need to install mcp separately.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

@TaoChenOSU TaoChenOSU self-assigned this Jun 19, 2026
@TaoChenOSU TaoChenOSU added python Issues related to the Python codebase hosting Issues related to hosting labels Jun 19, 2026
Copilot AI review requested due to automatic review settings June 19, 2026 19:01
@TaoChenOSU TaoChenOSU added the dependencies Pull requests that update a dependency file label Jun 19, 2026
@github-actions github-actions Bot changed the title Add MCP as a hard dep in Foundry Hosting Python: Add MCP as a hard dep in Foundry Hosting Jun 19, 2026
@TaoChenOSU TaoChenOSU marked this pull request as ready for review June 19, 2026 19:01

Copilot AI left a comment

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.

Pull request overview

This PR makes the Python Foundry Hosting package (agent-framework-foundry-hosting) depend on the mcp Python package by default, aligning the distribution metadata with the package’s existing direct mcp imports used for Foundry toolbox/MCP integration.

Changes:

  • Add mcp>=1.24.0,<2 to agent-framework-foundry-hosting runtime dependencies.

@github-actions

Copy link
Copy Markdown
Contributor

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
TOTAL40089448388% 
report-only-changed-files is enabled. No files were changed during this commit :)

Python Unit Test Overview

Tests Skipped Failures Errors Time
8026 34 💤 0 ❌ 0 🔥 2m 12s ⏱️

@TaoChenOSU TaoChenOSU enabled auto-merge June 19, 2026 19:05

@github-actions github-actions Bot left a comment

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.

Automated Code Review

Reviewers: 5 | Confidence: 63%

✓ Correctness

No actionable issues found in this dimension.

✓ Security Reliability

No actionable issues found in this dimension.

✓ Test Coverage

No actionable issues found in this dimension.

✓ Failure Modes

No actionable issues found in this dimension.

✓ Design Approach

The repo’s Python dependency-management guidance explicitly prefers targeted uv lock --upgrade-package <dependency-name> updates for runtime changes, so this lockfile-wide churn is broader than the documented approach. I did not find a correctness problem in the dependency choice itself, but the lockfile regeneration approach appears broader than necessary.

Suggestions

  • Regenerate python/uv.lock with a targeted dependency update (e.g., uv lock --upgrade-package mcp) so the PR only carries MCP-related resolution changes; the repo guidance explicitly prefers targeted lock updates to reduce merge conflicts (python/DEV_SETUP.md:236, python/.github/skills/python-package-management/SKILL.md:70).

Automated review by TaoChenOSU's agents

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

Labels

dependencies Pull requests that update a dependency file hosting Issues related to hosting python Issues related to the Python codebase

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants