Skip to main content
Glama
Time MCP Server

Time MCP Server

by hypnwtykvmpr

Time MCP Server

This standalone fork of the upstream Time server provides current time, timezone conversion, and elapsed-time queries through MCP. It detects the host's local timezone by default and adds an explicit UTC boolean. Python 3.10 or newer is required.

Installation

Clone this repository and run these commands in its root, beside pyproject.toml:

uv sync --locked --no-dev
uv run --locked --no-dev mcp-server-time

uv manages Python and the locked project environment on Windows, macOS, and Linux. No environment activation is required.

Related MCP server: Now MCP

Tools

Tool

Arguments

get_current_time

Optional timezone and utc

convert_time

Required time in HH:MM; optional source_timezone and target_timezone

get_time_ago

Optional timezone, utc, days_ago, hours_ago, minutes_ago, and seconds_ago

Omitting a timezone uses the detected local timezone. --local-timezone overrides that default. Timezone names are exact, case-sensitive IANA keys.

For get_current_time and get_time_ago, utc: true returns UTC and takes precedence over an explicit timezone or --local-timezone. Omit utc or pass false to use local or explicitly selected time. Only JSON booleans are accepted.

On an America/Chicago host, get_current_time({}) reports that timezone with its date-appropriate offset. get_current_time({"utc": true}) reports UTC and an ISO timestamp ending in +00:00.

get_time_ago accepts nonnegative integers for its offsets, which add together. For example, {"hours_ago": 2, "minutes_ago": 30, "utc": true} requests two and a half elapsed hours ago in UTC. A day is 24 elapsed hours, including across daylight saving changes. Fractions, numeric strings, booleans, and dates before year 1 are rejected. convert_time reports both occurrences of an ambiguous daylight-saving time; a nonexistent wall-clock time returns a tool error.

Client configuration

Replace <checkout-directory> with this clone's absolute path. If the client cannot locate uv on PATH, set command to its installed executable.

{
  "mcpServers": {
    "time": {
      "command": "uv",
      "args": ["run", "--locked", "--no-dev", "--directory", "<checkout-directory>", "mcp-server-time"]
    }
  }
}

The client starts and stops the default stdio server. MCP 2025-11-25 and 2026-07-28 clients are supported automatically. Tools return structured results and matching JSON text; failures are readable MCP tool errors.

Server options

Option

Meaning

--local-timezone

Override the detected default with an IANA timezone

--transport

stdio by default; streamable-http enables the HTTP transport

uv run --locked --no-dev mcp-server-time --transport streamable-http

The optional HTTP endpoint is http://127.0.0.1:3001/mcp by default. HOST and PORT configure the listener. Browser Origins must be localhost origins; the SDK also checks Host and Origin on loopback.

Development

uv sync --locked --all-extras --dev
uv run --locked ruff check .
uv run --locked ruff format --check .
uv run --locked pyright
uv run --locked pytest
uv build

Time CI runs on Windows, macOS, and Linux with Python 3.10 and 3.15. System timezone data is used with the locked tzdata fallback.

Upstream history

Only the upstream src/time history is retained. The fork is one commit above that extracted server baseline; UPSTREAM.json records its source.

License

MIT. See LICENSE.

Available Tools

3 tools
convert_timeC
Read-onlyIdempotent

Convert time between timezones

Inputs: time (required), source_timezone, target_timezone. Returns: source, target, time_difference, later_occurrence

get_current_timeA
Read-onlyIdempotent

Get current time in a specific timezone

Inputs: utc, timezone. Returns: is_dst, datetime, timezone, day_of_week

get_time_agoB
Read-onlyIdempotent

Get the time a given number of days, hours, minutes and seconds ago in a specific timezone

Inputs: utc, days_ago, timezone, hours_ago, +2 more. Returns: is_dst, datetime, timezone, day_of_week

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 3 tools

    Disambiguation4/5

    Each tool has a clearly different output: current time, converted time, or an offset historical time. get_time_ago slightly overlaps with get_current_time (it's a parameterized variant) but the offset semantics are clear enough to avoid misselection.

    Naming Consistency5/5

    All three names follow a clean verb_noun pattern (get_current_time, convert_time, get_time_ago) with consistent snake_case and time-related nouns.

    Tool Count4/5

    Three tools is thin but defensible for a focused time utility. A couple more operations (e.g., time difference or formatting) could round it out without bloat.

    Completeness3/5

    Covers now, conversion, and past offsets, but there is no forward offset (future time), no difference/duration between two timestamps, and no formatting/parsing of arbitrary date strings, which are common agent needs.

    Maintenance

    ActivityActive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      Not graded
      maintenance
      Provides timezone-aware date and time information with configurable time formats and timezone support. Enables users to get current date and time in their preferred timezone and format through simple MCP tools.
      2
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides time-related tools including current time retrieval, timezone conversion, time formatting, and timezone info via MCP.
      7 npm
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides real-time time awareness to Hermes Agent by exposing date, time, and timezone tools through MCP, enabling on-demand temporal queries.
      1
      -
    • A
      license
      A
      quality
      B
      maintenance
      MCP server for time, timezone, and duration operations. Enables getting current time in any timezone, converting timestamps between timezones, adding/subtracting ISO-8601 durations, and computing time between two timestamps.
      5
      242 npm
      1
      MIT