MCP.so
登录

LocalMcpServer

@DimonSmart

关于 LocalMcpServer

Local MCP server demo

基本信息

分类

其他

许可证

Unlicense license

运行时

c#

传输方式

stdio

发布者

DimonSmart

配置

暂无标准配置

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

代码仓库

工具

未检测到工具

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

概览

What is LocalMcpServer?

LocalMcpServer is a demonstration implementation of a Model Context Protocol (MCP) server built with .NET 9.0. It uses STDIO transport to provide tools—such as a time retrieval tool and a NuGet package interface lookup service—that can be invoked by compatible MCP clients, primarily serving as a reference for building MCP servers.

How to use LocalMcpServer?

Clone the repository, build the application with dotnet build, then run it with dotnet run. The server communicates over standard input/output, so you must connect a compatible MCP client—such as OllamaChat—to interact with its tools.

Key features of LocalMcpServer

  • Implementation of a basic MCP server using the ModelContextProtocol library
  • Uses STDIO transport for client-server communication
  • Includes a sample TimeTool that returns the current server time
  • Provides an InterfaceLookupService to retrieve C# interface definitions from NuGet packages
  • Built with .NET 9.0 and the .NET Generic Host
  • Automatically discovers and registers tools from the assembly

Use cases of LocalMcpServer

  • Demonstrate how to create and configure a simple MCP server
  • Test and debug MCP client–server interactions locally
  • Integrate with OllamaChat to give a local language model access to time and NuGet interface information
  • Serve as a starting template for developing custom MCP tools

FAQ from LocalMcpServer

What is the purpose of LocalMcpServer?

It serves as a demonstration of the Model Context Protocol, showing how to implement a server that exposes tools via STDIO. It is meant for learning and prototyping MCP server development.

What are the system requirements to run LocalMcpServer?

You need the .NET 9.0 SDK (or higher) and a compatible MCP client for testing, such as the OllamaChat application.

How do I run the server?

Clone the repository, run dotnet build to build the project, and then dotnet run to start the server. The server listens on standard input and output.

What tools does LocalMcpServer provide?

It provides two tools: TimeTool (with a GetCurrentTime() method that returns the server time in ISO 8601 format) and InterfaceLookupService (with GetInterfaceDefinition and ListInterfaces methods for inspecting C# interfaces from NuGet packages).

How can I integrate LocalMcpServer with OllamaChat?

OllamaChat can connect to this MCP server via STDIO. By running the server locally and configuring OllamaChat to use it, you enable the language model to invoke the server’s tools for time retrieval and interface lookup.

评论

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