How-To-Create-MCP-Server
Verified Safeby nisalgunawardhana
Overview
This project demonstrates how to set up a basic Model Context Protocol (MCP) server in .NET for interaction with AI tools like Copilot Chat.
Installation
dotnet run --project ${workspaceFolder}/HelloSriLankaServer/HelloSriLankaServer.csprojSecurity Notes
The provided code for the MCP server is minimal and does not contain obvious security vulnerabilities like 'eval', obfuscation, or hardcoded secrets. It utilizes standard .NET hosting and Model Context Protocol libraries. The `WithToolsFromAssembly()` method allows loading tools dynamically from the assembly, meaning any custom, user-added tools could introduce risks if not carefully developed. The server primarily uses stdio transport, reducing direct network exposure for the sample.
Similar Servers
remote-mcp-functions-typescript
Provides a remote Model Context Protocol (MCP) server using Azure Functions to host tools for AI agents, specifically for managing code snippets and simple greetings.
fsi-mcp-server
Provides a Model Context Protocol (MCP) server wrapper for F# Interactive (FSI) to enable AI-assisted development workflows with programmatic access to FSI sessions.
copilot-kit
Provides a curated collection of GitHub Copilot prompts, instructions, and configurations to enhance developer productivity and streamline AI-assisted programming workflows in VS Code.
MCPJira
Demonstrates building an MCP (Model-Controller-Proxy) server for Jira integration using .NET Core.