LocalMcpServer
@DimonSmart
关于 LocalMcpServer
Local MCP server demo
基本信息
配置
工具
未检测到工具
工具是从 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
TimeToolthat returns the current server time - Provides an
InterfaceLookupServiceto 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 服务器
MCP Go 🚀
mark3labsA Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
Production-ready MCP integrations for AI applications
Klavis-AIKlavis AI: MCP integration platforms that let AI agents use tools reliably at any scale
AutoBrowser MCP
autobrowser-aiBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
FastMCP v2 🚀
jlowin🚀 The fast, Pythonic way to build MCP servers and clients.
Mcp
browsermcpBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
评论