Skip to content

Python: Sample on integration of Azure OpenAI Responses Client with a local MCP server - #1215

Merged
eavanvalkenburg merged 5 commits into
microsoft:mainfrom
saurabhvartak1982:main
Oct 7, 2025
Merged

Python: Sample on integration of Azure OpenAI Responses Client with a local MCP server#1215
eavanvalkenburg merged 5 commits into
microsoft:mainfrom
saurabhvartak1982:main

Conversation

@saurabhvartak1982

Copy link
Copy Markdown
Contributor

Motivation and Context

  1. Why is this change required?
    The example provides a sample guidance on integration of Azure OpenAI Responses Client with hosted Model Context Protocol (MCP) servers.

  2. What problem does it solve?
    This example is not currently present, and it will definitely be a scenario where help would be needed.

  3. What scenario does it contribute to?
    It will provide guidance to the developers who are seeking guidance on integration of Azure OpenAI Responses Client with hosted Model Context Protocol (MCP) servers.

  4. If it fixes an open issue, please link to the issue here.
    NA

Description

The example provides a sample guidance on integration of Azure OpenAI Responses Client with hosted Model Context Protocol (MCP) servers.

This code is designed to demonstrate how to connect to an MCP server, execute tool calls (such as fetching Microsoft documentation-related responses or other custom actions), and handle the returned data programmatically. The script can be easily adapted to automate workflows or integrate MCP-powered capabilities into larger applications.

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 October 6, 2025 06:33
@markwallace-microsoft markwallace-microsoft added the python Usage: [Issues, PRs], Target: Python label Oct 6, 2025
@github-actions github-actions Bot changed the title Sample on integration of Azure OpenAI Responses Client with a hosted MCP server Python: Sample on integration of Azure OpenAI Responses Client with a hosted MCP server Oct 6, 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 introduces a sample demonstrating integration of Azure OpenAI Responses Client with hosted Model Context Protocol (MCP) servers. The example shows how to connect to an MCP server and use it as a tool for Azure OpenAI agents to handle documentation-related queries.

Key changes:

  • Added a new Python sample file showing MCP server integration
  • Demonstrates authentication with Azure CLI credentials
  • Provides example usage of MCPStreamableHTTPTool with Azure OpenAI agents

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

…ver can be replaced by any other desired MCP server
@saurabhvartak1982

Copy link
Copy Markdown
Contributor Author

Fixed the new-line issue

@eavanvalkenburg eavanvalkenburg changed the title Python: Sample on integration of Azure OpenAI Responses Client with a hosted MCP server Python: Sample on integration of Azure OpenAI Responses Client with a local MCP server Oct 6, 2025
…nses_client_with_local_mcp.py

Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
@eavanvalkenburg
eavanvalkenburg added this pull request to the merge queue Oct 7, 2025
Merged via the queue into microsoft:main with commit 49f2535 Oct 7, 2025
23 checks passed
ReubenBond pushed a commit to ReubenBond/agent-framework that referenced this pull request Oct 28, 2025
… local MCP server (microsoft#1215)

* added a sample on integration of Azure OpenAI Responses Client with hosted Model Context Protocol (MCP)

* added additional comments mentioning that the Microsoft Learn MCP server can be replaced by any other desired MCP server

* corrected the MCP server type to local

* added a newline at the end

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

Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>

---------

Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
arisng pushed a commit to arisng/agent-framework that referenced this pull request Feb 2, 2026
… local MCP server (microsoft#1215)

* added a sample on integration of Azure OpenAI Responses Client with hosted Model Context Protocol (MCP)

* added additional comments mentioning that the Microsoft Learn MCP server can be replaced by any other desired MCP server

* corrected the MCP server type to local

* added a newline at the end

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

Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>

---------

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

Labels

python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants