SM

stefh/mcpdotnet.extensions.semantickernel

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

40 stars 14 forks 품질 56 트렌드 16MIT

stefh/mcpdotnet.extensions.semantickernel는 https://github.com/stefh/mcpdotnet.extensions.semantickernel.에서 수입된 MCP 서버 후보입니다

개요

stefh/mcpdotnet.extensions.semantickernel는 https://github.com/stefh/mcpdotnet.extensions.semantickernel.에서 수입된 MCP 서버 후보입니다

개요(AI 번역)

모델ContextProtocol.SemanticKernel

csharp-sdk를 사용하여 Model Context Protocol에 Microsoft SemanticKernel 통합. MCP 도구의 원활한 사용 가능

[!노트] 이 프로젝트는 미리 보기에 있습니다; 끊는 변화는 사전 통지 없이 소개될 수 있습니다.

☸ NuGet 패키지

인포메이션 인포메이션 Stef.ModelContextProtocol입니다. SemanticKernel |한국어 Stef.ModelContextProtocol.Schema|한국어

개요

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

특정 MCP 기능/툴을 등록하는 연장 방법을 사용하십시오

등록 단일 기능 또는 도구

Claude 데스크톱 설정에서 MCP Server(s) 등록

Claude Desktop에 등록된 모든 Stdio MCP Server를 등록할 수도 있습니다.

Full Full Stdio 예제

코드

결과

전체 SSE (Server-Sent Events) 이름 *

코드

결과

. 참고

스폰서

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

ModelContextProtocol.SemanticKernel

Microsoft SemanticKernel integration for the Model Context Protocol using the csharp-sdk. Enables seamless use of MCP tools as AI functions.

[!NOTE] This project is in preview; breaking changes can be introduced without prior notice.

📦 NuGet packages

Stef.ModelContextProtocol.SemanticKernel
Stef.ModelContextProtocol.Schema

Overview

---
title: "Overview"
---

graph LR;
    SK[Semantic Kernel'OpenAI'] 
    MCPClient[MCPClient'Function Calling']
    MCPServer[Local MCP Server'server-github'] 
    GitHub[GitHub]

    SK  MCPClient
    MCPClient  MCPServer
    MCPServer  GitHub

⚙️ Usage

Use an extension method to register a specific MCP function/tool

Register single function or tool

// 💡Stdio
await kernel.Plugins.AddMcpFunctionsFromStdioServerAsync("GitHub", "npx", ["-y", "@modelcontextprotocol/server-github"]);

// 💡SSE
await kernel.Plugins.AddMcpFunctionsFromSseServerAsync("GitHub", new Uri("http://localhost:12345"));

Register MCP Server(s) from Claude Desktop configuration

It’s also possible to register all Stdio MCP Servers which are registered in Claude Desktop:

// 💡Stdio MCP Tools defined in claude_desktop_config.json
await kernel.Plugins.AddToolsFromClaudeDesktopConfigAsync(cancellationToken: cts.Token);

💻 Full Stdio Example

Code

var builder = Kernel.CreateBuilder();
builder.Services.AddLogging(c => c.AddDebug().SetMinimumLevel(LogLevel.Trace));

builder.Services.AddOpenAIChatCompletion(
    serviceId: "openai",
    modelId: "gpt-4o-mini",
    apiKey: Environment.GetEnvironmentVariable("OPENAI_API_KEY")!);

var kernel = builder.Build();

// 💡 Add this line to enable MCP functions from a Stdio server named "Everything"
await kernel.Plugins.AddMcpFunctionsFromStdioServerAsync("Everything", "npx", ["-y", "@modelcontextprotocol/server-github"]);

var executionSettings = new OpenAIPromptExecutionSettings
{
    Temperature = 0,
    FunctionChoiceBehavior = FunctionChoiceBehavior.Auto()
};

var prompt = "Please call the echo tool with the string 'Hello Stef!' and give me the response as-is.";
var result = await kernel.InvokePromptAsync(prompt, new(executionSettings)).ConfigureAwait(false);
Console.WriteLine($"\n\n{prompt}\n{result}");

Result

GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →