MCP.so
登录

McpClientServerExample MCP Server

@dks50217

基本信息

分类

其他

许可证

MIT license

传输方式

stdio

作者

dks50217

关于 McpClientServerExample MCP Server

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.

McpClientServerExample MCP Server 配置

暂无标准配置

该服务器的 README 中没有可解析的 MCP 配置块,请前往代码仓库查看安装说明。

代码仓库

McpClientServerExample MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is McpClientServerExample?

McpClientServerExample is a sample project that demonstrates client-server communication using the Model Context Protocol (MCP). It includes a custom McpClient and an McpServer, built without relying on the Claude Client App.

How to use McpClientServerExample?

Clone the repository and ensure you have .NET 8.0 SDK and an OpenAI API key (if using GPT models). Set the OPENAI_API_KEY environment variable, then run the client with dotnet run --project client/McpClient.csproj.

Key features of McpClientServerExample

  • Client uses ModelContextProtocol.Client to communicate with the server.
  • Supports OpenAI GPT models for conversation and tool calling.
  • Server uses ModelContextProtocol.Server and communicates via standard input/output.
  • Provides built-in tools: Echo (returns user input) and ReverseEcho (returns reversed input).

Use cases of McpClientServerExample

  • Learning how to build a custom MCP client without a dedicated chat app.
  • Testing MCP server capabilities such as tool listing and invocation.
  • Prototyping an MCP-based assistant that combines GPT with local tools.

常见问题

1

What are the system requirements?

.NET 8.0 SDK and, optionally, an OpenAI API key for GPT model usage.

2

How do I set up the OpenAI API key?

Export it as an environment variable: `export OPENAI_API_KEY=your_api_key_here`.

3

How do I run the client?

Run `dotnet run --project client/McpClient.csproj` in the project root.

4

What tools does the server provide?

The server provides `Echo` (returns the input as-is) and `ReverseEcho` (returns the reversed input).

5

Is this project intended for use with the Claude Client App?

No, it is designed as an example of using a custom client instead of the Claude Client App.

评论

其他 分类下的更多 MCP 服务器