MCP Server Sample
@qmatteoq
关于 MCP Server Sample
This project demonstrates a Model Context Protocol (MCP) server and client implementation in .NET
基本信息
配置
工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is MCP Server Sample?
MCP Server Sample is a .NET demonstration of a Model Context Protocol (MCP) server and client for managing employee vacation days. It exposes vacation tracking, querying, and updating capabilities through MCP tools using SSE and stdio transports. This sample is intended for developers learning to implement MCP with .NET or TypeScript.
How to use MCP Server Sample?
Install the required prerequisites (.NET SDK 9.0 or Node.js) and start the Azurite Table service emulator. For the stdio sample, connect a client using dotnet run --project src/csharp/Stdio/MCP.Stdio.Server/MCP.Stdio.Server.csproj (C#) or node /src/ts/stdio/server/dist/app.js (TypeScript). For the SSE sample, update appsettings.json with your Azure OpenAI connection string, then run dotnet run --project MCP.SSE.AppHost/MCP.SSE.AppHost.csproj and open http://localhost:5291/ in a browser.
Key features of MCP Server Sample
- MCP server for tracking, querying, and updating vacation balances
- Two transport layers: HTTP Streaming (SSE) and standard I/O (stdio)
- Implementations in both .NET and TypeScript
- Blazor web client using Semantic Kernel
- Integration with Teams AI library
- Uses Azurite emulator for Azure Table storage
Use cases of MCP Server Sample
- Learn how to build and run an MCP server with .NET
- Prototype a vacation management backend service
- Test MCP clients against a real server (e.g., Visual Studio Code, AI Toolkit)
- Integrate MCP tools into Copilot Studio or Semantic Kernel agents
- Experiment with SSE vs. stdio transport in MCP
FAQ from MCP Server Sample
What transports does MCP Server Sample support?
The sample includes both SSE (HTTP Streaming) and stdio (standard input/output) transport layers.
What are the prerequisites to run the sample?
You need .NET SDK 9.0, Node.js, Visual Studio Code, and the Azurite extension for the table storage emulator.
How do I run the SSE sample?
Open the appsettings.json in the MCP.SSE.AppHost project, set the openAiConnectionName with your Azure OpenAI connection string, start Azurite, and run dotnet run --project MCP.SSE.AppHost/MCP.SSE.AppHost.csproj. Then open http://localhost:5291/ to use the Blazor UI.
How do I connect a client to the stdio server?
Use the command dotnet with arguments run --project src/csharp/Stdio/MCP.Stdio.Server/MCP.Stdio.Server.csproj for the .NET version, or node with /src/ts/stdio/server/dist/app.js for TypeScript.
Is there a TypeScript version of the sample?
Yes, the repository contains a TypeScript implementation under the src/ts/ folder.
其他 分类下的更多 MCP 服务器
MCP Go 🚀
mark3labsA Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
Unity MCP ✨
justinpbarnettUnity MCP acts as a bridge between AI assistants and your Unity Editor. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.
Inbox Zero AI
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
FastMCP v2 🚀
jlowin🚀 The fast, Pythonic way to build MCP servers and clients.
Nginx UI
0xJackyYet another WebUI for Nginx
评论