Submit

McpClientServerExample

@dks50217

A simple .NET implementation of an MCP (Model Context Protocol) Client and Server example. This project demonstrates how to create and interact with an MCP server using custom tools, natural language prompts, and standard I/O transport.
Overview

What is McpClientServerExample?

McpClientServerExample is a simple .NET implementation of a Model Context Protocol (MCP) Client and Server example, demonstrating how to create and interact with an MCP server using custom tools, natural language prompts, and standard I/O transport.

How to use McpClientServerExample?

To use McpClientServerExample, install the .NET 8.0 SDK, set your OpenAI API key, and run the client project using the command: dotnet run --project client/McpClient.csproj.

Key features of McpClientServerExample?

  • Client (McpClient) communicates with the server using ModelContextProtocol.Client.
  • Supports OpenAI GPT models for conversation.
  • Provides a list of tools and supports tool function calls.
  • Server (McpServer) offers MCP server functionality with standard input/output communication.
  • Built-in tools like Echo and ReverseEcho for user interaction.

Use cases of McpClientServerExample?

  1. Building custom client-server applications using MCP.
  2. Integrating AI models for enhanced user interaction.
  3. Demonstrating communication protocols in .NET applications.

FAQ from McpClientServerExample?

  • What are the requirements to run this project?

You need the .NET 8.0 SDK and an OpenAI API key if using GPT models.

  • Is there any built-in functionality in the server?

Yes, the server includes built-in tools like Echo and ReverseEcho for testing.

  • Can I modify the client or server?

Yes, the project is open-source and can be modified as per your needs.

© 2025 MCP.so. All rights reserved.

Build with ShipAny.