Skip to main content
Glama
mcp-datetimeday

mcp-datetimeday

by cfdude

mcp-datetimeday

A lightweight MCP server for date, time, and day of week.

Installation

pip install mcp-datetimeday

Or with uv:

uv pip install mcp-datetimeday

Related MCP server: MCP Node Time

Usage

The server supports two transport modes: stdio (default) for Claude Desktop, and streamable-http for Claude Code or any HTTP-based MCP client.

Run the server as a persistent HTTP process (e.g., via PM2), then register it:

# Start the server
mcp-datetimeday --transport streamable-http --port 8105

# Register in Claude Code (user scope)
claude mcp add --transport http --scope user mcp-datetimeday http://127.0.0.1:8105/mcp

Claude Code (stdio)

claude mcp add --scope user mcp-datetimeday -- uvx mcp-datetimeday

Claude Desktop

Add to your config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "datetimeday": {
      "command": "uvx",
      "args": ["mcp-datetimeday"]
    }
  }
}

CLI Options

--transport {stdio,streamable-http}   Transport protocol (default: stdio)
--port PORT                           Port for HTTP transport (default: 8105)
--host HOST                           Host for HTTP transport (default: 127.0.0.1)

PM2 (persistent HTTP server)

An ecosystem.config.cjs is included for PM2:

pm2 start ecosystem.config.cjs
pm2 save

Available Tools

Tool

Description

get_datetime

Get current date/time with day of week first. Supports tz arg for timezone, format arg: iso8601, unix, human, or full (default).

relative_time

Get relative time between dates (e.g., "3 days ago", "in 2 weeks")

days_in_month

Get number of days in a month with first/last day info

convert_time

Convert time between timezones

get_week_year

Get week number, ISO week, day of year, quarter

Example Output

get_datetime()

{
  "day_of_week": "Monday",
  "date": "2026-02-02",
  "time": "16:55:22",
  "timezone": "PST",
  "utc_offset": "-0800",
  "iso8601": "2026-02-02T16:55:22-08:00",
  "unix_timestamp": 1770080122,
  "human_readable": "Monday, February 02, 2026 at 04:55 PM"
}

get_datetime(format="iso8601")

{
  "day_of_week": "Monday",
  "iso8601": "2026-02-02T16:55:22-08:00"
}

get_datetime(tz="UTC")

{
  "day_of_week": "Tuesday",
  "date": "2026-02-03",
  "time": "00:55:22",
  "timezone": "UTC",
  "utc_offset": "+0000",
  "iso8601": "2026-02-03T00:55:22+00:00",
  "unix_timestamp": 1738544122,
  "human_readable": "Tuesday, February 03, 2026 at 12:55 AM"
}

relative_time("2026-02-10")

{
  "target": "2026-02-10",
  "target_day_of_week": "Tuesday",
  "reference": "now",
  "relative": "in 1 week",
  "days_difference": 7,
  "total_seconds": 604800
}

get_week_year()

{
  "date": "2026-02-02",
  "day_of_week": "Monday",
  "day_of_week_number": 1,
  "week_number": 5,
  "iso_week": 6,
  "iso_year": 2026,
  "day_of_year": 33,
  "days_remaining_in_year": 332,
  "is_weekend": false,
  "quarter": 1
}

Development

git clone https://github.com/cfdude/mcp-datetimeday.git
cd mcp-datetimeday
uv sync
uv run mcp-datetimeday

Available Tools

5 tools
convert_timeA

Convert time between timezones.

Args: time_str: Time in YYYY-MM-DD HH:MM:SS or YYYY-MM-DDTHH:MM:SS format. from_tz: Source IANA timezone (e.g., "America/New_York", "UTC"). to_tz: Target IANA timezone.

Returns: Converted time with day of week for both timezones.

Inputs: time_str (required), from_tz (required), to_tz (required). Returns: object

days_in_monthA

Get the number of days in a month.

Args: year: Year (e.g., 2025). Defaults to current year. month: Month (1-12). Defaults to current month.

Returns: Number of days in the month, plus first/last day info.

Inputs: year, month. Returns: object

get_datetimeA

Get current date and time with day of week.

Args: tz: IANA timezone (e.g., "America/New_York", "UTC"). Defaults to local. format: Output format - "iso8601", "unix", "human", or None for full response.

Returns: Formatted datetime with day of week always included.

Inputs: tz, format. Returns: object

get_week_yearB

Get week number and ISO week of the year.

Args: date_str: Date in YYYY-MM-DD format. Defaults to today.

Returns: Week number, ISO week, day of year, and related info.

Inputs: date_str. Returns: object

relative_timeA

Get relative time description between two dates.

Args: date_str: Target date in YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS format. reference: Reference date (same formats). Defaults to now.

Returns: Relative time description (e.g., "3 days ago", "in 2 weeks").

Inputs: date_str (required), reference. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: convert_time handles timezone conversions, days_in_month provides month-specific information, get_datetime retrieves current datetime, get_week_year calculates week/year details, and relative_time computes time differences. The descriptions clearly differentiate their functions, eliminating any ambiguity.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern using snake_case: convert_time, days_in_month, get_datetime, get_week_year, and relative_time. The naming is predictable and readable throughout, with no deviations in style or convention.

    Tool Count5/5

    With 5 tools, this server is well-scoped for datetime/day operations. Each tool earns its place by covering distinct aspects of the domain (time conversion, month info, current time, week/year details, and relative time), avoiding both redundancy and gaps in functionality.

    Completeness4/5

    The tool set covers core datetime/day operations comprehensively, including conversion, retrieval, and analysis. Minor gaps exist, such as the lack of tools for date arithmetic (e.g., add/subtract days) or holiday/event checking, but agents can work around these with the provided tools for most common workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      The Time MCP Server is a Model Context Protocol (MCP) server that provides AI assistants and other MCP clients with standardized tools to perform time and date-related operations. This server acts as a bridge between AI tools and a robust time-handling back
      167 npm
      25
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A MCP server that provides timezone-aware date and time operations. This server addresses the common issue where AI assistants provide incorrect date information due to timezone confusion.
      4
      5
      MIT
    • A
      license
      D
      quality
      C
      maintenance
      A lightweight MCP server that provides date and time tools, including the ability to retrieve current timestamps and parse date strings with IANA timezone support. It enables AI models to interact with the host OS clock and perform temporal calculations via stdio transport.
      3
      10 npm
      7
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      MCP server providing various date/time functions including current time, timezone conversion, and relative time calculations. Supports both local stdio and remote HTTP access via Cloudflare Workers.
      2
      6
      443 npm
      3
      MIT