Skip to main content
Glama
clock-mcp

clock-mcp

by garland3

clock-mcp

A one-tool MCP server that tells the model what day and time it is.

Why

Language models have no clock. Asked for today's date, a model with tools will reach for whatever search tool is in reach — a billed API call and a network round trip to learn something the machine it is running on already knows, and often an answer scraped off a page that is itself stale.

This is the cheap answer: read the system clock, return it. No network, no API key, no state on disk.

Related MCP server: Time MCP Server

The tool

get_current_time(timezone_name: str | None = None)

timezone_name takes an IANA name (America/Denver, Asia/Tokyo) or UTC. Omit it for the host's local zone. An unknown name raises an error rather than silently falling back to UTC — a wrong timezone is worse than a refusal.

{
  "iso8601": "2026-09-13T14:05:09-06:00",
  "date": "2026-09-13",
  "time": "14:05:09",
  "day_of_week": "Sunday",
  "timezone": "America/Denver",
  "timezone_abbreviation": "MDT",
  "utc_offset": "-06:00",
  "utc_iso8601": "2026-09-13T20:05:09+00:00",
  "unix_timestamp": 1789243509,
  "human": "Sunday, September 13, 2026 at 2:05 PM MDT"
}

Both a machine half and a human half, because callers want different ones: date and unix_timestamp for arithmetic, human for dropping straight into a reply.

Install

git clone https://github.com/garland3/clock-mcp.git
cd clock-mcp
uv venv && uv pip install -e '.[dev]'

.venv/bin/clock-mcp --list-tools     # get_current_time
.venv/bin/python -m pytest -q

Register it

Claude Code:

claude mcp add clock -- /path/to/clock-mcp/.venv/bin/clock-mcp --stdio

Anything that reads a JSON MCP config:

{
  "clock": {
    "command": ["/path/to/clock-mcp/.venv/bin/clock-mcp", "--stdio"],
    "transport": "stdio"
  }
}

One implementation note

The default zone is resolved from $TZ or the /etc/localtime symlink, not from datetime.now().astimezone(). That call only ever yields a fixed offset named for the current abbreviation (MDT), which throws away both the zone name and its DST rules — so the tool would report MDT where you want America/Denver. tzdata is a dependency so named zones resolve even on a host with no system zoneinfo tree.

License

MIT

Available Tools

1 tool
get_current_timeA

Return the current date, time, and timezone. Use this rather than a web search.

Inputs: timezone_name. Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only a single tool, there is no possibility of confusion between tools. The purpose is singular and the tool description clearly states what it does.

    Naming Consistency5/5

    The only tool name, get_current_time, follows a clean verb_noun snake_case pattern. Since there is just one tool, the naming is internally consistent.

    Tool Count5/5

    The server's entire purpose is to provide the current date and time, and one tool fully serves that purpose. A single tool is well-scoped and directly earns its place; adding more would be needless.

    Completeness5/5

    The domain is the current time, and get_current_time covers it completely by returning date, time, and timezone. There are no missing operations or workflows required for a clock server.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Provides LLMs with current date and time information across any timezone, with configurable defaults and support for IANA timezone identifiers.
      1
      34 npm
      3
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides current time information and timezone conversion capabilities using IANA timezone names and automatic system detection. It enables LLMs to fetch current times across different regions and convert specific times between timezones.
      MIT
    • F
      license
      B
      quality
      D
      maintenance
      Provides current time and timezone conversion using IANA timezone names, with automatic system timezone detection.
      2
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Exposes the host device's current date and time, returning local time with timezone offset or UTC.
      6
      MIT