Python: Add MCP as a hard dep in Foundry Hosting#6634
Conversation
There was a problem hiding this comment.
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,<2toagent-framework-foundry-hostingruntime dependencies.
There was a problem hiding this comment.
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.lockwith 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
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
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.