Skip to main content
Glama
batteryshark

DateTime MCP Server

by batteryshark
README.md
# 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)
```json
{
  "date-time-mcp": {
    "command": "uv",
    "args": ["run", "python", "server.py"],
    "env": {
      "DEFAULT_TZ": "America/New_York",
      "TIMEFMT": "12"
    }
  }
}
```

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

TDQS

A3.8/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: get_current_date retrieves date information, while get_current_time retrieves time information. There is no overlap in functionality, and an agent would easily differentiate between them based on their names and descriptions.

Naming Consistency5/5

Both tools follow a consistent verb_noun pattern with 'get_current_' prefix, using snake_case throughout. The naming is predictable and readable, with no deviations in style or convention.

Tool Count2/5

With only two tools, the server feels thin for a DateTime domain. A comprehensive DateTime server would typically include tools for date/time manipulation, formatting, timezone handling, or date arithmetic, not just current date and time retrieval.

Completeness2/5

The toolset is severely incomplete for a DateTime server. It lacks basic operations like date/time parsing, formatting control, timezone conversions, date arithmetic (add/subtract days), or comparisons. Agents will hit dead ends when needing anything beyond current date/time retrieval.