This workspace contains complete MCP (Model Context Protocol) examples in .NET C#, from basic scenarios to production-ready deployments.
Overview
This workspace contains complete MCP (Model Context Protocol) examples in .NET C#, from basic scenarios to production-ready deployments. : Wrap your existing Web API as an MCP server using the → See MCP_PROXY_PATTERN.md : TUTORIAL.md — Complete guide with demos, scenarios, and deployment instructions. - MCPServer/SseServer: ASP.NET Core SSE-based MCP endpoint that proxies public APIs. - MCPServer/StdIoServer: Console STDIO-based MCP server that reads JSON requests from stdin and writes JSON responses to stdout. - MCPClient/Client: Console client showing how to call the SSE server and how to run and talk to the STDIO server. Public APIs used in examples: - https://api.agify.io (predict age by name) - https://jsonplaceholder.typicode.com/posts (sample posts) See the MCPServer and MCPClient folders for run/build instructions and sample requests. Essential guides: - — Overview with 5-min quick demos and showcase narrative.
README
MCP .NET C# Example Projects
This workspace contains complete MCP (Model Context Protocol) examples in .NET C#, from basic scenarios to production-ready deployments.
⭐ Most Common Use Case: Wrap your existing Web API as an MCP server using the Proxy Pattern → See MCP_PROXY_PATTERN.md
Start here: TUTORIAL.md — Complete guide with demos, scenarios, and deployment instructions.
Structure
- MCPServer/SseServer: ASP.NET Core SSE-based MCP endpoint that proxies public APIs.
- MCPServer/StdIoServer: Console STDIO-based MCP server that reads JSON requests from stdin and writes JSON responses to stdout.
- MCPClient/Client: Console client showing how to call the SSE server and how to run and talk to the STDIO server.
Public APIs used in examples:
- https://api.agify.io (predict age by name)
- https://jsonplaceholder.typicode.com/posts (sample posts)
See the MCPServer and MCPClient folders for run/build instructions and sample requests.
Documentation
Essential guides:
- TUTORIAL.md — Overview with 5-min quick demos and showcase narrative.
- MCP_PROXY_PATTERN.md — Most common pattern: Wrap your existing Web API as MCP (with docker-compose example).
- MCP_SCENARIOS.md — All MCP scenarios covered: local STDIO vs remote SSE, authentication, rate-limiting, deployment models.
- LOCAL_VS_REMOTE.md — Comprehensive comparison of when to use STDIO (local) vs SSE (remote); cost, latency, scalability analysis.
- REMOTE_DEPLOYMENT.md — Step-by-step guide for deploying SSE server to cloud: Docker, Kubernetes, Azure, AWS, security best practices.
- GITHUB_COPILOT_CONFIG.md — How to configure Copilot or any agent to call your MCP server.
Configuration examples:
- mcp-configs/stdio-config.json — Local STDIO MCP configuration
- mcp-configs/sse-config.json — Local SSE MCP configuration
- mcp-configs/remote-sse-api-key.json — Remote SSE with API key auth
- mcp-configs/remote-sse-jwt.json — Remote SSE with JWT bearer token auth
Deployment:
- docker-compose.yml — Run entire stack (backend API + proxy) locally
- MCPServer/CustomWebApi/Dockerfile — Backend API image
- MCPServer/SseServerApiProxy/Dockerfile — Proxy image
- MCPServer/SseServer/Dockerfile — Direct SSE server image
Install
This server does not publish a one-line install command.
Open the repository installation guide New to MCP? Start with the mcpskill.org guide →