ChainMCP is a .NET-based Model Context Protocol (MCP) server implementation that provides a set of tools for handling simple operations like echoing messages and retrieving the current date and time.
- Built on .NET 9
- Implements Model Context Protocol (MCP) server
- Uses standard I/O for server transport
- Includes two main tools:
today_tool
: Returns the current date and timeecho_day_tool
: Echoes back a provided message
- .NET 9.0 SDK or later
- ModelContextProtocol package (version 0.1.0-preview.12 or compatible)
ChainMCP can be installed as an MCP server for applications like Claude Desktop or Visual Studio Code.
-
Install the tool globally using the .NET CLI:dotnet tool install --global chainmcp Or if you're installing from a local build:dotnet pack dotnet tool install --global --add-source ./chainmcp/nupkg chainmcp
-
Configure your MCP client (Claude Desktop or VS Code):
Add the following to your Claude Desktop MCP configuration: { "tools": { "chainmcp": { "command": "chainmcp" } } }
Add the following to your VS Code MCP configuration: { "mcpServers": { "chainmcp": { "command": "chainmcp" } } } To update the tool to a newer version:dotnet tool update --global chainmcp To uninstall:dotnet tool uninstall --global chainmcp
The application provides two main tools that can be called from your MCP-enabled application:
Returns the current date and time.
Echoes back the provided message.
Note: The today_tool
must be called before using the echo_day_tool
to obtain the correct message to echo.
Program.cs
- Main application entry point and server configurationTools/TodayTool.cs
- Implementation of the Today toolTools/EchoTool.cs
- Implementation of the Echo tool
- Microsoft.Extensions.Hosting
- ModelContextProtocol
To build and run the project locally: dotnet run --project chainmcp
This project is licensed under the MIT License - see the LICENSE.md file for details.
[Add contribution guidelines here]
[Add support information here]