MCPDotNet Extensions SemanticKernel

v1.0.0Developer Toolsstable

Microsoft SemanticKernel integration for the Model Context Protocol (MCP). Enables seamless use of MCP tools as AI functions.

mcpdotnet-extensions-semantickernelmcpai-integration
Share:
38
Stars
0
Downloads
0
Weekly
0/5

What is MCPDotNet Extensions SemanticKernel?

MCPDotNet Extensions SemanticKernel is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to microsoft semantickernel integration for the model context protocol (mcp). enables seamless use of mcp tools as ai functions.

Microsoft SemanticKernel integration for the Model Context Protocol (MCP). Enables seamless use of MCP tools as AI functions.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Microsoft SemanticKernel integration for the Model Context P

Use Cases

Integrate MCP tools with Microsoft SemanticKernel for seamless AI function execution.
StefH

Maintainer

LicenseMIT
Languagec#
Versionv1.0.0
UpdatedMar 15, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcpdotnet-extensions-semantickernel

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use MCPDotNet Extensions SemanticKernel

McpDotNet.Extensions.SemanticKernel is a .NET library that integrates the Model Context Protocol with Microsoft Semantic Kernel, enabling C# applications to register MCP server tools as native Semantic Kernel plugin functions. It supports both stdio-based MCP servers and SSE (HTTP) connections, and can automatically read server definitions from a Claude Desktop configuration file. This allows .NET developers to enrich their Semantic Kernel AI pipelines with the full ecosystem of MCP tools without writing custom adapters.

Prerequisites

  • .NET 8 or .NET 9 SDK installed
  • NuGet packages: Stef.ModelContextProtocol.SemanticKernel and Stef.ModelContextProtocol.Schema
  • An OpenAI API key (OPENAI_API_KEY) for Semantic Kernel's chat completion backend
  • At least one MCP server available (stdio or SSE), such as @modelcontextprotocol/server-github
1

Create a new .NET project

Create a console or worker service project that will host your Semantic Kernel pipeline.

dotnet new console -n MySemanticKernelApp
cd MySemanticKernelApp
2

Add the NuGet packages

Add the McpDotNet SemanticKernel extension and schema packages from NuGet.

dotnet add package Stef.ModelContextProtocol.SemanticKernel
dotnet add package Stef.ModelContextProtocol.Schema
3

Set your OpenAI API key

Provide your OpenAI API key as an environment variable or via .NET user secrets for Semantic Kernel's chat completion to work.

export OPENAI_API_KEY=sk-...
4

Register MCP tools from a stdio server

In your C# code, build a Semantic Kernel instance and call AddMcpFunctionsFromStdioServerAsync to register all tools from a stdio MCP server as plugin functions.

await kernel.Plugins.AddMcpFunctionsFromStdioServerAsync(
    "GitHub", "npx", new[] { "-y", "@modelcontextprotocol/server-github" });
5

Or load servers from Claude Desktop config

Alternatively, call AddToolsFromClaudeDesktopConfigAsync to automatically discover and register all MCP servers listed in your claude_desktop_config.json file.

await kernel.Plugins.AddToolsFromClaudeDesktopConfigAsync(cancellationToken: cts.Token);
6

Enable automatic function calling and invoke

Configure Semantic Kernel to use automatic function choice behavior so it can invoke MCP tools when responding to prompts.

var settings = new OpenAIPromptExecutionSettings
{
    FunctionChoiceBehavior = FunctionChoiceBehavior.Auto()
};
var result = await kernel.InvokePromptAsync("List my open GitHub issues", new(settings));

MCPDotNet Extensions SemanticKernel Examples

Client configuration

Claude Desktop config that the library can read to discover MCP servers automatically via AddToolsFromClaudeDesktopConfigAsync.

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

Prompts to try

Example Semantic Kernel prompts that trigger MCP tool calls with automatic function calling enabled.

- "List all open issues in my GitHub repository"
- "Search for files containing 'TODO' in the repository"
- "Create a GitHub issue titled 'Fix login bug' with details about the authentication problem"
- "What tools are available from the connected MCP servers?"

Troubleshooting MCPDotNet Extensions SemanticKernel

OPENAI_API_KEY not found or unauthorized error

Set the environment variable before running your app: export OPENAI_API_KEY=sk-... on macOS/Linux or $env:OPENAI_API_KEY='sk-...' in PowerShell. Ensure the key is valid and has sufficient quota.

MCP server fails to start via stdio

Ensure the target command (e.g. npx) is available in PATH and the MCP server package is accessible. Test by running the command manually: npx -y @modelcontextprotocol/server-github

AddToolsFromClaudeDesktopConfigAsync finds no servers

Verify that claude_desktop_config.json exists at the default Claude Desktop path for your OS and contains a valid mcpServers object. The library reads this file at the standard platform location.

Frequently Asked Questions about MCPDotNet Extensions SemanticKernel

What is MCPDotNet Extensions SemanticKernel?

MCPDotNet Extensions SemanticKernel is a Model Context Protocol (MCP) server that microsoft semantickernel integration for the model context protocol (mcp). enables seamless use of mcp tools as ai functions. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install MCPDotNet Extensions SemanticKernel?

Follow the installation instructions on the MCPDotNet Extensions SemanticKernel GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with MCPDotNet Extensions SemanticKernel?

MCPDotNet Extensions SemanticKernel works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is MCPDotNet Extensions SemanticKernel free to use?

Yes, MCPDotNet Extensions SemanticKernel is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "mcpdotnet-extensions-semantickernel": { "command": "npx", "args": ["-y", "mcpdotnet-extensions-semantickernel"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use MCPDotNet Extensions SemanticKernel?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides