CrestApps.AgentSkills.Mcp
1.0.0-preview-0009
dotnet add package CrestApps.AgentSkills.Mcp --version 1.0.0-preview-0009
NuGet\Install-Package CrestApps.AgentSkills.Mcp -Version 1.0.0-preview-0009
<PackageReference Include="CrestApps.AgentSkills.Mcp" Version="1.0.0-preview-0009" />
<PackageVersion Include="CrestApps.AgentSkills.Mcp" Version="1.0.0-preview-0009" />
<PackageReference Include="CrestApps.AgentSkills.Mcp" />
paket add CrestApps.AgentSkills.Mcp --version 1.0.0-preview-0009
#r "nuget: CrestApps.AgentSkills.Mcp, 1.0.0-preview-0009"
#:package CrestApps.AgentSkills.Mcp@1.0.0-preview-0009
#addin nuget:?package=CrestApps.AgentSkills.Mcp&version=1.0.0-preview-0009&prerelease
#tool nuget:?package=CrestApps.AgentSkills.Mcp&version=1.0.0-preview-0009&prerelease
CrestApps.AgentSkills.Mcp
A generic, reusable MCP (Model Context Protocol) engine that discovers and exposes Agent Skills as MCP Prompts and Resources. Built on the MCP C# SDK.
For Orchard Core–specific skills, see the companion package CrestApps.AgentSkills.Mcp.OrchardCore, which builds on top of this project and bundles both the framework-only Orchard Core skills and the CrestApps OrchardCore module skills.
Install
dotnet add package CrestApps.AgentSkills.Mcp
Usage
Register Skills with an MCP Server
builder.Services.AddMcpServer(mcp =>
{
mcp.AddAgentSkills();
});
Register Services Only (No Eager Loading)
To register the skill services in DI without eagerly loading them:
builder.Services.AddAgentSkillServices();
The consumer is then responsible for resolving IMcpPromptProvider and IMcpResourceProvider and attaching them to the MCP server.
With Custom Path
builder.Services.AddMcpServer(mcp =>
{
mcp.AddAgentSkills(options =>
{
options.Path = "./my-skills";
});
});
Resolving Providers from DI
The file store and providers are registered as singletons and can be injected:
public sealed class MyService
{
private readonly IMcpPromptProvider _promptProvider;
private readonly IMcpResourceProvider _resourceProvider;
public MyService(
IMcpPromptProvider promptProvider,
IMcpResourceProvider resourceProvider)
{
_promptProvider = promptProvider;
_resourceProvider = resourceProvider;
}
public async Task ListPromptsAsync()
{
var prompts = await _promptProvider.GetPromptsAsync();
// ...
}
}
Supported Skill Formats
Skills are discovered from subdirectories under the configured skills path. Each skill directory must contain one of the following skill definition files:
Markdown (.md)
A SKILL.md file with YAML front-matter:
---
name: my-skill
description: A description of my skill.
---
# Prompt content
This is the body that becomes the MCP prompt.
YAML (.yaml / .yml)
A SKILL.yaml or SKILL.yml file:
name: my-skill
description: A description of my skill.
body: |
# Prompt content
This is the body that becomes the MCP prompt.
Required Fields
Both formats require:
| Field | Description |
|---|---|
name |
Unique skill identifier |
description |
Human-readable description |
The body field (or Markdown body after front-matter) provides the prompt content.
Reference Files
Each skill directory may include a references/ subdirectory containing additional .md files. These are exposed as MCP Resources:
.agents/skills/
my-skill/
SKILL.md (or SKILL.yaml / SKILL.yml)
references/
example1.md
example2.md
Links
What Gets Exposed
| MCP Type | Source | Description |
|---|---|---|
| Prompts | Skill file body content | Prompt templates from SKILL.md body or SKILL.yaml body field |
| Resources | Skill files | Full skill file content (metadata + body) |
| Resources | references/*.md files |
Additional reference documents for each skill |
Architecture
Services
| Service | Lifetime | Purpose |
|---|---|---|
IAgentSkillFilesStore |
Singleton | Abstraction for skill file access |
IMcpPromptProvider |
Singleton | Reads skill files → cached McpServerPrompt instances |
IMcpResourceProvider |
Singleton | Reads skill + reference files → cached McpServerResource instances |
Parsers
| Parser | Formats | Purpose |
|---|---|---|
SkillFrontMatterParser |
.md |
Parses YAML front-matter from Markdown files |
SkillYamlParser |
.yaml, .yml |
Parses YAML skill definitions |
SkillFileParser |
All | Unified parser that detects format and delegates |
How It Works
- Place skill directories under
.agents/skills/(or a custom path). - Each skill directory contains a
SKILL.md,SKILL.yaml, orSKILL.ymlfile. AddAgentSkills()registersIAgentSkillFilesStore,IMcpPromptProvider, andIMcpResourceProvideras singletons.- At runtime, providers discover skill files, parse metadata, and create MCP prompts/resources.
- Results are cached after the first call for optimal performance.
- MCP clients can discover and use these prompts and resources via the MCP protocol.
Development
Build
dotnet build
Run Tests
dotnet test
Validate Skills Locally
Place your skill files in a directory and use the test infrastructure:
var fileStore = new PhysicalSkillFileStore("/path/to/skills");
var provider = new SkillPromptProvider(fileStore, NullLogger<SkillPromptProvider>.Instance);
var prompts = await provider.GetPromptsAsync();
Relationship to Other Packages
CrestApps.AgentSkills.Mcp ← Generic, reusable MCP engine (this package)
This is the base package that other skill distribution packages can build upon.
Requirements
- .NET 10.0+
- MCP C# SDK (
ModelContextProtocolNuGet package) - An MCP server host (e.g., ASP.NET Core with
ModelContextProtocol.AspNetCore)
License
This project is licensed under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.8)
- ModelContextProtocol (>= 1.3.0)
- YamlDotNet (>= 18.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on CrestApps.AgentSkills.Mcp:
| Package | Downloads |
|---|---|
|
CrestApps.AgentSkills.Mcp.OrchardCore
Exposes Orchard Core agent skills to MCP servers at runtime. Loads skills from the package output and registers them as MCP prompts and resources. Built on top of CrestApps.AgentSkills.Mcp. |
|
|
CrestApps.OrchardCore.AgentSkills.Mcp
Exposes Orchard Core agent skills to MCP servers at runtime. Loads skills from the package output and registers them as MCP prompts and resources. Built on top of CrestApps.AgentSkills.Mcp. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-preview-0009 | 506 | 5/28/2026 |
| 1.0.0-preview-0008 | 177 | 5/22/2026 |
| 1.0.0-preview-0007 | 68 | 5/19/2026 |
| 1.0.0-preview-0006 | 59 | 5/19/2026 |
| 1.0.0-preview-0005 | 224 | 5/6/2026 |
| 1.0.0-preview-0004 | 1,043 | 3/23/2026 |
| 1.0.0-preview-0003 | 88 | 3/22/2026 |
| 1.0.0-preview-0002 | 243 | 3/15/2026 |
| 1.0.0-preview-0001 | 858 | 2/19/2026 |
| 1.0.0-preview.91 | 57 | 5/22/2026 |
| 1.0.0-preview.11 | 59 | 5/22/2026 |
| 1.0.0-preview.10 | 121 | 5/19/2026 |
| 1.0.0-preview.9 | 64 | 5/22/2026 |
| 1.0.0-preview.8 | 60 | 5/19/2026 |
| 1.0.0-preiew-0002 | 70 | 2/19/2026 |
| 1.0.0-preiew-0001 | 77 | 2/19/2026 |
| 1.0.0-beta-0010 | 92 | 2/18/2026 |
| 1.0.0-beta-0009 | 66 | 2/18/2026 |
| 1.0.0-beta-0008 | 68 | 2/17/2026 |
| 1.0.0-beta-0007 | 180 | 2/12/2026 |