Skip to main content
Glama
cfdude

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
time_strYes
from_tzYes
to_tzYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the core functionality (timezone conversion) and output format (converted time with day of week), though it lacks details on error handling, input validation, or performance characteristics like rate limits. It does not contradict any annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a brief purpose statement followed by organized sections for Args and Returns. Each sentence is essential, providing format examples and clarifying output details without redundancy. It is appropriately sized and front-loaded with the core functionality.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (3 parameters, no annotations, but with an output schema), the description is largely complete. It covers input formats and output details, though it could benefit from mentioning error cases or edge behaviors. The output schema likely handles return values, reducing the need for extensive output explanation in the description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must fully compensate. It provides clear semantics for all three parameters: 'time_str' with specific format examples, 'from_tz' as source IANA timezone with examples, and 'to_tz' as target IANA timezone. This adds significant value beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Convert time between timezones') and resource (time), distinguishing it from sibling tools like 'days_in_month' or 'get_datetime' which handle different time-related operations. It provides a verb+resource+scope combination that is precise and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by specifying the tool's purpose, but does not explicitly state when to use it versus alternatives like 'get_datetime' or 'relative_time'. No guidance is provided on prerequisites, exclusions, or specific scenarios where this tool is preferred over siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
yearNo
monthNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds some context beyond the basic function: it mentions default behavior (year/month default to current) and return info ('first/last day info'), which helps the agent understand output structure. However, it lacks details on error handling (e.g., invalid month values) or performance traits, leaving gaps for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and appropriately sized. It starts with a clear purpose statement, followed by organized sections for 'Args' and 'Returns' with bullet-like formatting. Every sentence earns its place by providing essential information without redundancy, making it easy to parse and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (simple date calculation), no annotations, and the presence of an output schema (implied by 'Returns' info), the description is mostly complete. It covers purpose, parameters, and return values adequately. However, it could benefit from mentioning sibling tools for better contextual placement, slightly reducing completeness for agent selection.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds significant meaning beyond the input schema, which has 0% description coverage. It clearly explains both parameters: 'year' (with example '2025' and default to current year) and 'month' (with range '1-12' and default to current month). This fully compensates for the schema's lack of descriptions, providing all necessary semantic context for parameter usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get the number of days in a month.' This is a specific verb ('Get') + resource ('number of days in a month'), making the function immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_datetime' or 'get_week_year', which might also provide date-related information but with different focuses.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_datetime' (which might provide date info) or 'relative_time' (which might handle time calculations), leaving the agent to infer usage based on tool names alone. There's no explicit context for when this tool is preferred over others.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
tzNo
formatNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that the tool returns formatted datetime with day of week always included, which is useful behavioral context. However, it doesn't mention potential errors (e.g., invalid timezone), rate limits, or authentication needs, leaving some behavioral aspects unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured with a clear purpose statement followed by well-organized sections for Args and Returns. Every sentence adds value: the first states the core function, and the subsequent lines provide essential parameter and return details without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (2 optional parameters) and the presence of an output schema (which handles return values), the description is mostly complete. It covers purpose, parameters, and return behavior adequately. However, it could slightly improve by mentioning error cases or default timezone behavior more explicitly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must fully compensate. It provides detailed semantics for both parameters: 'tz' is explained as an IANA timezone with examples and default behavior, and 'format' lists specific options with their meanings. This adds significant value beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'current date and time with day of week', making the purpose specific and unambiguous. It distinguishes from siblings like 'convert_time' or 'relative_time' by focusing on current datetime retrieval rather than conversion or relative calculations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through the parameter explanations (e.g., timezone handling, format options), but does not explicitly state when to use this tool versus alternatives like 'get_week_year' or 'days_in_month'. It provides clear parameter guidance but lacks explicit sibling differentiation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
date_strNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the return values (week number, ISO week, etc.) but doesn't cover important aspects like error handling for invalid dates, timezone considerations, or performance characteristics. The description adds some value by specifying the return format, but gaps remain for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, with the core purpose stated first. The Args and Returns sections are structured clearly, though the 'Returns' section could be more concise. There's minimal wasted text, but the formatting as a docstring-like block is slightly verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 parameter, no nested objects) and the presence of an output schema (which reduces the need to explain return values in the description), the description is fairly complete. It covers the purpose, parameter semantics, and return overview, though it lacks usage guidelines and some behavioral details. The output schema likely handles return value documentation adequately.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains that 'date_str' is a 'Date in YYYY-MM-DD format' and 'Defaults to today,' clarifying the parameter's purpose and default behavior. This compensates well for the schema's lack of documentation, though it doesn't detail edge cases like null handling.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get week number and ISO week of the year.' It specifies the verb ('Get') and the resources (week number, ISO week, day of year, related info). However, it doesn't explicitly differentiate from sibling tools like 'get_datetime' or 'relative_time' that might also handle date-related calculations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_datetime' or 'relative_time', nor does it specify use cases or exclusions. The only implied context is date-based calculations, but no explicit usage guidelines are given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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").

ParametersJSON Schema
NameRequiredDescriptionDefault
date_strYes
referenceNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the core functionality and return format, but lacks details on error handling, timezone considerations, or input validation. It doesn't contradict annotations, but could be more informative for a tool with no annotation support.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and appropriately sized. It starts with a clear purpose statement, followed by organized sections for 'Args' and 'Returns'. Each sentence adds value without redundancy, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity, no annotations, and an output schema (implied by 'Returns'), the description is fairly complete. It covers inputs, outputs, and basic behavior. However, it could improve by addressing edge cases or sibling tool differentiation, but it's sufficient for core usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains the purpose of 'date_str' and 'reference', their formats (YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS), and that 'reference' defaults to 'now'. This compensates well for the schema's lack of descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get relative time description between two dates.' It specifies the verb ('Get') and resource ('relative time description'), making it easy to understand. However, it doesn't explicitly differentiate from sibling tools like 'convert_time' or 'get_datetime', which might also handle date/time operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools or contexts where this tool is preferred over others, such as 'convert_time' for format changes or 'get_datetime' for absolute time retrieval. Usage is implied but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 5 tool updatesv0.1.0
    • First observedconvert_time
    • First observeddays_in_month
    • First observedget_datetime
    • First observedget_week_year
    • First observedrelative_time

TDQS

A4/5.0
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
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    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
    184
    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
    4
    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
    13
    7
    MIT
  • A
    license
    A
    quality
    F
    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.
    6
    490
    2
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cfdude/mcp-datetimeday'

If you have feedback or need assistance with the MCP directory API, please join our Discord server