Time .NET NuGet RFC3339 UTC MCP Server
Retrieve current UTC time in RFC 3339 format from the .NET/NuGet MCP server for reliable timestamps and easy integration.
npx -y @domdomegg/time-mcp-nugetOverview
This MCP (Model Context Protocol) server provides a simple, reliable way to retrieve the current UTC time in RFC 3339 format (a profile of ISO 8601) from a lightweight .NET service. It is designed for easy integration with AI tooling and other services that follow the MCP pattern of exposing small, well-defined tools that models or clients can call to obtain external context or perform deterministic actions.
Using a dedicated time tool removes ambiguity about timezone, formatting, and clock synchronization in cross-service workflows. The server returns a single canonical timestamp string (e.g., “2026-04-10T12:34:56Z”) and exposes minimal metadata so it can be included as an MCP tool in model orchestration layers or consumed directly over HTTP.
Features
- Returns current UTC time in RFC 3339 format (UTC/Z suffix).
- Minimal, deterministic response suitable for logging, auditing, and model context.
- Lightweight .NET implementation (source on GitHub).
- Easy to run locally or deploy as a service.
- Simple HTTP API and MCP-compatible tool metadata to integrate with model orchestration.
- Example client snippets for curl, JavaScript, and .NET HttpClient.
Installation / Configuration
There are two common ways to use the server: run from source, or include the provided NuGet package in a .NET project. Replace package names or project paths with those used in your environment if different.
Clone and run from source:
# Run the server (example: assuming an ASP.NET minimal API project)
Add the NuGet package to a .NET project (example package id shown — check repo or NuGet for exact package id):
Run the packaged server as an executable (if the project produces one):
# or if packaged as a global tool (if published that way)
Configuration (common environment variables / args)
- PORT or –urls: listening port and addresses (e.g., http://localhost:8080)
- LOG_LEVEL: optional log level (Information, Debug, etc.)
- BIND_ADDRESS: optional bind address for containerized deployments
Available Resources
The server exposes a small set of HTTP endpoints and MCP metadata useful to orchestrators:
| Path | Method | Description |
|---|---|---|
| /time | GET | Returns current UTC time as RFC 3339 string in JSON |
| /.well-known/mcp or /mcp/metadata | GET | MCP-compatible metadata describing the tool (name, description, input/output schema) |
| /health | GET | Health check endpoint (200 OK when ready) |
Example /time response:
GET /time HTTP/1.1
Host: localhost:8080
HTTP/1.1 200 OK
Content-Type: application/json
Example MCP metadata (simplified):
Use Cases
- Logging and audit trails: obtain a canonical RFC 3339 UTC timestamp for each event before it is stored or transmitted.
- Model toolchains: include the time tool as an MCP resource that LLMs can call when they need a trustworthy current timestamp for reasoning, responses, or external actions.
- Test reproducibility: retrieve a controlled timestamp during integration tests to assert expected temporal behavior.
- Distributed systems: use a single time service to standardize formatting and reduce discrepancies between services in different time zones.
- Short-lived signed artifacts: include a precise UTC timestamp when generating signatures or one-time tokens.
Concrete examples
Curl (simple consumer):
|
# -> 2026-04-10T12:34:56Z
JavaScript (fetch):
;
;
json.time; // RFC3339 UTC string
C# HttpClient:
using var http = new HttpClient();
var resp = await http.GetFromJsonAsync<Dictionary<string,string>>("http://localhost