Skip to content

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

Open
TaoChenOSU wants to merge 6 commits 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 6 commits 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 Usage: [Issues, PRs], Target: Python hosting Usage: [Issues, PRs], Target: all hosting related solutions labels Jun 19, 2026
Copilot AI review requested due to automatic review settings June 19, 2026 19:01
@TaoChenOSU TaoChenOSU added the dependencies Usage: [Issues, PRs], Target: dependencies in the project 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

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
packages/core/agent_framework
   _mcp.py11819292%306, 325, 523, 583–584, 716, 778, 791, 815–816, 835–838, 840–841, 845, 871, 905–907, 909, 962–964, 1023–1024, 1293, 1334–1335, 1348, 1351, 1360–1361, 1366–1367, 1373, 1421–1422, 1438–1439, 1448–1449, 1454–1455, 1461, 1536, 1539, 1566, 1589–1593, 1616–1618, 1623, 1627–1628, 1730, 1737, 1739, 1752, 1758, 1820, 1835–1836, 1843–1844, 1849–1850, 1855, 1859, 1874, 1936, 2119, 2121, 2143, 2145–2148, 2161–2162, 2206, 2268, 2667–2668, 2890–2891, 2909
packages/durabletask/agent_framework_durabletask
   _executors.py1392184%125, 325, 331, 358, 360–361, 367, 369–370, 374, 424–426, 428, 431, 433–434, 438, 463, 467–468
   _worker.py941682%222, 236–237, 241–242, 244–246, 283, 285, 290, 305, 309–310, 314–315
packages/durabletask/agent_framework_durabletask/_workflows
   dt_context.py542357%34–35, 41, 45, 52, 56, 61–64, 67, 72, 75, 80, 83, 88, 91, 95–97, 100–102
TOTAL40680462688% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
8117 34 💤 0 ❌ 0 🔥 1m 51s ⏱️

@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

@TaoChenOSU TaoChenOSU requested a review from a team as a code owner June 22, 2026 20:59
@TaoChenOSU TaoChenOSU added this pull request to the merge queue Jun 22, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Usage: [Issues, PRs], Target: dependencies in the project hosting Usage: [Issues, PRs], Target: all hosting related solutions python Usage: [Issues, PRs], Target: Python

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

6 participants