mcp-example

mcp-example

3.2

If you are the rightful owner of mcp-example and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This document provides a structured overview of creating a Model Context Protocol (MCP) server in C#.

The Model Context Protocol (MCP) server in C# is a framework that allows developers to define and execute tools from the command line or other applications. This guide walks through the process of setting up a simple MCP server using C#, leveraging the .NET 9.0 SDK, and Visual Studio Code. The server is designed to handle requests and execute predefined tools, providing a flexible and efficient way to manage tasks. The example provided demonstrates the creation of an 'EchoTool' that can echo messages back to the client or reverse them. The setup involves creating a new console application, adding necessary dependencies, and configuring the server to run with standard input/output transport. The guide also includes troubleshooting tips and references for further reading.

Features

  • Simple setup using .NET 9.0 SDK and Visual Studio Code.
  • Ability to define and execute custom tools from the command line.
  • Logging configuration to manage output and error messages.
  • Support for standard input/output transport for server communication.
  • Example implementation of an 'EchoTool' for message handling.

Tools

  1. EchoTool

    Echoes the message back to the client or reverses it.