MCP server/other

mcp-datetimeday MCP Server

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

cfdude/mcp-datetimeday ↗by cfdudeupdated
1

Add it to Claude Code

claude mcp add mcp-datetimeday -- uvx mcp-datetimeday
2

Make your agent remember this setup

mcp-datetimeday's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.

npx conare@latest

Free · one command · indexes the sessions already on disk. Set up in the browser instead →

What it does

  • Supports relative time calculations like '3 days ago' or 'in 2 weeks'
  • Provides detailed calendar metadata including week numbers and quarters
  • Handles timezone conversions between different regions
  • Offers multiple output formats including ISO8601, Unix, and human-readable
  • Supports both stdio and streamable-http transport modes

Tools 5

get_datetimeGet current date/time with day of week. Supports timezone and custom formats.
relative_timeGet relative time between dates.
days_in_monthGet number of days in a month with first/last day info.
convert_timeConvert time between timezones.
get_week_yearGet week number, ISO week, day of year, and quarter information.

Try it

What day of the week is February 2nd, 2026?
How many days are left until the end of the current quarter?
Convert 4:00 PM PST to UTC time.
What is the relative time difference between today and next Monday?
Give me the current week number and day of the year.
Original README from cfdude/mcp-datetimeday

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

Usage

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

Claude Code (HTTP — recommended)

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

Frequently Asked Questions

What are the key features of mcp-datetimeday?

Supports relative time calculations like '3 days ago' or 'in 2 weeks'. Provides detailed calendar metadata including week numbers and quarters. Handles timezone conversions between different regions. Offers multiple output formats including ISO8601, Unix, and human-readable. Supports both stdio and streamable-http transport modes.

What can I use mcp-datetimeday for?

Scheduling tasks by calculating relative dates from the current time. Standardizing date and time formats across different timezones for reports. Retrieving calendar metadata for project planning and quarterly tracking. Automating time-based logic in AI-assisted workflows.

How do I install mcp-datetimeday?

Install mcp-datetimeday by running: pip install mcp-datetimeday

What MCP clients work with mcp-datetimeday?

mcp-datetimeday works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Conare · memory for coding agents

Turn this server into reusable context

Keep mcp-datetimeday docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Set up free$npx conare@latest