A sample MCP server and client built with c#/.net
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"csharp-mcp-client-server-demo": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
This project is a simple implementation of a Model Context Protocol (MCP) system using .NET, consisting of two components:
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in developer-tools
Manage Supabase projects — databases, auth, storage, and edge functions
XcodeBuildMCP provides tools for Xcode project management, simulator management, and app utilities.
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
Asynchronous coordination layer for AI coding agents: identities, inboxes, searchable threads, and advisory file leases over FastMCP + Git + SQLite
MCP Security Weekly
Get CVE alerts and security updates for Csharp Mcp Client Server Demo and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
🧩 MCP Client–Server Demo (.NET)
This project is a simple implementation of a Model Context Protocol (MCP) system using .NET, consisting of two components:
This demo follows Microsoft’s Model Context Protocol for Beginners and is meant as a learning project for understanding how MCP clients and servers communicate in .NET.
The Model Context Protocol (MCP) defines how AI models and tools can exchange structured messages over a standardized transport layer (like stdio or SSE).
This demo helps you understand:
.NET and dependency injectionmcp-dotnet-demo/
│
├── Client/ # The MCP client that sends requests and interacts with the LLM
└── Server/ # The MCP server that exposes tools and handles requests
git clone https://github.com/<your-username>/mcp-dotnet-demo.git
cd mcp-dotnet-demo
Make sure you have the following installed:
npx @modelcontextprotocol/inspector)cd Server
dotnet build
dotnet run
The server will start and listen via stdio transport.
It exposes basic MCP tools defined in your C# project.
In another terminal:
cd Client
dotnet build
dotnet run
The client will connect to the MCP server and send messages to interact with the LLM.
You should see structured request/response messages printed in the console.
You can visualize the client-server interaction using the MCP Inspector tool:
npx @modelcontextprotocol/inspector dotnet run --project ./Server
This project is provided for educational and demo purposes.
See the MCP for Beginners License for reference.