Skip to content

Python: Added an Azure OpenAI Responses API Hosted MCP sample - #2108

Merged
moonbox3 merged 4 commits into
microsoft:mainfrom
guygregory:azure-responses-hostedmcp-python-sample
Nov 13, 2025
Merged

Python: Added an Azure OpenAI Responses API Hosted MCP sample#2108
moonbox3 merged 4 commits into
microsoft:mainfrom
guygregory:azure-responses-hostedmcp-python-sample

Conversation

@guygregory

Copy link
Copy Markdown
Contributor

Motivation and Context

Adding a hosted MCP sample for Azure OpenAI Responses API. This is a lightly modified version of the OpenAI Responses API sample, tested to work with Azure OpenAI.

Description

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI review requested due to automatic review settings November 12, 2025 01:45
@markwallace-microsoft markwallace-microsoft added the python Usage: [Issues, PRs], Target: Python label Nov 12, 2025

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 adds a new Python sample demonstrating how to use hosted Model Context Protocol (MCP) tools with Azure OpenAI Responses Client. This is an Azure-specific adaptation of the existing OpenAI Responses API hosted MCP sample.

  • Adds support for Azure OpenAI authentication using AzureCliCredential
  • Demonstrates multiple approval workflows for MCP tool execution with Azure OpenAI
  • Shows usage patterns with and without conversation threads, including streaming

guygregory and others added 2 commits November 12, 2025 15:12
…nses_client_with_hosted_mcp.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@markwallace-microsoft markwallace-microsoft added the documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs label Nov 12, 2025
@moonbox3
moonbox3 added this pull request to the merge queue Nov 13, 2025
Merged via the queue into microsoft:main with commit 15d0bda Nov 13, 2025
23 checks passed
arisng pushed a commit to arisng/agent-framework that referenced this pull request Feb 2, 2026
…oft#2108)

* Add files via upload

* Update python/samples/getting_started/agents/azure_openai/azure_responses_client_with_hosted_mcp.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Updated README.md

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants