Python: AzureAI Local MCP Sample#2616
Merged
giles17 merged 4 commits intomicrosoft:mainfrom Dec 4, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new Python sample demonstrating how to integrate Azure AI Agents with local Model Context Protocol (MCP) servers using the MCPStreamableHTTPTool. The sample illustrates two distinct patterns for tool configuration: defining tools at agent creation time versus providing them at runtime.
Key Changes:
- Adds
azure_ai_with_local_mcp.pysample showing agent-level and run-level MCP tool configuration - Demonstrates async context manager usage for both credential and MCP server lifecycle management
- Provides code examples for connecting to Microsoft Learn MCP server
python/samples/getting_started/agents/azure_ai/azure_ai_with_local_mcp.py
Outdated
Show resolved
Hide resolved
python/samples/getting_started/agents/azure_ai/azure_ai_with_local_mcp.py
Outdated
Show resolved
Hide resolved
python/samples/getting_started/agents/azure_ai/azure_ai_with_local_mcp.py
Outdated
Show resolved
Hide resolved
moonbox3
reviewed
Dec 4, 2025
python/samples/getting_started/agents/azure_ai/azure_ai_with_local_mcp.py
Show resolved
Hide resolved
Member
Python Test Coverage Report •
Python Unit Test Overview
|
||||||||||||||||||||||||||||||
moonbox3
approved these changes
Dec 4, 2025
dmytrostruk
approved these changes
Dec 4, 2025
arisng
pushed a commit
to arisng/agent-framework
that referenced
this pull request
Feb 2, 2026
* added azure ai local mcp sample * small fix * handling for local mcp * remove redundant local mcp handling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Adds AzureAI V2 Local MCP sample
Description
Contribution Checklist