MCP .NET Client Server
This project demonstrates a Model Context Protocol (MCP) server and client implementation in .NET
What is MCP .NET Client Server?
MCP .NET Client Server is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to this project demonstrates a model context protocol (mcp) server and client implementation in .net
This project demonstrates a Model Context Protocol (MCP) server and client implementation in .NET
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- This project demonstrates a Model Context Protocol (MCP) ser
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-client-server-for-agentsConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use MCP .NET Client Server
MCP .NET Client Server is a reference implementation demonstrating Model Context Protocol server and client communication in .NET, built around a vacation-day management use case. It supports both stdio transport (console-based) and SSE/HTTP Streaming transport using .NET Aspire, Blazor, and Semantic Kernel. Developers use it as a starting point for building production MCP integrations in C# or TypeScript, or to learn how MCP tools are exposed and consumed across different transport layers.
Prerequisites
- .NET SDK 9.0 or later installed on your machine
- Node.js (if running the TypeScript variant of the sample)
- Visual Studio Code with the Azurite extension (for Table Storage emulation)
- Azure OpenAI credentials if running the SSE sample (AZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT)
- An MCP-compatible client such as Claude Desktop, VS Code AI Toolkit, or a custom app
Clone the repository
Clone the sample project to your local machine so you have both the C# and TypeScript versions available.
git clone https://github.com/qmatteoq/MCP-Client-Server-for-agents.git
cd MCP-Client-Server-for-agentsStart the Azurite Table Storage emulator
Open the project in VS Code and start the Azurite Table Service emulator via the status bar button or the command palette (Ctrl+Shift+P → 'Azurite: Start Table Service'). This emulates the Azure Table Storage used to persist vacation data.
Run the stdio server (.NET)
Navigate to the Stdio folder and start the .NET console server. Any MCP client can connect by pointing to this command and arguments.
dotnet run --project src/csharp/Stdio/MCP.Stdio.Server/MCP.Stdio.Server.csprojConfigure your MCP client
Add the server to your MCP client configuration using the dotnet run command as the server process. The server exposes tools for listing employees, querying vacation balances, and charging vacation days.
{
"mcpServers": {
"mcp-dotnet-sample": {
"command": "dotnet",
"args": ["run", "--project", "/path/to/src/csharp/Stdio/MCP.Stdio.Server/MCP.Stdio.Server.csproj"]
}
}
}(Optional) Run the SSE sample with Blazor frontend
For the full HTTP Streaming demo with a Blazor UI, update appsettings.json with your Azure OpenAI connection string, then start the Aspire host. A browser window opens showing the dashboard.
# Update appsettings.json openAiConnectionName first, then:
dotnet run --project MCP.SSE.AppHost/MCP.SSE.AppHost.csprojBuild the TypeScript server (optional)
If you prefer the TypeScript variant of the stdio server, install dependencies and build before running.
cd src/ts/stdio/server
npm install
npm run buildMCP .NET Client Server Examples
Client configuration (stdio, .NET)
MCP client config pointing to the .NET stdio server for vacation management tools.
{
"mcpServers": {
"mcp-dotnet-sample": {
"command": "dotnet",
"args": ["run", "--project", "/path/to/src/csharp/Stdio/MCP.Stdio.Server/MCP.Stdio.Server.csproj"]
}
}
}Prompts to try
Example prompts that exercise the vacation-management MCP tools exposed by the server.
- "Give me a list of all employees and their remaining vacation days"
- "How many vacation days does Alice Johnson have left?"
- "Charge 5 vacation days to Alice Johnson"
- "Show the vacation balances for the entire engineering team"Troubleshooting MCP .NET Client Server
Server fails to start with a storage error
Make sure the Azurite Table Service emulator is running in VS Code before starting the server. Check the Azurite output panel for errors.
TypeScript server not found after build
Ensure you ran 'npm run build' inside src/ts/stdio/server and that the compiled output exists at src/ts/stdio/server/dist/app.js before pointing your MCP client to it.
SSE sample browser page shows no data
Verify the openAiConnectionName in appsettings.json is set to a valid Azure OpenAI connection string in the format: Endpoint=https://<endpoint>.openai.azure.com/;Key=<key>
Frequently Asked Questions about MCP .NET Client Server
What is MCP .NET Client Server?
MCP .NET Client Server is a Model Context Protocol (MCP) server that this project demonstrates a model context protocol (mcp) server and client implementation in .net It connects AI assistants to external tools and data sources through a standardized interface.
How do I install MCP .NET Client Server?
Follow the installation instructions on the MCP .NET Client Server GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with MCP .NET Client Server?
MCP .NET Client Server works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is MCP .NET Client Server free to use?
Yes, MCP .NET Client Server is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
MCP .NET Client Server Alternatives — Similar Developer Tools Servers
Looking for alternatives to MCP .NET Client Server? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
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.
Set Up MCP .NET Client Server in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use MCP .NET Client Server?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.