A minimal Model Context Protocol (MCP) server built with .NET.
The server provides one simple tool:
GetCurrentUtcTime- Gets the current UTC date and time in RFC 3339 format
Prerequisites:
- .NET 9.0 or later
- Claude Desktop or another MCP-compatible client
Run with:
dotnet runTo use this server with Claude Desktop, add the following to your MCP configuration file:
Add to %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"time-server": {
"command": "dotnet",
"args": [
"run",
"--project",
"C:\\path\\to\\TimeMcpServer.csproj"
]
}
}
}Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"time-server": {
"command": "dotnet",
"args": [
"run",
"--project",
"/path/to/TimeMcpServer.csproj"
]
}
}
}Once configured, you can use the time tool in Claude Desktop:
- "What's the current UTC time?"
- "Give me an RFC 3339 timestamp"
To publish a new version of the package:
-
Update the version in
TimeMcpServer.csproj, and commit asRelease x.y.z -
Tag the release with a version number prefixed with 'v':
git tag v1.0.1
-
Push the tag to trigger the publishing pipeline:
git push --tags
The CI/CD pipeline will automatically:
- Publish the NuGet package to nuget.org
- Publish the server to the MCP Registry
- Create a GitHub release
The project includes GitHub Actions workflows for:
- Build & Test - Builds and tests on multiple platforms (Windows, macOS, Linux)
- Publish - Automatically publishes to NuGet, MCP Registry, and creates GitHub releases on version tags
This server is published to the Model Context Protocol Registry. The publishing process uses the server.json configuration file which follows the MCP Registry specification.