mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
1d301af7d2
* Add MCP-based skills support - Add AgentMcpSkill, AgentMcpSkillResource, AgentMcpSkillsSource, and McpSkillIndex to Microsoft.Agents.AI.Mcp - Add AgentSkillsProviderBuilderMcpExtensions for DI integration - Add Agent_Step06_McpBasedSkills sample project - Add unit tests for AgentMcpSkillsSource - Update solution file and project references Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove unnecessary [Experimental] attributes from MCP package The package is already alpha, so the [Experimental] attribute is redundant. Removed from both AgentSkillsProviderBuilderMcpExtensions and AgentMcpSkillsSource classes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Make Agent_Step06_McpBasedSkills self-contained and add to verify-samples Embed an internal MCP server (launched via --server flag as a child process) that serves skill://index.json and skill://unit-converter/SKILL.md resources, replacing the external MCP_SKILLS_ENDPOINT dependency. The sample now uses StdioClientTransport and a fixed prompt instead of an interactive loop. Added SampleDefinition to AgentsSamples.cs for automated verification. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Sort usings --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1d301af7d2
·
2026-05-27 18:38:57 +00:00
History
MCP-Based Agent Skills Sample
This sample demonstrates how to discover Agent Skills served over MCP with a ChatClientAgent.
What it demonstrates
- Hosting a small MCP server (in this same executable, launched with
--server) that exposes skill resources following the SEP-2640 convention. - Connecting an
McpClientto the embedded server via stdio transport. - Building an
AgentSkillsProviderviaUseMcpSkills(client), which readsskill://index.json(SEP-2640 canonical discovery) and constructs skills from the index entries. - The progressive disclosure pattern across MCP: advertise → load → read resources, exactly as for filesystem-backed skills.
Running the Sample
Prerequisites
- .NET 10.0 SDK
- Azure OpenAI endpoint with a deployed model
Setup
$env:AZURE_OPENAI_ENDPOINT="https://your-endpoint.openai.azure.com/"
$env:AZURE_OPENAI_DEPLOYMENT_NAME="gpt-5.4-mini"
Run
dotnet run