mcp-datetime

batteryshark/mcp-datetime

3.2

If you are the rightful owner of mcp-datetime and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The DateTime MCP Server is a simple server that provides timezone-aware date and time information.

Tools
2
Resources
0
Prompts
0

DateTime MCP Server

A simple MCP server that provides timezone-aware date and time information.

Tools

  • get_current_date(include_weekday=False) - Returns current date in ISO format (YYYY-MM-DD) with optional weekday
  • get_current_time() - Returns current time in configured format

Configuration

Set these environment variables (for stdio) or headers (for HTTP):

  • DEFAULT_TZ - Timezone identifier (e.g., "America/New_York", "Europe/London", "UTC")
  • TIMEFMT - Time format: "12" for 12-hour (2:30 PM) or "24" for 24-hour (14:30)

Fallbacks

  • Invalid timezone → defaults to UTC
  • TIMEFMT not "12" → defaults to 24-hour format

Usage Examples

STDIO (default)

{
  "date-time-mcp": {
    "command": "uv",
    "args": ["run", "python", "server.py"],
    "env": {
      "DEFAULT_TZ": "America/New_York",
      "TIMEFMT": "12"
    }
  }
}

HTTP Server

{
  "date-time-mcp": {
    "url": "http://localhost:8855",
    "headers": {
      "DEFAULT_TZ": "America/New_York",
      "TIMEFMT": "24"
    }
  }
}