Skip to content

.NET: Add MCP-based skills support (skill-md type)#6108

Merged
semenshi merged 5 commits into
microsoft:mainfrom
semenshi:feature/mcp-based-skills
May 27, 2026
Merged

.NET: Add MCP-based skills support (skill-md type)#6108
semenshi merged 5 commits into
microsoft:mainfrom
semenshi:feature/mcp-based-skills

Conversation

@semenshi

Copy link
Copy Markdown
Contributor

Summary

This PR adds support for discovering and invoking agent skills via MCP (Model Context Protocol) servers. It introduces the AgentMcpSkill, AgentMcpSkillsSource, and related types to the Microsoft.Agents.AI.Mcp package. Currently, MCP skills of the skill-md type are supported.

Changes

New types (Microsoft.Agents.AI.Mcp/Skills/)

  • AgentMcpSkill - Represents an agent skill backed by an MCP server tool
  • AgentMcpSkillResource - Represents a resource associated with an MCP skill
  • AgentMcpSkillsSource - Discovers and provides skills from MCP servers
  • AgentSkillsProviderBuilderMcpExtensions - Extension methods for registering MCP skill sources via the builder pattern
  • McpJsonContext - JSON serialization context for MCP skill types
  • McpSkillIndex - Index for efficient skill lookup

- 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>
Copilot AI review requested due to automatic review settings May 27, 2026 11:47
@moonbox3 moonbox3 added documentation Improvements or additions to documentation .NET labels May 27, 2026

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@github-actions github-actions Bot changed the title Add MCP-based skills support (skill-md type) .NET: Add MCP-based skills support (skill-md type) May 27, 2026
@semenshi semenshi self-assigned this May 27, 2026
@semenshi semenshi moved this to In Review in Agent Framework May 27, 2026
@moonbox3

Copy link
Copy Markdown
Contributor

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
TOTAL36634433388% 
report-only-changed-files is enabled. No files were changed during this commit :)

Python Unit Test Overview

Tests Skipped Failures Errors Time
7287 34 💤 0 ❌ 0 🔥 1m 55s ⏱️

@semenshi

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree company="Microsoft"

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>
…ples

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>
@SergeyMenshykh SergeyMenshykh self-assigned this Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation .NET

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants