What is mpc-csharp-semantickernel?
mpc-csharp-semantickernel is a sample C# project that demonstrates integration of Microsoft Semantic Kernel with OpenAI’s GPT‑4o-mini and the official C# SDK for the Model Context Protocol. It is intended for developers exploring how to combine Semantic Kernel with MCP and includes a basic email‑sending tool via SMTP. The repository is explicitly marked as not maintained and is meant only as a quick example.
How to use mpc-csharp-semantickernel?
To use the sample: obtain an OpenAI API key; fill out the appsettings for both the WebAppMCPPoc and MCPServer projects (including SMTP server details); update the hardcoded email dictionary in Tools/EmailTool.cs with your own contacts; run the project (the default launch settings point to http://localhost:5109); then send a POST request to https://localhost:7113/chat with a JSON body containing a "text" field to trigger a chat and optionally send an email.
Key features of mpc-csharp-semantickernel
- Sample integration of Semantic Kernel with OpenAI and MCP C# SDK
- Sends emails via SMTP using a built‑in tool
- Email recipient list is hardcoded in a dictionary
- Uses GPT‑4o-mini as the default chat model
- Two separate projects: a web client and an MCP server
- Operates over HTTP on localhost with configurable ports
Use cases of mpc-csharp-semantickernel
- Learning how to combine Semantic Kernel with the Model Context Protocol
- Prototyping an AI assistant that can send emails through SMTP
- Testing OpenAI chat completions within a .NET MCP server
- Demonstrating a minimal multi‑project MCP setup with tool calling
コメント