.NET: Add Foundry Agents Tool Sample - Local MCP#3703
Merged
rogerbarreto merged 5 commits intomicrosoft:mainfrom Feb 10, 2026
Merged
.NET: Add Foundry Agents Tool Sample - Local MCP#3703rogerbarreto merged 5 commits intomicrosoft:mainfrom
rogerbarreto merged 5 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new .NET GettingStarted “FoundryAgents” sample that demonstrates using an MCP server from the client side (local MCP over HTTP) and passing the resolved tools into an Azure Foundry Agent.
Changes:
- Introduces a new Step27 sample that connects to the Microsoft Learn MCP endpoint via
HttpClientTransportand lists/uses discovered tools. - Wraps MCP tools with a delegating function to log tool invocations locally.
- Adds README + project file for running the new sample.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step27_LocalMCP/README.md | Documents prerequisites, configuration, and expected behavior for the local MCP sample. |
| dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step27_LocalMCP/Program.cs | Implements the sample: connect to MCP over HTTP, wrap tools for logging, create/run/delete agent. |
| dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step27_LocalMCP/FoundryAgents_Step27_LocalMCP.csproj | Adds the executable project targeting net10.0 with required package/project references. |
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step27_LocalMCP/Program.cs
Outdated
Show resolved
Hide resolved
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step27_LocalMCP/Program.cs
Outdated
Show resolved
Hide resolved
westey-m
reviewed
Feb 10, 2026
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step27_LocalMCP/README.md
Show resolved
Hide resolved
westey-m
reviewed
Feb 10, 2026
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step27_LocalMCP/Program.cs
Outdated
Show resolved
Hide resolved
westey-m
approved these changes
Feb 10, 2026
SergeyMenshykh
approved these changes
Feb 10, 2026
SergeyMenshykh
approved these changes
Feb 10, 2026
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
Description
Contribution Checklist